REST API
The base URL for endpoints described in this page of live trading API is https://api.cube.exchange/md/v0
.
Definitions for requests and responses can be found in the Market Data OpenAPI Document.
Further specifics for field enums, reject codes, etc. can be found in the Market Data API Websocket Documentation.
Endpoints, public
Endpoints in this section do not require authentication.
get
Path parameters
market_idinteger · uint64Required
Query parameters
mbpbooleanOptionalDefault:
false
mbobooleanOptionalDefault:
false
levelsinteger · uint | nullableOptionalDefault:
null
Responses
200Success
application/json
500
An error was encountered while processing the request.
application/json
get
GET /book/{market_id}/snapshot HTTP/1.1
Host:
Accept: */*
{
"result": {
"lastTradePrice": 646930,
"lastTransactTime": 1721102467166459400,
"levels": [
{
"price": 647520,
"quantity": 76600,
"side": 0
},
{
"price": 647530,
"quantity": 60100,
"side": 1
}
],
"marketState": "normalOperation"
}
}
get
Path parameters
market_idinteger · uint64Required
Responses
200Success
application/json
500
An error was encountered while processing the request.
application/json
get
GET /book/{market_id}/recent-trades HTTP/1.1
Host:
Accept: */*
{
"result": {
"trades": [
{
"aggressingExchangeOrderId": 2431752712,
"aggressingSide": 1,
"fillQuantity": 26316,
"price": 637050,
"restingExchangeOrderId": 2431752357,
"tradeId": 2434680,
"transactTime": 1721071666518348500
}
]
}
}
get
Responses
200Success
application/json
500
An error was encountered while processing the request.
application/json
get
GET /tickers/snapshot HTTP/1.1
Host:
Accept: */*
{
"result": {
"summaries": [
{
"baseVolumeHi": 0,
"baseVolumeLo": 471,
"close": 1494,
"high": 1507,
"low": 1494,
"marketId": 100022,
"open": 1507,
"quoteVolumeHi": 0,
"quoteVolumeLo": 707108
},
{
"baseVolumeHi": 0,
"baseVolumeLo": 357,
"close": 6751,
"high": 6751,
"low": 6127,
"marketId": 100030,
"open": 6319,
"quoteVolumeHi": 0,
"quoteVolumeLo": 2286072
}
],
"tops": [
{
"askPrice": 1571,
"askQuantity": 19771,
"bidPrice": 1556,
"bidQuantity": 21427,
"lastPrice": 1494,
"marketId": 100022,
"marketState": 1,
"rolling24hPrice": 1507,
"transactTime": 1721103999522960600
},
{
"askPrice": 7870,
"askQuantity": 3240,
"bidPrice": 7561,
"bidQuantity": 5622,
"lastPrice": 6751,
"marketId": 100030,
"marketState": 1,
"rolling24hPrice": 6319,
"transactTime": 1721103999911184000
}
]
}
}
get
Responses
200Success
application/json
500
An error was encountered while processing the request.
application/json
get
GET /parsed/tickers HTTP/1.1
Host:
Accept: */*
{
"result": [
{
"ask": 101.17,
"base_currency": "SOL",
"base_volume": 29332.58,
"bid": 101.16,
"high": 109.69,
"last_price": 101.17,
"low": 100.23,
"open": 107.72,
"quote_currency": "USDC",
"quote_volume": 3062431.887,
"ticker_id": "SOLUSDC",
"timestamp": 1708521090000
}
]
}
get
Path parameters
market_symbolstringRequired
Query parameters
depthinteger · uint | nullableOptional
Responses
200Success
application/json
500
An error was encountered while processing the request.
application/json
get
GET /parsed/book/{market_symbol}/snapshot HTTP/1.1
Host:
Accept: */*
{
"result": {
"asks": [
[
101.85,
0.14
],
[
101.86,
1.16
],
[
101.87,
1.85
],
[
101.88,
6.13
]
],
"bids": [
[
101.84,
2.56
],
[
101.83,
5.51
],
[
101.82,
5.86
],
[
101.81,
1.26
]
],
"ticker_id": "SOLUSDC",
"timestamp": 1708542402778
}
}
get
Path parameters
market_symbolstringRequired
Responses
200Success
application/json
500
An error was encountered while processing the request.
application/json
get
GET /parsed/book/{market_symbol}/recent-trades HTTP/1.1
Host:
Accept: */*
{
"result": {
"ticker_id": "text",
"trades": [
{
"id": 63167016,
"p": 101.12,
"q": 0.23,
"side": "Bid",
"ts": 1708542117788
}
]
}
}
Last updated