Skip to content

True Markets Gateway API (1.0.0)

Gateway API for the True Markets trading platform - order orchestration, quotes, and balance management

Download OpenAPI description
Languages
Servers
Mock server

https://docs.truemarkets.co/_mock/apis/gateway/v1/

Production

https://api.truemarkets.co/v1/conductor/

Quotes

Request real-time market quotes for trading pairs without creating an order.

Operations

Orders

Create, execute, cancel, and monitor orders across CeFi and DeFi.

Operations

Request

Creates a new order. For DeFi orders, returns unsigned payloads for client signing.

Security
bearerAuth
Bodyapplication/jsonrequired
base_assetstringrequired

Base asset identifier (e.g. BTC, ETH, SOL)

Example: "BTC"
quote_assetstringrequired

Quote asset identifier (e.g. USD, USDC)

Example: "USD"
qtystringrequired

Quantity as a positive decimal string

Example: "100"
pricestring

Limit price per unit of base asset as a decimal string. Required for limit orders; must not be sent for market orders.

Example: "67500.00"
qty_unitstringrequired

Unit of the quantity.

  • base — Quantity is denominated in the base asset. Required for limit orders. Supported for market sell orders.
  • quote — Quantity is denominated in the quote asset. Required for market buy orders. For DeFi sell orders, base must be used instead.
Enum"base""quote"
Example: "quote"
typestring(OrderType)required

The type of order to place.

  • market — Execute immediately at the best available price. Buy orders require qty_unit: quote. Price must not be specified.
  • limit — Place an order at a specific price. Requires price and qty_unit: base. Only supported on CeFi; chain must not be specified.
Enum"market""limit"
sidestring(OrderSide)required

The side of the order.

  • buy — Purchase the base asset using the quote asset.
  • sell — Sell the base asset in exchange for the quote asset.
Enum"buy""sell"
chainstring

The blockchain network for DeFi orders. Omit for CeFi orders.

  • solana — Execute the swap on the Solana blockchain.
  • base — Execute the swap on the Base (Ethereum L2) blockchain.
Enum"solana""base"
Example: "solana"
curl -i -X POST \
  https://docs.truemarkets.co/_mock/apis/gateway/v1/orders \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "base_asset": "BTC",
    "quote_asset": "USD",
    "qty": "100",
    "price": "67500.00",
    "qty_unit": "quote",
    "type": "market",
    "side": "buy",
    "chain": "solana"
  }'

Responses

Order created successfully

Bodyapplication/json
order_idstring

Unique order identifier

statusstring(OrderStatus)

The current status of the order.

  • initialized — Order has been created but not yet submitted. For DeFi orders, the client must sign the returned payloads and call the execute endpoint. For CeFi buy orders with insufficient balance, a funding bridge is prepared first.
  • pending — Order has been submitted but is not yet confirmed by the CeFi exchange or on-chain.
  • active — Order was accepted by the CeFi exchange and is open for trading. Applies to limit orders that are working in the order book.
  • cancel_pending — A cancellation request has been sent to the CeFi exchange and is awaiting confirmation.
  • complete — Order has been fully executed. For CeFi orders this means the CeFi exchange reported a fill; for DeFi orders the on-chain swap was confirmed.
  • canceled — Order was successfully canceled via a cancel request or by exchange/market conditions.
  • failed — Order was rejected by the CeFi exchange or DeFi execution failed (e.g. on-chain transaction reverted, balance check failed).
Enum"initialized""pending""cancel_pending""complete""canceled""active""failed"
payloadsArray of objects(UnsignedPayload)

Unsigned transaction payloads that the client must sign and return via the execute endpoint. Present for DeFi orders and CeFi buy orders that require a funding bridge. Empty or absent when the order is submitted immediately (e.g. CeFi sell orders).

quoteobject(QuoteDetails)

Quote details for DeFi orders including expected output quantity and fees

web_authn_payloadstringDeprecated

WebAuthn payload (deprecated, use payloads instead)

Response
application/json
{ "order_id": "string", "status": "complete", "payloads": [ {} ], "quote": { "base_asset": "string", "quote_asset": "string", "qty": "string", "qty_out": "string", "fee": "string", "fee_asset": "string", "issues": [] }, "web_authn_payload": "string" }

Request

Returns a paginated list of completed and failed orders with execution data for the authenticated user

Security
bearerAuth
Query
limitinteger[ 1 .. 100 ]

Maximum number of orders to return

Default 50
cursorstring(date-time)

RFC3339 timestamp cursor for pagination

statusstring

Comma-separated list of order statuses to filter by

Example: status=pending,canceled
curl -i -X GET \
  'https://docs.truemarkets.co/_mock/apis/gateway/v1/orders?limit=50&cursor=2019-08-24T14%3A15%3A22Z&status=pending%2Ccanceled' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Orders retrieved successfully

Bodyapplication/json
dataArray of objects(OrderDetail)

List of orders

paginationobject(Pagination)

Cursor-based pagination metadata

Response
application/json
{ "data": [ {} ], "pagination": { "next_cursor": "2019-08-24T14:15:22Z", "limit": 0 } }

Request

Executes a pending order using client-provided signatures for the unsigned payloads

Security
bearerAuth
Path
idstringrequired

Order ID

Bodyapplication/jsonrequired
signaturesArray of stringsnon-emptyrequired

Signed stamps for the unsigned payloads, in the same order as the payloads returned by the create endpoint. Each signature corresponds to one payload.

auth_typestring(SigningMethod)required

The authentication method used to sign transaction payloads.

  • web_authn — Signed using a passkey (WebAuthn/FIDO2 credential) via the browser.
  • api_key — Signed using an API key. Suitable for programmatic/headless access.
Enum"web_authn""api_key"
curl -i -X POST \
  'https://docs.truemarkets.co/_mock/apis/gateway/v1/orders/{id}/execute' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "signatures": [
      "string"
    ],
    "auth_type": "api_key"
  }'

Responses

Order execution initiated

Bodyapplication/json
statusstring(OrderStatus)

The current status of the order.

  • initialized — Order has been created but not yet submitted. For DeFi orders, the client must sign the returned payloads and call the execute endpoint. For CeFi buy orders with insufficient balance, a funding bridge is prepared first.
  • pending — Order has been submitted but is not yet confirmed by the CeFi exchange or on-chain.
  • active — Order was accepted by the CeFi exchange and is open for trading. Applies to limit orders that are working in the order book.
  • cancel_pending — A cancellation request has been sent to the CeFi exchange and is awaiting confirmation.
  • complete — Order has been fully executed. For CeFi orders this means the CeFi exchange reported a fill; for DeFi orders the on-chain swap was confirmed.
  • canceled — Order was successfully canceled via a cancel request or by exchange/market conditions.
  • failed — Order was rejected by the CeFi exchange or DeFi execution failed (e.g. on-chain transaction reverted, balance check failed).
Enum"initialized""pending""cancel_pending""complete""canceled""active""failed"
Response
application/json
{ "status": "complete" }

Request

Submits a cancellation request for a pending limit order on CeFi.

Cancellation is asynchronous — the order moves to cancel_pending immediately, then the order syncer reconciles the final state:

  • cancelled if the CeFi exchange confirms the cancellation
  • complete if the order filled before the cancel landed (race condition)

Only CeFi limit orders in pending or active status are cancellable. DeFi orders and market orders return 400.

Security
bearerAuth
Path
idstringrequired

Order ID

curl -i -X DELETE \
  'https://docs.truemarkets.co/_mock/apis/gateway/v1/orders/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Cancellation request accepted

Bodyapplication/json
object
Response
application/json
{}

Request

Returns the current status of an order

Security
bearerAuth
Path
idstringrequired

Order ID

curl -i -X GET \
  'https://docs.truemarkets.co/_mock/apis/gateway/v1/orders/{id}/status' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Order status retrieved

Bodyapplication/json
statusstring(OrderStatus)

The current status of the order.

  • initialized — Order has been created but not yet submitted. For DeFi orders, the client must sign the returned payloads and call the execute endpoint. For CeFi buy orders with insufficient balance, a funding bridge is prepared first.
  • pending — Order has been submitted but is not yet confirmed by the CeFi exchange or on-chain.
  • active — Order was accepted by the CeFi exchange and is open for trading. Applies to limit orders that are working in the order book.
  • cancel_pending — A cancellation request has been sent to the CeFi exchange and is awaiting confirmation.
  • complete — Order has been fully executed. For CeFi orders this means the CeFi exchange reported a fill; for DeFi orders the on-chain swap was confirmed.
  • canceled — Order was successfully canceled via a cancel request or by exchange/market conditions.
  • failed — Order was rejected by the CeFi exchange or DeFi execution failed (e.g. on-chain transaction reverted, balance check failed).
Enum"initialized""pending""cancel_pending""complete""canceled""active""failed"
Response
application/json
{ "status": "complete" }

Balances

Query account balances for the authenticated user.

Operations

Request

Returns unified balances across CeFi and DeFi for the authenticated user

Security
bearerAuth
curl -i -X GET \
  https://docs.truemarkets.co/_mock/apis/gateway/v1/balances/unified \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Balances retrieved successfully

Bodyapplication/json
dataArray of objects(BalanceItem)

List of asset balances

Response
application/json
{ "data": [ {} ] }