Introduction
Programmatic access to One Trading futures and spot markets.
The Exchange API consists of a REST API and a WebSocket API. Both use the same API key.
REST API
Request/response endpoints for market data, orders, futures positions and funding.
WebSocket API
Streamed order books, price ticks and mark prices, order entry, and trading and account events.
Environments
| API | Production URL |
|---|---|
| REST | https://api.onetrading.com/fast |
| WebSocket | wss://streams.fast.onetrading.com |
Authentication
Create an API key in the One Trading UI. On REST requests, send it as a bearer token:
Authorization: Bearer <api-key>On the WebSocket API, send the same key in an AUTHENTICATE message after connecting. See Authenticate.
Each endpoint lists the API key permission it requires. Public market data endpoints do not require a key.
Timestamps
REST endpoints, the market data WebSocket channels and the TRADING channel use the formats documented on each endpoint. The WebSocket ACCOUNT channel uses ISO 8601 strings.