Skip to content

APIs & Interfaces

GoMarket exposes four network surfaces. Which one you want depends on whether you’re trading, reading data, or working with parlays.

SurfaceProtocolAuthUse it for
Order ManagerHTTP/JSON /v1, gRPCSIWS (HTTP)Placing, cancelling and querying orders; book snapshots
Markets APIRESTnone (read), internal token (write)The market catalogue — condition IDs, token IDs, mints, tick sizes
Platform APIREST (Django)Platform JWTMarkets, events, positions, portfolio, parlays, activity, leaderboards
Solana RPCJSON-RPCnoneReading on-chain state and sending your own transactions

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.
Terminal window
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

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.

Terminal window
curl -s http://localhost:8081/markets | jq
curl -s http://localhost:8081/markets/{condition_id} | jq

Reads are open; POST /markets and PATCH /markets/{condition_id} are gated by a shared internal token.

→ Markets API reference

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.

GroupBase path
Markets & events/api/markets/
Positions & portfolio/api/markets/user/
Parlays/api/parlays/
Parlay suggestions/api/markets/parlay-suggestions/

Deployments:

EnvironmentBase URL
Devhttps://dev-api.gomarket.io
Productionhttps://prod-api.gomarket.io

Each has its own database — a market created against one is not visible on the other.

→ Parlays API reference

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.

→ On-Chain Programs

You want to…Call
Post or cancel an orderOrder Manager HTTP /v1/orders
Read the bookOrder Manager /v1/book, /v1/order-book-summary
Resolve a token ID to a mintMarkets API GET /markets/{condition_id}
List a user’s parlaysPlatform API GET /api/parlays/user/
Place a parlaySolana tx → high-market-parlay::create_parlay
Stream fills and price changesThe ledger’s Redis notifications stream
Redeem a resolved positionSolana tx → markets::redeem

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.