The official wire contract for the Sidepit exchange. One file: sidepit_api.proto
— every message the exchange speaks, exactly as production speaks it.
- Exchange: Bitcoin-margined forwards. Deposit Bitcoin → trade → get your Bitcoin back.
Your funding address IS your account id (
sidepit_id, a bc1q address you control). - Transport: NNG (Scalability Protocols) over TCP, protobuf
payloads. Host:
api.sidepit.com. Connections are long-lived. - Auction: orders batch into 1-second epochs — the exchange's core mechanic.
| Port | Pattern | What |
|---|---|---|
| 12121 | push → | submit signed SignedTransaction (orders, cancels) |
| 12122 | sub ← | market data pulse (quote, bar, depth) |
| 12123 | sub ← | auction echo (the epoch transaction stream) |
| 12124 | sub ← | order + margin feed (OrderData, your fills and positions) |
| 12125 | req/rep ↔ | queries (active_product, positions/account) + account transactions |
| 12126 | sub ← | auction clearing (market-maker tier) |
| 12127 | sub ← | closed 1-minute bars |
| 12128 | sub ← | rejected transactions |
| 12129 | req/rep ↔ | snapshot sync (mid-session join) |
- First call:
active_producton 12125 — is the exchange up, current session, tradable contracts. - Subscribe 12122/12124 for live data; use 12125 for point-in-time account reads.
- Orders are signed with your Bitcoin key (secp256k1); the order id is
{sidepit_id}:{timestamp_ns}— you mint it, the exchange echoes it.
The Python SDK, TUI, examples, and full protocol documentation live in Public-API. Docs: https://docs.sidepit.com