APIs & Interfaces
GoMarket exposes four network surfaces. Which one you want depends on whether you’re trading, reading data, or working with parlays.
The surfaces
Section titled “The surfaces”| Surface | Protocol | Auth | Use it for |
|---|---|---|---|
| Order Manager | HTTP/JSON /v1, gRPC | SIWS (HTTP) | Placing, cancelling and querying orders; book snapshots |
| Markets API | REST | none (read), internal token (write) | The market catalogue — condition IDs, token IDs, mints, tick sizes |
| Platform API | REST (Django) | Platform JWT | Markets, events, positions, portfolio, parlays, activity, leaderboards |
| Solana RPC | JSON-RPC | none | Reading on-chain state and sending your own transactions |
Order Manager
Section titled “Order Manager”The matching engine. Same operations served over both transports, backed by
one Service implementation.
- HTTP/JSON under
/v1/, authenticated with SIWS. This is the surface for external traders. - gRPC (
clob.OrderManagerService) — an internal, in-cluster surface.
curl -s http://127.0.0.1:8080/v1/orders \ -H "Authorization: Bearer $CLOB_TOKEN"Defaults: CLOB_HTTP_ADDR=127.0.0.1:8080, CLOB_GRPC_ADDR=127.0.0.1:50051.
→ HTTP reference · gRPC reference
Markets API
Section titled “Markets API”The catalogue service. It owns the markets table and is the single source
of truth for the order manager and the executor — the on-chain program has no
token registry, so this is where a token ID resolves to a market and an
outcome mint.
curl -s http://localhost:8081/markets | jqcurl -s http://localhost:8081/markets/{condition_id} | jqReads are open; POST /markets and PATCH /markets/{condition_id} are gated
by a shared internal token.
Platform API
Section titled “Platform API”The Django backend behind the GoMarket webapp. It indexes both on-chain programs from Helius webhooks and serves everything the product needs that isn’t the order book itself.
| Group | Base path |
|---|---|
| Markets & events | /api/markets/ |
| Positions & portfolio | /api/markets/user/ |
| Parlays | /api/parlays/ |
| Parlay suggestions | /api/markets/parlay-suggestions/ |
Deployments:
| Environment | Base URL |
|---|---|
| Dev | https://dev-api.gomarket.io |
| Production | https://prod-api.gomarket.io |
Each has its own database — a market created against one is not visible on the other.
Solana RPC
Section titled “Solana RPC”Parlays are placed by sending a transaction yourself, not by calling a
GoMarket endpoint. create_parlay, settle_leg and claim_parlay are
instructions on the high-market-parlay program; the Platform API only
mirrors the resulting state for reads.
The same is true of mint_tokens, merge_tokens, redeem and
set_delegate on the markets program.
Choosing a path
Section titled “Choosing a path”| You want to… | Call |
|---|---|
| Post or cancel an order | Order Manager HTTP /v1/orders |
| Read the book | Order Manager /v1/book, /v1/order-book-summary |
| Resolve a token ID to a mint | Markets API GET /markets/{condition_id} |
| List a user’s parlays | Platform API GET /api/parlays/user/ |
| Place a parlay | Solana tx → high-market-parlay::create_parlay |
| Stream fills and price changes | The ledger’s Redis notifications stream |
| Redeem a resolved position | Solana tx → markets::redeem |
Rate limits and idempotency
Section titled “Rate limits and idempotency”There is no published per-client rate limit on the Order Manager today. Two properties worth knowing when you build against it:
- Order hashes are the idempotency key. Inserting the same signed order twice is rejected as a duplicate — both by the book and by the unique-order registry.
- Settlement de-duplication is off-chain. The executor de-dupes by full trade key and persists that set across restarts. The on-chain program carries no per-order fill state, which is why the executor is the single trusted settlement instance.