Trades
Trades convert between currencies and assets inside an account: fiat to stablecoin, stablecoin to fiat, or between crypto assets.
- Orders execute immediately at the best available price (
order_type: market) unless you place a limit order. - Size an order in the base asset with
volume(BTC in BTC/EUR) or in the quote asset withamount(EUR in BTC/EUR). Order books trade in the base asset, so quote-sized orders are converted first and the executed result can differ slightly. - Set
client_idto your own reference to find or cancel the trade later. - Check tradable pairs, minimum sizes and precision with
GET /supported_pairsbefore you trade.
For a guaranteed rate on a currency conversion, use Quotes & Payouts instead.
/accounts/{account_id}/tradesReturns the trades of an account, executed and pending, with fees. Results come 80 per page by default.
Authorization
BearerAuth Token from POST /sign_in, sent as Authorization: Bearer <token>.
In: header
Path Parameters
ID of the account.
uuidQuery Parameters
Page number, starting at 1.
1 <= value1Number of results per page. Defaults to 80.
1 <= valueResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/trades?page=1&per_page=80"{ "data": [ { "id": "5b9d2e7f-3a1c-4f6b-8e2d-7c0a9f4b1e38", "pair": "USDC/EUR", "amount": 920, "volume": 1000, "price": 0.92, "trade_type": "buy", "order_type": "market", "created_at": 1772813114, "trading_fee_amount": 0.92, "trading_fee_percentage": 0.001, "client_id": "order-7731" } ], "pagination": { "current_page": 1, "per_page": 80, "total_pages": 1, "total_count": 2 }}/accounts/{account_id}/tradesPlaces an order to buy or sell the base asset of pair. Size it with volume (base asset)
or amount (quote asset).
- Market orders (the default) execute immediately at the best available price.
- Limit orders (
order_type: limit) execute atlimit_priceor better.
Order books trade in the base asset, so an order sized with amount is converted to a
volume first and the executed result can differ slightly. Other order options can be
enabled depending on your liquidity venue; ask Depa.
Authorization
BearerAuth Token from POST /sign_in, sent as Authorization: Bearer <token>.
In: header
Path Parameters
ID of the account.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/trades" \ -H "Content-Type: application/json" \ -d '{ "pair": "USDC/EUR", "type": "buy", "volume": 1000, "client_id": "order-7731" }'{ "data": { "id": "5b9d2e7f-3a1c-4f6b-8e2d-7c0a9f4b1e38", "pair": "USDC/EUR", "amount": 920, "volume": 1000, "price": 0.92, "trade_type": "buy", "order_type": "market", "created_at": 1772813114, "trading_fee_amount": 0.92, "trading_fee_percentage": 0.001, "client_id": "order-7731" }}/accounts/{account_id}/trades/{id}Returns a trade with its execution price and fees.
Authorization
BearerAuth Token from POST /sign_in, sent as Authorization: Bearer <token>.
In: header
Path Parameters
ID of the account.
uuidID of the trade.
uuidResponse Body
application/json
application/json
application/json
curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/trades/5b9d2e7f-3a1c-4f6b-8e2d-7c0a9f4b1e38"{ "data": { "id": "5b9d2e7f-3a1c-4f6b-8e2d-7c0a9f4b1e38", "pair": "USDC/EUR", "amount": 920, "volume": 1000, "price": 0.92, "trade_type": "buy", "order_type": "market", "created_at": 1772813114, "trading_fee_amount": 0.92, "trading_fee_percentage": 0.001, "client_id": "order-7731" }}/accounts/{account_id}/trades/cancelCancels a trade that hasn't executed yet, such as an open limit order. Identify it with trade_id or your client_id.
Authorization
BearerAuth Token from POST /sign_in, sent as Authorization: Bearer <token>.
In: header
Path Parameters
ID of the account.
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Identify the trade with trade_id or with your client_id.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/trades/cancel" \ -H "Content-Type: application/json" \ -d '{ "client_id": "order-7733" }'{ "data": { "id": "5b9d2e7f-3a1c-4f6b-8e2d-7c0a9f4b1e38", "pair": "USDC/EUR", "amount": 920, "volume": 1000, "price": 0.92, "trade_type": "buy", "order_type": "market", "created_at": 1772813114, "trading_fee_amount": 0.92, "trading_fee_percentage": 0.001, "client_id": "order-7731" }}