REST API

API reference

The API describes itself. This page is the map; the OpenAPI document has every field.

The spec

Envelope and conventions

json
{ "ok": true,  "data": { ... }, "ts": 1794725046239 }
{ "ok": false, "error": { "code": "policy_denied", "message": "...", "details": {} }, "ts": 1794725046239 }

Money you own or instruct (orders, fills, positions, balances, fees, previews) is a decimal string such as "0.00125". Market data (books, trades, candles, tickers) is a number. Times are epoch milliseconds. Error codes are listed under Safety.

Routes

Market datamarket:read or publicGET /markets, /markets/{symbol}, /candles, /route, /health/feeds
Accountaccount:readGET /me, /account, /venues, /orders, /fills
Perps tradingorders:executePOST /orders/preview, POST /orders, DELETE /orders/{id}, POST /orders/cancel-all, POST /positions/close, POST /leverage
Solana datamarket:readGET /sol/pulse, /sol/search, /sol/token/{mint} and /candles /trades /holders /top-traders /dev-tokens /bubble-map
Solana tradingsol:trade, account:readPOST /sol/quote, POST /sol/trade, GET /sol/fills, POST/GET /sol/orders, DELETE /sol/orders/{id}, GET /sol/portfolio, GET /sol/watchlist
Fundingswap:quote, swap:executeGET /funding/options, POST /funding/quote, POST/GET /funding/transfers. Answers live_off while live trading is off.
ConfigpublicGET /config returns { live }: whether live trading is switched on
Agent platformsigned-in user (keys), any key (whoami)GET /agent/whoami, GET /agent/tools, GET/POST /agent/keys, PATCH/DELETE /agent/keys/{id}, POST /agent/keys/{id}/rotate, POST /agent/pause, GET /agent/activity
MCPany keyPOST /mcp

Placing an order

POST /orders/preview with an OrderIntent returns previewId, legs, fees, margin, notices and placeable. POST /orders takes { intent, clientId, previewId? }: previewId places exactly what you previewed (valid about 15 seconds), intent places fresh. clientId is a UUID you generate; the same one never places twice. See the Quickstart for a run you can paste.

Realtime

wss://renko-terminal-api.fly.dev/ws (the API host: the socket does not go through the site address), JSON text frames. After hello the server sends welcome (and authed with a key). Each sub gets a snap with seq: 0, then delta frames whose seq rises by exactly 1; on a gap, unsub and sub again.

json
{"op":"hello","v":1,"token":"renko_sk_test_..."}
{"op":"sub","id":1,"ch":"book","params":{"symbol":"BTC","depth":10}}
{"op":"sub","id":2,"ch":"orders","params":{"mode":"paper"}}
  • Channels: health markets ticker book trades candles account orders fills notifications sol.pulse sol.token sol.trades sol.candles sol.portfolio.
  • Private channels (account orders fills notifications sol.portfolio) need the key in hello, and most take {"mode":"paper"|"live"}.
  • Limits per connection: 64 subscriptions, 20 messages per second, 16 KiB frames.
Note
Live trading is not switched on yet: live actions answer live_off. See Limits.