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
| Python | Rust | Zig | |
|---|---|---|---|
| Best for | Data science, scripting, backtesting | HFT bots, production trading systems | Ultra-low-latency, bare-metal trading |
| Async model | Synchronous | Async (Tokio) | Synchronous |
| Ethereum client | web3.py | Alloy | eth.zig |
| HFT infrastructure | No | Yes | Yes |
| Position manager (SL/TP/trailing stop) | No | Yes | Yes |
| Quote simulation | No | Yes | No |
| WebSocket subscriptions | No | Coming soon | No |
| Create perp markets | Yes | No | Yes |
| Caching | Simple TTL | 2-tier TTL (2s/60s) | 2-tier TTL (2s/60s) |
| Transport strategies | Single RPC | Multi-RPC (round-robin, latency, hedged) | Multi-RPC failover |
| Circuit breaker | No | Yes | No |
When to use what
- Python -- You're analyzing markets, backtesting strategies, or scripting one-off operations. Simplest API with the lowest learning curve.
- Rust -- You're building a production trading bot and need async I/O, sub-millisecond tx preparation, quote simulation, and resilient multi-endpoint transport. The most complete HFT feature set.
- Zig -- You want bare-metal performance with zero runtime overhead, comptime ABI encoding, and deterministic memory layout. Ideal when you need absolute control over every allocation.
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 Base. 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.