Download OpenAPI specification:Download
Specifications relating to derivatives products including perpetual futures are provided solely for members of EDXM International. Derivatives, including perpetual futures, and related services provided by EDXM International are not available to US persons or institutions or in any other jurisdiction where prohibited by law.
UAT
PROD (EDX Markets)
PROD (EDXM Global)
For endpoints that require authentication.
API Credentials can be generated on the Clearing Member Portal via the API Apps tab with the desired permissions.
With the client id and secret obtained from the clearing member portal, access tokens must be generated
following OAuth2.0 standards using the client_credentials grant type.
A POST request will need to be made to https://auth.{server-url}/oauth/token with the following x-www-form-urlencoded parameters
audience: https://{server-url}/apigrant_type: client_credentialsclient_id: {your-client-id}client_secret: {your-client-secret}You can test that you can receive an access token using your credentials in UAT by making the following request:
curl 'https://auth.uat.edxclearing.com/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id={your-client-id}' \
--data-urlencode 'client_secret={your-client-secret}' \
--data-urlencode 'audience=https://uat.edxclearing.com/api' \
--data-urlencode 'grant_type=client_credentials'
The server-url will be based on the environment:
clearing.edxmarkets.comuat.edxclearing.comThis will then return a json object with one of the fields being the access_token.
Provide this token in the API requests as the Authorization header with the string Bearer prepended to the token string.
Changes to this API in the following forms are considered backwards compatible and must be handled by the client application:
Adding new fields to an existing response
Adding new optional fields to an existing request
Client applications must not fail to deserialize responses with new properties (for example, using 'strict' JSON parsers).
Retrieves a list of all instruments.
| symbols required | Array of strings Example: symbols=BTC/USD,ETH/USD A comma-separated list of instrument symbols |
{- "data": [
- {
- "symbol": "BTC/USD",
- "type": "SPOT",
- "priceIncrement": "0.01",
- "minimumQuantity": "0.00000001",
- "quantityIncrement": "0.00000001",
- "baseCurrency": "BTC",
- "quoteCurrency": "USD"
}
]
}Retrieves historical OHLC (open, high, low, close) data for a given symbol and time range.
| after | string The cursor at which to start the page (exclusive). |
| pageSize | integer <int64> [ 1 .. 100 ] Default: 100 |
| start required | integer <int64> >= 0 Start time (inclusive) in milliseconds since epoch |
| end required | integer <int64> >= 0 End time (exclusive) in milliseconds since epoch |
| symbol required | string The instrument symbol |
| sort | string (SortOrder) Default: "asc" Enum: "asc" "desc" Example: sort=asc Sort order of the results |
| interval | string Default: "1m" Examples:
OHLC interval in 'duration' format. Interval duration can be expressed in any unit up to 'days' (d) as long as the duration is one of the supported intervals. For example, a '1 minute' interval can be requested with either |
{- "data": [
- {
- "intervalStart": 1735936320000,
- "symbol": "BTC/USD",
- "open": "92432.65",
- "high": "93406.21",
- "low": "92121.98",
- "close": "92763.91",
- "volume": "243516.76"
}
], - "responseMetadata": {
- "endCursor": "eyJkb2NzIjoiZXhhbXBsZSJ9",
- "nextUrl": "/v1/market-data/path/to/next/page?after=eyJkb2NzIjoiZXhhbXBsZSJ9",
- "hasNext": true
}
}Retrieves historical trade data for a given symbol and time range.
| after | string The cursor at which to start the page (exclusive). |
| pageSize | integer <int64> [ 1 .. 100 ] Default: 100 |
| start required | integer <int64> >= 0 Start time (inclusive) in milliseconds since epoch |
| end required | integer <int64> >= 0 End time (exclusive) in milliseconds since epoch |
| symbol required | string The instrument symbol |
| sort | string (SortOrder) Default: "asc" Enum: "asc" "desc" Example: sort=asc Sort order of the results |
{- "data": [
- {
- "tradeId": "3308523515535163392",
- "timestamp": 1735498275498310700,
- "symbol": "BTC/USD",
- "quantity": "1.1",
- "price": "93596.12",
- "aggressorSide": "BUY"
}
], - "responseMetadata": {
- "endCursor": "eyJkb2NzIjoiZXhhbXBsZSJ9",
- "nextUrl": "/v1/market-data/path/to/next/page?after=eyJkb2NzIjoiZXhhbXBsZSJ9",
- "hasNext": true
}
}Retrieves historical order book updates for a given symbol and time range.
| after | string The cursor at which to start the page (exclusive). |
| pageSize | integer <int64> [ 1 .. 100 ] Default: 100 |
| start required | integer <int64> >= 0 Start time (inclusive) in milliseconds since epoch |
| end required | integer <int64> >= 0 End time (exclusive) in milliseconds since epoch |
| symbol required | string The instrument symbol |
| sort | string (SortOrder) Default: "asc" Enum: "asc" "desc" Example: sort=asc Sort order of the results |
{- "data": [
- {
- "timestamp": 1735498272106733600,
- "entryId": "3308495672080072704",
- "symbol": "BTC/USD",
- "entryType": "BID",
- "updateAction": "NEW",
- "extendedExecutionInstruction": "INSTITUTIONAL",
- "quantity": "1.1",
- "price": "93596.12"
}
], - "responseMetadata": {
- "endCursor": "eyJkb2NzIjoiZXhhbXBsZSJ9",
- "nextUrl": "/v1/market-data/path/to/next/page?after=eyJkb2NzIjoiZXhhbXBsZSJ9",
- "hasNext": true
}
}Retrieves historical order book snapshots for a given symbol and time range.
| after | string The cursor at which to start the page (exclusive). |
| pageSize | integer <int64> [ 1 .. 100 ] Default: 100 |
| start required | integer <int64> >= 0 Start time (inclusive) in milliseconds since epoch |
| end required | integer <int64> >= 0 End time (exclusive) in milliseconds since epoch |
| symbol required | string The instrument symbol |
| sort | string (SortOrder) Default: "asc" Enum: "asc" "desc" Example: sort=asc Sort order of the results |
{- "data": [
- {
- "bookId": "22a1eb1b-cbec-31a0-a2c7-1f37f4ddf393",
- "lastUpdateTimestamp": 1735498290500170200,
- "symbol": "BTC/USD",
- "bids": [
- {
- "side": "BID",
- "price": "93596.12",
- "quantity": "1.1",
- "entryId": "3308495672080072704",
- "extendedExecutionInstruction": "INSTITUTIONAL"
}
], - "asks": [
- {
- "side": "BID",
- "price": "93596.12",
- "quantity": "1.1",
- "entryId": "3308495672080072704",
- "extendedExecutionInstruction": "INSTITUTIONAL"
}
]
}
], - "responseMetadata": {
- "endCursor": "eyJkb2NzIjoiZXhhbXBsZSJ9",
- "nextUrl": "/v1/market-data/path/to/next/page?after=eyJkb2NzIjoiZXhhbXBsZSJ9",
- "hasNext": true
}
}Retrieves historical trading metrics for a given symbol and time range.
| after | string The cursor at which to start the page (exclusive). |
| pageSize | integer <int64> [ 1 .. 100 ] Default: 100 |
| start required | integer <int64> >= 0 Start time (inclusive) in milliseconds since epoch |
| end required | integer <int64> >= 0 End time (exclusive) in milliseconds since epoch |
| symbol required | string The instrument symbol |
| sort | string (SortOrder) Default: "asc" Enum: "asc" "desc" Example: sort=asc Sort order of the results |
| types | Array of strings (TradingMetricType) Items Enum: "PRELIMINARY_MARK_PRICE" "FINAL_MARK_PRICE" "PRELIMINARY_FUNDING_RATE" "FINAL_FUNDING_RATE" "OPEN_INTEREST" Example: types=FINAL_MARK_PRICE,FINAL_FUNDING_RATE A comma-separated list of trading metric types |
{- "data": [
- {
- "timestamp": 1735498275498310700,
- "symbol": "BTC/USD",
- "type": "PRELIMINARY_MARK_PRICE",
- "value": "1.1"
}
], - "responseMetadata": {
- "endCursor": "eyJkb2NzIjoiZXhhbXBsZSJ9",
- "nextUrl": "/v1/market-data/path/to/next/page?after=eyJkb2NzIjoiZXhhbXBsZSJ9",
- "hasNext": true
}
}Retrieves recent (but not real-time) ticker data for the given symbols.
| symbols required | Array of strings Example: symbols=BTC/USD,ETH/USD A comma-separated list of instrument symbols |
{- "data": [
- {
- "symbol": "BTC/USD",
- "lastTradePrice": "92121.98",
- "openTradePrice": "94237.62",
- "volume": {
- "notional": "103767.774",
- "base": "1.1"
}, - "upToTimestamp": 1735936907433
}
]
}Retrieves summary of order book(s).
| symbols | Array of strings Example: symbols=BTC/USD,ETH/USD A comma-separated list of instrument symbols |
{- "data": [
- {
- "symbol": "BTC/USD",
- "lastUpdateTimestamp": 1735922737656448500,
- "bestBidPrice": "97976.63",
- "totalBidNotionalValue": "549531.99749205",
- "bestAskPrice": "98025.63",
- "totalAskNotionalValue": "540841.75607361",
- "spreadBps": "4.99"
}
]
}Retrieves recent snapshots of the specified order books. For real-time market data, consult the WebSocket API.
| symbols required | Array of strings Example: symbols=BTC/USD,ETH/USD A comma-separated list of instrument symbols |
{- "data": [
- {
- "lastUpdateTimestamp": 1735498290500170200,
- "symbol": "BTC/USD",
- "bids": [
- {
- "side": "BID",
- "price": "93596.12",
- "quantity": "1.1"
}
], - "asks": [
- {
- "side": "BID",
- "price": "93596.12",
- "quantity": "1.1"
}
]
}
]
}Get live/open OHLC data for a given interval.
| symbol required | string The instrument symbol |
| interval | string Default: "1m" Examples:
OHLC interval in 'duration' format. Interval duration can be expressed in any unit up to 'days' (d) as long as the duration is one of the supported intervals. For example, a '1 minute' interval can be requested with either |
{- "data": {
- "symbol": "BTC/USD",
- "intervalStart": 1735936320000,
- "asOf": 1735936320000,
- "open": "92432.65",
- "high": "93406.21",
- "low": "92121.98",
- "lastTradePrice": "92421.98",
- "volume": "243516.76"
}
}