Docs

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

PythonRustZig
Best forData science, scripting, backtestingHFT bots, production trading systemsUltra-low-latency, bare-metal trading
Async modelSynchronousAsync (Tokio)Synchronous
Ethereum clientweb3.pyAlloyeth.zig
HFT infrastructureNoYesYes
Position manager (SL/TP/trailing stop)NoYesYes
Quote simulationNoYesNo
WebSocket subscriptionsNoComing soonNo
Create perp marketsYesNoYes
CachingSimple TTL2-tier TTL (2s/60s)2-tier TTL (2s/60s)
Transport strategiesSingle RPCMulti-RPC (round-robin, latency, hedged)Multi-RPC failover
Circuit breakerNoYesNo

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.