Skip to main content

EDXM Market Data (1.0.0)

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.

Endpoints (EDX Markets)

Authentication

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}/api
  • grant_type: client_credentials
  • client_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:

  • Prod: clearing.edxmarkets.com
  • UAT: uat.edxclearing.com

This 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.

API Evolution

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).

Instruments

Get Instrument Symbols

Retrieves a list of all instrument symbols.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Instruments

Retrieves a list of all instruments.

query Parameters
symbols
required
Array of strings
Example: symbols=BTC/USD,ETH/USD

A comma-separated list of instrument symbols

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Historical OHLC

Get Historical OHLC

Retrieves historical OHLC (open, high, low, close) data for a given symbol and time range.

query Parameters
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:
  • interval=1m -
  • interval=3m -
  • interval=5m -
  • interval=10m -
  • interval=15m -
  • interval=30m -
  • interval=60m -
  • interval=2h -
  • interval=4h -
  • interval=6h -
  • interval=12h -
  • interval=1d -
  • interval=7d -

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 1m or 60s. Supported durations are 1 minute, 3 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, 6 hours, 12 hours, 1 day, and 7 days.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "responseMetadata": {
    }
}

Historical Trades

Get Historical Trades

Retrieves historical trade data for a given symbol and time range.

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "responseMetadata": {
    }
}

Historical Book Updates

Get Historical Order Book Updates

Retrieves historical order book updates for a given symbol and time range.

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "responseMetadata": {
    }
}

Historical Book Snapshots

Get Historical Order Book Snapshots

Retrieves historical order book snapshots for a given symbol and time range.

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "responseMetadata": {
    }
}

Historical Perpetual Futures Metrics

Get Historical Trading Metrics

Retrieves historical trading metrics for a given symbol and time range.

query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "responseMetadata": {
    }
}

Ticker

Get Ticker

Retrieves recent (but not real-time) ticker data for the given symbols.

query Parameters
symbols
required
Array of strings
Example: symbols=BTC/USD,ETH/USD

A comma-separated list of instrument symbols

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Order Books

Get Order Book Summary

Retrieves summary of order book(s).

query Parameters
symbols
Array of strings
Example: symbols=BTC/USD,ETH/USD

A comma-separated list of instrument symbols

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get Order Book Snapshot

Retrieves recent snapshots of the specified order books. For real-time market data, consult the WebSocket API.

query Parameters
symbols
required
Array of strings
Example: symbols=BTC/USD,ETH/USD

A comma-separated list of instrument symbols

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Live OHLC

Get Live OHLC

Get live/open OHLC data for a given interval.

query Parameters
symbol
required
string

The instrument symbol

interval
string
Default: "1m"
Examples:
  • interval=1m -
  • interval=3m -
  • interval=5m -
  • interval=10m -
  • interval=15m -
  • interval=30m -
  • interval=60m -
  • interval=2h -
  • interval=4h -
  • interval=6h -
  • interval=12h -
  • interval=1d -
  • interval=7d -

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 1m or 60s. Supported durations are 1 minute, 3 minutes, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 2 hours, 4 hours, 6 hours, 12 hours, 1 day, and 7 days.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}