Ecosystem
SDKs, libraries, and services for building on PerpCity -- choose the right tools for your use case.
Everything you need to build on PerpCity. Choose an SDK for your language, or use the Beaconator to create and manage oracle data feeds.
Choosing an SDK
The Rust SDK is the reference implementation: Strobe's own trading systems run on it, it's maintained against the contracts as they're actually deployed, and new protocol capabilities ship there first. If you're building something that trades, start there.
The real decision is what you're trading away by choosing anything else:
- Zig buys you determinism: no runtime, no garbage collector, comptime ABI encoding, and control over every allocation, on a zero-dependency stack (eth.zig) small enough to audit end to end. The price is surface area -- a leaner API than Rust (no local order-book simulation, fewer conveniences), a synchronous model that leaves concurrency to you, and new protocol capabilities arriving after they've shipped in Rust. It's the right trade when you're embedding trading logic in a system where you own the event loop and can't tolerate a runtime -- and the wrong one if what you want is the fullest toolkit.
- Python buys you iteration speed: the simplest API, with the pandas/numpy/notebook ecosystem next door. The price is everything production needs -- synchronous, single-endpoint transport, no HFT infrastructure, no resilience machinery. That's the right trade when the deliverable is an analysis or a backtest rather than a running system; strategies that graduate to production typically get rewritten against the Rust SDK.
- TypeScript isn't on the same axis: it's the frontend SDK, built on viem with React hooks and Wagmi integration, signing through the user's browser wallet. Choose it because you're building a UI, not as an alternative for programmatic trading.
Mixing is normal: research a strategy in Python, run it in Rust, and put a TypeScript UI in front of the same markets.
At a glance
| Rust | Zig | Python | |
|---|---|---|---|
| Async model | Async (Tokio) | Synchronous | Synchronous |
| Ethereum client | Alloy | eth.zig | web3.py |
| Install | cargo add perpcity-sdk | build.zig.zon git dependency | pip install perpcity-sdk |
Capability details live on each SDK's own pages -- the highlights:
- Rust -- The full surface: taker/maker trading with pre-flight simulation on every send (would-be reverts decode into typed errors before broadcast), liquidations with simulate probes and typed revert triage, batched block-pinned maker-equity settle previews, local order-book quote simulation with contract-exact math, multi-RPC transport with read/write splitting and circuit breakers, Multicall3 batching, cached gas estimation, WebSocket event streaming for both current and legacy event shapes, position manager with SL/TP/trailing stops, and AWS KMS signing. See the API reference.
- Zig -- A lean, current surface over eth.zig: per-market trading wrappers including liquidations with simulate preflights, market creation via the factory, a managed write path with stuck-transaction gas bumping, multi-RPC failover, Multicall batching, 2-tier TTL caching, event streaming, and the same position-manager trigger engine -- with the pure-math and HFT layers usable standalone, zero external dependencies.
- Python -- Market reads, position lifecycle, and market creation in a synchronous, minimal API.
Tools & Libraries
- TypeScript SDK -- The frontend SDK for PerpCity. Built on viem with React hooks, Wagmi integration, and config caching -- designed for building browser-based trading UIs, not programmatic trading.
- Beaconator -- A REST API service for creating and managing oracle beacons on Arbitrum. Deploy price feed oracles, update them with ZK proofs or ECDSA signatures, and register them with PerpCity -- individually or in batches via Multicall3.
- eth.zig -- A zero-dependency, pure Zig Ethereum library. Provides comptime ABI encoding, secp256k1 signing, BIP-32/39/44 HD wallets, and full transaction support -- all without C bindings. This is the Ethereum client underlying the Zig SDK.