REST and WebSocket APIs for One Trading
Manage orders and request market data over HTTPS, or stream market data and order updates over a single WebSocket connection. Both APIs authenticate with an API key created in the One Trading UI. Read the introduction
- MiFID IIRegulated trading venue
- Every minuteFutures positions settled
- 24/7Funding every 4 hours
- One API keyFor REST and WebSocket
Request and response
REST API
Orders, market data, positions and funding over HTTPS.
Open reference for the REST APIPOST /v1/account/orders
Authorization: Bearer <api-key>
{
"instrument_code": "BTC_USD_P",
"type": "LIMIT",
"side": "SELL",
"amount": "0.01",
"price": "85012.40",
"time_in_force": "GOOD_TILL_CANCELLED"
}{
"order_id": "dc3239e2-e808-433a-8875-12ab7c537ce4",
"instrument_code": "BTC_USD_P",
"side": "SELL",
"price": "85012.40",
"amount": "0.01",
"status": "OPEN"
}Streaming
WebSocket API
Market data, order entry and order updates over a single connection.
Open reference for the WebSocket APIWebSocket channels
Each SUBSCRIBE message names one channel. Several channels can share the same connection. Market data channels are public. The trading and account channels require an authenticated connection.
Public market data
ORDER_BOOKA full snapshot on subscription, then incremental changes as [SIDE, PRICE, AMOUNT].PRICE_TICKSOne tick per executed trade, with price, amount, taker side, best bid and best ask.BOOK_TICKERBest bid and best ask, with their amounts, for every instrument.MARK_PRICEMark and index prices of futures instruments, every 5 seconds.
{"type":"AUTHENTICATE","api_token":"eyJ..."}Futures settlement and funding
One Trading is a MiFID II regulated trading venue. Open futures positions are settled every minute, and profit and loss is realised at each settlement. The funding rate is updated every minute, and funding is exchanged between long and short position holders every 4 hours, 24/7, for all futures.