Trading API
Everything a bot, a market maker or a data consumer can call on TRUE: venue REST for orders, market data over REST, SSE and WebSocket, and the MCP endpoint.
TRUE runs a perpetuals venue on Solana with an oracle mark from Pyth, an on chain custody vault and a sequencer that matches orders. This section documents every surface an outside program can use, exactly as deployed. Nothing here is aspirational: where something is planned it says so.
The three surfaces
| Surface | Base URL | Credential | Use it for |
|---|---|---|---|
| Venue REST (sequencer) | https://dex-prod.truefinance.ai | API key (apikey_…) plus Ed25519 signature on writes; none for public reads | placing, modifying and cancelling orders; account, positions, transfers; raw market data |
| TRUE market data | https://app.truefinance.ai | none for public data | order book, best bid and offer, oracle marks, trades, klines, 24h stats, over REST, SSE or WebSocket |
| MCP (AI assistants) | https://app.truefinance.ai/api/v1/mcp | MCP key (true_sk_…) or OAuth | letting Claude, ChatGPT, Cursor or your own agent read a portfolio and place approved trades |
Which one you want
A trading bot
Venue REST for orders, TRUE WebSocket or SSE for market data. Every write is signed with your own key; TRUE never holds it.
Quoting on the book
The WebSocket orderbook topic delivers sequence numbered deltas; quotes go through the same signed REST calls with POST_ONLY.
Screeners, aggregators, listing sites
TRUE market data only. No key, no signature. Markets, stats, book, trades and klines, plus venue totals for TVL and volume.
An AI acting for a person
MCP. Every order proposed through MCP is approved by the user in the TRUE app before it executes; leveraged orders never auto approve.
The sequence a bot follows
Treat any write without a 2xx within 5 seconds as unknown. Read GET /v1/orders before retrying, so a retry never doubles an order.
Prices: mark, not last fill
Every price TRUE shows, the header, the chart, the list and liquidations, is the oracle mark. The last fill (last_traded_price in stats) sits on a thin book and can differ from the mark by tens of dollars. If you display TRUE prices anywhere, use the mark: the mark event, the marks:ALL topic, or the TRUE kline endpoint, which builds bars from the mark.