For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api.md.
API reference
Every endpoint of every True Markets API. Requests and responses are JSON, and authenticated calls carry a bearer token.
Trading, Accounts, Authentication and Market Data share one host, api.truemarkets.co. Exchange REST, for firms with direct exchange access, has its own host, api.truex.co.
How the reference is organized
Each API has its own section below, with its base URL and every endpoint. The REST sections are generated from our OpenAPI specs, and the WebSocket sections from our AsyncAPI specs. Each endpoint page lists every field, response and error code, and a Try in Playground button.
The reference tells you what each endpoint accepts. For which calls to make and in what order, follow the guides for Gateway or the Trading API.
Authentication
Mint a token from your API key with POST /v1/auth/api-key/token, then send it in Authorization: Bearer. When you act for one of your users on Gateway, the request also carries TM-On-Behalf-Of. Authentication has the flow, and API keys explains the keys.
Exchange REST takes the same token, on its own host, plus an x-truex-auth-timestamp header. Trade over REST has the headers. Direct access guides start at About Institutional.
curl https://api.truemarkets.co/v1/gateway/balances \
-H "Authorization: Bearer $TOKEN"Errors
Every error returns the same body. type sets the HTTP status, code names the specific condition, and request_id identifies the request when you write to support. Errors has the full table and what to retry.
Base URL
https://api.truemarkets.co/v1/authEndpoints
/oauth/authorizeStart an authorization requestPOST/oauth/consentRecord a consent decisionPOST/oauth/tokenExchange a grant for tokensGET/.well-known/oauth-resource-jwks.jsonOAuth resource token key setGET/oauth/authorize/detailsDescribe an authorization requestGET/oauth/consentsList connected appsDELETE/oauth/consents/{client_id}Revoke a connected appPOST/oauth/registerRegister an OAuth clientGET/.well-known/oauth-authorization-serverAuthorization server metadataTrading REST
Quotes, orders, transfers, balances and transactions, for your own account or for a user you act for.
Open referenceBase URL
https://api.truemarkets.co/v1/gatewayEndpoints
/ordersList user ordersPOST/ordersCreate new orderPOST/orders/{id}/executeExecute pending orderPOST/orders/all/cancelCancel all open orders on a venuePOST/orders/{id}/cancelCancel a limit or TP/SL order (CeFi or DeFi)POST/orders/{id}/cancel/executeExecute a resting DeFi order cancellationPOST/orders/modify/{id}/preparePrepare moving resting DeFi TP/SL orders to new trigger pricesPOST/orders/modify/{id}/executeExecute a prepared TP/SL modifyGET/orders/{id}Get a single orderPATCH/orders/{id}Modify an active limit orderGET/orders/{id}/statusGet order status/transfersList user transfersPOST/transfersCreate new transferPOST/transfers/{id}/executeExecute pending transferGET/transfers/{id}Get transfer by ID/rampsList user rampsPOST/rampsCreate a rampGET/ramps/{id}Get ramp by IDPOST/ramps/{id}/bridge/executeExecute a ramp's bridge planPOST/ramps/{id}/preparePrepare a ramp's on-chain transferPOST/ramps/{id}/executeExecute a ramp's on-chain transfer/custody/allocationsList allocationsPOST/custody/allocationsAllocate funds to CeFiGET/custody/allocations/{id}Get allocationGET/custody/releasesList releasesPOST/custody/releasesRelease funds from CeFiGET/custody/releases/{id}Get release/paper/depositsAdd test funds (paper trading only)POST/paper/withdrawalsRemove test funds (paper trading only)/transactionsList user transactionsGET/organizations/{organization_id}/transactionsList organization transactionsGET/organizations/{organization_id}/transactions/statsGet organization trading stats/assets/availabilityGet asset availability for the caller's countryGET/assetsList tradeable assetsGET/assets/{chain}/{address}Get one asset by chain and address/balances/unifiedList balancesGET/balancesGet user balancesGET/portfolioGet the authenticated user's portfolio/positionsList open positionsAccounts REST
Create the users your organization trades for, with their wallets, and read deposit details.
Open referenceBase URL
https://api.truemarkets.co/v1/accountEndpoints
/organizations/{organization_id}/usersList the users your organization trades forPOST/organizations/{organization_id}/usersCreate a user your organization trades forGET/organizations/{organization_id}/users/{user_id}Get a user your organization trades for/me/tradingGet the user's trading setupBase URL
https://api.truemarkets.coEndpoints
/v1/defi/market/pricesGet price candles by symbolGET/v1/defi/market/prices/historyGet price history for a symbolGET/v1/defi/market/prices/history/pointGet price at a point in timeGET/v1/defi/market/prices/history/batchGet price history for multiple symbolsGET/v1/defi/market/prices/indicatorsGet a technical indicator seriesGET/v1/defi/market/prices/rangeGet min/max price over a windowGET/v1/defi/market/prices/candlesGet OHLC candles for a symbolGET/v1/assets/prices/historyGet price history for an assetGET/v1/assets/prices/rangeGet the min and max price for an assetGET/v1/assets/prices/indicatorsGet technical indicator lines for an asset/v1/defi/market/market-data/market-capGet market cap by symbolGET/v1/defi/market/market-data/market-capsList top assets by market capGET/v1/defi/market/market-data/market-cap/historyGet reported market-cap history/v1/defi/market/market-data/perp/historyGet perp funding rate and open interest historyGET/v1/defi/market/market-data/volume/historyGet reported 24h volume historyGET/v1/defi/market/market-data/scans/historyGet a market ranking at every bucket of a windowGET/v1/defi/market/market-data/trendingList trending assetsGET/v1/defi/market/market-data/surgingList surging assets/v1/defi/market/stream/bboStream BBO quotesHEAD/v1/defi/market/stream/bboProbe the BBO stream/v1/defi/market/assetsFind an asset by addressGET/v1/defi/market/assets/candlesGet OHLC candles for an asset by chain and addressWebSocket
Exchange REST
Order entry, balances and market data on the CeFi venue, for firms with direct access.
Open referenceBase URL
https://api.truex.coEndpoints
/v1/cefi/instrumentsGet instruments/v1/cefi/market/quoteGet marketsGET/v1/cefi/market/auctionGet auction state and indicativePOST/v1/cefi/markets/quoteCompute market quote/v1/cefi/clientsGet clientsPATCH/v1/cefi/clientsUpdate settingsGET/v1/cefi/clients/feesGet client fees/v1/cefi/ordersGet ordersPOST/v1/cefi/ordersCreate orderPATCH/v1/cefi/ordersModify orderDELETE/v1/cefi/orders/{ref_id}Cancel orderDELETE/v1/cefi/orders/allCancel all ordersGET/v1/cefi/orders/activeActive ordersGET/v1/cefi/orders/tradeAll order tradesGET/v1/cefi/orders/activityAll order activityGET/v1/cefi/orders/status/{ref_id}Status orderWebSocket
Exchange FIX
Order entry, drop copy and market data over FIX 5.0 SP2 sessions, for firms with direct exchange access.
Open referencePages
OverviewSession model, versions and the TrueX_FIX50SP2.xml specFIXAdministrativeLogon, heartbeat, test request, logoutFIXCommon componentsHeader, trailer and shared groupsFIXOrder entryNew order, cancel, replace, execution reportsFIXDrop copyExecution report copies for a sessionFIXMarket dataSnapshots and incremental refreshFIXChange logWhat changed in the FIX spec- Need help? Ask us on Discord, or email [email protected].
- See what changed in the changelog