Trading API
Everything a bot, a market maker or a data consumer can call on TRUE: the Bot API with Hummingbot and ccxt connectors, venue REST, market data streams and MCP.
TRUE runs a perpetuals venue on Solana with an oracle mark from TRUE’s price index (the median of major exchange books), 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 four surfaces
| Surface | Base URL | Credential | Use it for |
|---|---|---|---|
| Bot API | https://app.truefinance.ai/api/bot/v1 | bot key (tbk_…) plus secret, HMAC-SHA256 headers | exchange-style JSON trading for Hummingbot, ccxt, Freqtrade and your own code: markets, orders, positions, fills, candles, an account stream and a WebSocket token |
| 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
The Bot API: a key and secret from the Bots tab, HMAC headers, JSON orders, ready connectors for Hummingbot, ccxt and Freqtrade. TRUE signs the venue order for the one account the key was made for; the key cannot withdraw.
Signing orders yourself
Venue REST: every write carries an Ed25519 signature from a key you hold, and TRUE never sees it. More work, no intermediary.
Quoting on the book
The WebSocket orderbook topic delivers sequence numbered deltas; quotes go through the Bot API with postOnly or through signed venue REST 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 your open orders before retrying, or retry with the same clientOrderId on the Bot API, 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.