Skip to content

Trades

View and manage trades.

MethodPathDescription
GET/v1/tradesList trades
GET/v1/trades/:idGet trade
GET/v1/trades/analyticsGet trade analytics
POST/v1/tradesCreate trade
POST/v1/trades/:id/cancelCancel trade

GET /v1/trades

Query Parameters:

ParameterTypeDescription
strategy_idstringFilter by strategy
exchange_account_idstringFilter by exchange account
statusstringPENDING, FILLED, PARTIALLY_FILLED, CANCELLED, FAILED
sidestringBUY or SELL
limitintegerMax results (default 50, max 100)
offsetintegerPagination offset
Terminal window
curl "https://api.tokenbot.com/v1/trades?status=FILLED&limit=10" \
-H "X-API-Key: tb_live_your_key"

GET /v1/trades/:id

GET /v1/trades/analytics

Returns aggregated trade performance metrics.

Terminal window
curl https://api.tokenbot.com/v1/trades/analytics \
-H "X-API-Key: tb_live_your_key"

POST /v1/trades

Request Body:

{
"exchange_account_id": "exc_abc123",
"trade_pair_id": "tp_btcusdt",
"type": "LIMIT",
"side": "BUY",
"price": 50000.00,
"amount": 0.1
}

POST /v1/trades/:id/cancel
Terminal window
curl -X POST https://api.tokenbot.com/v1/trades/trd_abc123/cancel \
-H "X-API-Key: tb_live_your_key"