Coin Data API
BBX OpenAPI provides a complete set of coin data endpoints, making it easy to fetch a wide range of cryptocurrency information. This document covers all coin-related endpoints, including querying the coin list and retrieving real-time ticker data.
Get Coin List
This endpoint returns basic information for all supported coins.
Request Parameters
- Name
AccessKeyId- Type
- string
- Description
User access key ID
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Response Data
- Name
success- Type
- boolean
- Description
Endpoint status
- Name
errorCode- Type
- integer
- Description
Status code
- Name
error- Type
- string
- Description
Error message
- Name
data- Type
- array
- Description
Coin list
- Name
coin_key- Type
- string
- Description
Coin primary key
- Name
hash_key- Type
- string
- Description
Coin hash key
- Name
show- Type
- string
- Description
Ticker symbol
- Name
cn_name- Type
- string
- Description
Coin name (Chinese)
- Name
en_name- Type
- string
- Description
Coin name (English)
Request
curl -G https://open.bbx.com/api/upgrade/v2/coin \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"success": true,
"errorCode": 200,
"data": [
{
"coin_key": "bitcoin",
"show": "BTC",
"cn_name": "比特币",
"en_name": "Bitcoin",
"hash_key": "A92455EC"
}
]
}
Get Coin Ticker
This endpoint returns real-time ticker data for coins, including price, change percentage, trading volume, and more.
Request Parameters
- Name
coin_list- Type
- string
- Description
Comma-separated list of coin primary keys (maximum: 100)
- Name
AccessKeyId- Type
- string
- Description
User access key ID
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Response Data
- Name
success- Type
- boolean
- Description
Endpoint status
- Name
errorCode- Type
- integer
- Description
Status code
- Name
error- Type
- string
- Description
Error message
- Name
data- Type
- array
- Description
Response data
- Name
coin_key- Type
- string
- Description
Coin primary key
- Name
price_cny- Type
- string
- Description
Latest price (CNY)
- Name
price_usd- Type
- string
- Description
Latest price (USD)
- Name
degree_24h_cny- Type
- string
- Description
24h change (CNY)
- Name
degree_24h_usd- Type
- string
- Description
24h change (USD)
- Name
degree_7day_cny- Type
- string
- Description
7d change (CNY)
- Name
degree_7day_usd- Type
- string
- Description
7d change (USD)
- Name
supply_cny- Type
- string
- Description
Market cap (CNY)
- Name
supply_usd- Type
- string
- Description
Market cap (USD)
- Name
trade_24h_cny- Type
- string
- Description
24h turnover (CNY)
- Name
trade_24h_usd- Type
- string
- Description
24h turnover (USD)
- Name
fundNetIn_24h_cny- Type
- string
- Description
24h net inflow (CNY)
- Name
fundNetIn_24h_usd- Type
- string
- Description
24h net inflow (USD)
- Name
vol_24h- Type
- string
- Description
24h trading volume
Request
curl -G https://open.bbx.com/api/upgrade/v2/coin/ticker \
-d coin_list=bitcoin,litecoin \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"success": true,
"errorCode": 200,
"data": [
{
"coin_key": "bitcoin",
"price_cny": "796667.59",
"price_usd": "111412.69",
"degree_24h_cny": "1.39",
"degree_24h_usd": "1.43",
"degree_7day_cny": "-2.19",
"degree_7day_usd": "-1.71",
"supply_cny": "15863322233236",
"supply_usd": "2218460276941",
"trade_24h_cny": "375919523902.574390",
"trade_24h_usd": "52536058990.007078",
"fundNetIn_24h_cny": "-5335318539.265308",
"fundNetIn_24h_usd": "-745702215.834852",
"vol_24h": "475754.690806"
}
]
}
Get Coin Profile
This endpoint returns base profile/config information for coins, including descriptions, whitepapers, and issuance information.
Request Parameters
- Name
coin_list- Type
- string
- Description
Comma-separated list of coin primary keys (maximum: 100)
- Name
AccessKeyId- Type
- string
- Description
User access key ID
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Response Data
- Name
success- Type
- boolean
- Description
Endpoint status
- Name
errorCode- Type
- integer
- Description
Status code
- Name
error- Type
- string
- Description
Error message
- Name
data- Type
- array
- Description
Response data
- Name
coin_key- Type
- string
- Description
Coin primary key
- Name
show- Type
- string
- Description
Ticker symbol (empty string means no data)
- Name
cnName- Type
- string
- Description
Coin name (Chinese; empty string means no data)
- Name
enName- Type
- string
- Description
Coin name (English; empty string means no data)
- Name
describe- Type
- string
- Description
Coin description (empty string means no data)
- Name
whitePaper- Type
- string
- Description
Whitepaper URL (empty string means no data)
- Name
officialUrl- Type
- string
- Description
Official website URL (empty string means no data)
- Name
publishAmount- Type
- string
- Description
Issuance amount / total supply (empty string means no data)
- Name
distribution- Type
- array
- Description
Token distribution
- Name
ico- Type
- string
- Description
Type (empty string means no data)
- Name
foundation- Type
- string
- Description
Percentage (empty string means no data)
Request
curl -G https://open.bbx.com/api/upgrade/v2/coin/config \
-d coin_list=bitcoin \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"success": true,
"errorCode": 200,
"data": [
{
"coin_key": "bitcoin",
"show": "BTC",
"cnName": "比特币",
"enName": "Bitcoin",
"describe": "比特币(BitCoin)的概念最初由中本聪在2009年提出...",
"whitePaper": "https://bitcoin.org/files/bitcoin-paper/bitcoin_zh_cn.pdf",
"officialUrl": "https://bitcoin.org/en/",
"publishAmount": "21000000",
"distribution": [
{
"ico": "团队",
"foundation": "8.3"
}
]
}
]
}
Get Funding Rate History
This endpoint returns funding rate history for a specified trading pair.
Request Parameters
- Name
symbol- Type
- string
- Description
Trading pair, e.g. "btcswapusdt:okcoinfutures"
- Name
interval- Type
- string
- Description
Time interval, supported: 1m, 3m, 5m, 15m, 30m, 1h, 4h, 6h, 8h, 12h, 1d, 1w
- Name
limit- Type
- integer
- Description
Maximum number of records to return
- Name
start_time- Type
- integer
- Description
Start timestamp (milliseconds), optional
- Name
end_time- Type
- integer
- Description
End timestamp (milliseconds), optional
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
futures:FUNDING_RATE_HISTORYpermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Supported Trading Pairs
| symbol | Description |
|---|---|
| btcswapusdt:okcoinfutures | OKX futures |
| btcswapusdt:binance | Binance futures |
| btcswapusdt:bybit | Bybit futures |
| btcswapusdt:gate | Gate futures |
| btcswapusdt:hbdm | HBDM futures |
| More BTC-related pairs... | Supports 50+ BTC-related pairs |
Response Data
- Name
code- Type
- integer
- Description
Status code
- Name
message- Type
- string
- Description
Message
- Name
data- Type
- array
- Description
Funding rate history
- Name
time- Type
- integer
- Description
Timestamp (milliseconds)
- Name
open- Type
- string
- Description
Open funding rate
- Name
high- Type
- string
- Description
High funding rate
- Name
low- Type
- string
- Description
Low funding rate
- Name
close- Type
- string
- Description
Close funding rate
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/funding-rate/history \
-d symbol=btcswapusdt:okcoinfutures \
-d interval=15m \
-d limit=100 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"message": "success",
"data": [
{
"time": 1749026400000,
"open": "0.0001",
"high": "0.0001",
"low": "0.0001",
"close": "0.0001"
}
]
}
OHLC values are raw funding rate numbers. For example, 0.0001 means 0.01%.
Get Weighted Funding Rate History
This endpoint returns volume-weighted funding rate history for the specified symbol.
Request Parameters
- Name
symbol- Type
- string
- Description
Symbol, e.g. "btcswapusdt"
- Name
interval- Type
- string
- Description
Time interval, supported: 1m, 3m, 5m, 15m, 30m, 1h, 4h, 6h, 8h, 12h, 1d, 1w
- Name
limit- Type
- integer
- Description
Maximum number of records to return
- Name
start_time- Type
- integer
- Description
Start timestamp (milliseconds), optional
- Name
end_time- Type
- integer
- Description
End timestamp (milliseconds), optional
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
futures:WEIGHTED_FUNDING_RATEpermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Supported Symbols
| symbol | Aggregated exchanges |
|---|---|
| btcswapusdt | OKX, Binance |
Response Data
- Name
code- Type
- string
- Description
Status code
- Name
msg- Type
- string
- Description
Message
- Name
data- Type
- array
- Description
Weighted funding rate history
- Name
time- Type
- integer
- Description
Timestamp (milliseconds)
- Name
open- Type
- string
- Description
Open weighted funding rate
- Name
high- Type
- string
- Description
High weighted funding rate
- Name
low- Type
- string
- Description
Low weighted funding rate
- Name
close- Type
- string
- Description
Close weighted funding rate
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/funding-rate/vol-weight-history \
-d symbol=btcswapusdt \
-d interval=15m \
-d limit=100 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1749026520000,
"open": "2.939e-05",
"high": "2.939e-05",
"low": "2.939e-05",
"close": "2.939e-05"
}
]
}
OHLC values are raw weighted funding rate numbers. For example, 2.939e-05 means 0.002939%.
Get Aggregated Stablecoin-Margin Open Interest History
This endpoint returns aggregated stablecoin-margin open interest history for the specified symbol.
Request Parameters
- Name
symbol- Type
- string
- Description
Coin symbol, e.g. "BTC"
- Name
interval- Type
- string
- Description
Time interval, supported: 1m, 3m, 5m, 15m, 30m, 1h, 4h, 6h, 8h, 12h, 1d, 1w
- Name
limit- Type
- integer
- Description
Maximum number of records to return
- Name
start_time- Type
- integer
- Description
Start timestamp (milliseconds), optional
- Name
end_time- Type
- integer
- Description
End timestamp (milliseconds), optional
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
futures:STABLECOIN_MARGIN_POSITIONpermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Supported Symbols
| symbol | Aggregated exchanges |
|---|---|
| BTC | OKX, Binance, Bybit, Bitget, Gate, HBDM, Pionex |
Response Data
- Name
code- Type
- string
- Description
Status code
- Name
msg- Type
- string
- Description
Message
- Name
data- Type
- array
- Description
Aggregated stablecoin-margin open interest history
- Name
time- Type
- integer
- Description
Timestamp (milliseconds)
- Name
open- Type
- string
- Description
Open open interest
- Name
high- Type
- string
- Description
High open interest
- Name
low- Type
- string
- Description
Low open interest
- Name
close- Type
- string
- Description
Close open interest
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/open-interest/aggregated-stablecoin-history \
-d symbol=BTC \
-d interval=15m \
-d limit=100 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1749026700000,
"open": "291600",
"high": "291600",
"low": "291598",
"close": "291598"
}
]
}
For BTC aggregated stablecoin-margin open interest, the OHLC unit is BTC.
Get Aggregated Coin-Margin Open Interest History
This endpoint returns aggregated coin-margin open interest history for the specified symbol.
Request Parameters
- Name
symbol- Type
- string
- Description
Coin symbol, e.g. "BTC"
- Name
interval- Type
- string
- Description
Time interval, supported: 1m, 2m, 15m, 30m
- Name
limit- Type
- integer
- Description
Maximum number of records to return
- Name
start_time- Type
- integer
- Description
Start timestamp (milliseconds), optional
- Name
end_time- Type
- integer
- Description
End timestamp (milliseconds), optional
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
futures:COIN_MARGIN_POSITIONpermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Supported Symbols
| symbol | Aggregated exchanges |
|---|---|
| BTC | OKX, Binance, Bybit, Bitget, Gate, HBDM, Pionex |
Response Data
- Name
code- Type
- string
- Description
Status code
- Name
msg- Type
- string
- Description
Message
- Name
data- Type
- array
- Description
Aggregated coin-margin open interest history
- Name
time- Type
- integer
- Description
Timestamp (milliseconds)
- Name
open- Type
- string
- Description
Open open interest
- Name
high- Type
- string
- Description
High open interest
- Name
low- Type
- string
- Description
Low open interest
- Name
close- Type
- string
- Description
Close open interest
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/open-interest/aggregated-coin-margin-history \
-d symbol=BTC \
-d interval=15m \
-d limit=100 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1749026640000,
"open": "6.721158125e+09",
"high": "1.5884201391e+10",
"low": "6.721158125e+09",
"close": "1.5881786057e+10"
}
]
}
OHLC values represent aggregated coin-margin open interest, and the unit is USD.
Get Liquidation Orders History
This endpoint returns liquidation orders history for a specified trading pair.
Request Parameters
- Name
symbol- Type
- string
- Description
Trading pair identifier, e.g. "btcswapusdt:binance"
- Name
interval- Type
- string
- Description
Time interval, supported: 1m, 2m, 15m, 30m
- Name
limit- Type
- integer
- Description
Maximum number of records to return (default: 10)
- Name
start_time- Type
- integer
- Description
Start timestamp (milliseconds), optional
- Name
end_time- Type
- integer
- Description
End timestamp (milliseconds), optional
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
futures:LIQUIDATION_ORDERSpermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Supported Trading Pairs
| symbol | Description |
|---|---|
| btcswapusdt:binance | Binance BTC pair |
| btcswapusdt:okcoinfutures | OKX BTC pair |
Response Data
- Name
code- Type
- string
- Description
Status code
- Name
msg- Type
- string
- Description
Message
- Name
data- Type
- array
- Description
Liquidation orders history
- Name
time- Type
- integer
- Description
Data timestamp (milliseconds)
- Name
long_liquidation_usd- Type
- string
- Description
Long liquidation amount (USD)
- Name
short_liquidation_usd- Type
- string
- Description
Short liquidation amount (USD)
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/liquidation/history \
-d symbol=btcswapusdt:binance \
-d interval=15m \
-d limit=100 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1700000000000,
"long_liquidation_usd": "1500000.50000",
"short_liquidation_usd": "2300000.75000"
},
{
"time": 1700003600000,
"long_liquidation_usd": "1200000.25000",
"short_liquidation_usd": "1800000.35000"
}
]
}
Get Historical Estimated Liquidation Map
This endpoint returns historical estimated liquidation map data for a specified trading pair.
Request Parameters
- Name
dbkey- Type
- string
- Description
Trading pair identifier, e.g. "btcswapusdt:binance"
- Name
leverage- Type
- string
- Description
Leverage multiplier, e.g. "50". If empty, returns all leverage multipliers.
- Name
cycle- Type
- string
- Description
Time window, supported: 24h, 7d
- Name
limit- Type
- integer
- Description
Maximum number of records to return (default: 100)
- Name
start_time- Type
- integer
- Description
Start timestamp (milliseconds), optional
- Name
end_time- Type
- integer
- Description
End timestamp (milliseconds), optional
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
futures:ESTIMATED_LIQUIDATION_HISTORYpermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Supported Trading Pairs
| dbkey | Description |
|---|---|
| solswapusdt:binance | Binance SOL futures |
| btcswapusdt:binance | Binance BTC futures |
| ethswapusdt:binance | Binance ETH futures |
| btcswapusdt:okcoinfutures | OKX BTC futures |
| ethswapusdt:okcoinfutures | OKX ETH futures |
| solswapusdt:okcoinfutures | OKX SOL futures |
Supported Leverage Multipliers
| leverage | Description |
|---|---|
| 10 | 10x leverage |
| 25 | 25x leverage |
| 50 | 50x leverage |
| 100 | 100x leverage |
Response Data
- Name
code- Type
- string
- Description
Status code
- Name
msg- Type
- string
- Description
Message
- Name
data- Type
- array
- Description
Estimated liquidation map history
- Name
time- Type
- integer
- Description
Data timestamp (milliseconds)
- Name
data_map- Type
- object
- Description
Liquidation map data grouped by leverage
- Name
mapping- Type
- array
- Description
Field mapping, fixed as ["from", "to", "turnover"]
- Name
short- Type
- array
- Description
Short-side liquidation data, format: [[fromPrice, toPrice, turnover], ...]
- Name
long- Type
- array
- Description
Long-side liquidation data, format: [[fromPrice, toPrice, turnover], ...]
- Name
timestamp- Type
- integer
- Description
Calculation timestamp
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/estimated-liquidation/history \
-d dbkey=btcswapusdt:binance \
-d leverage=50 \
-d cycle=24h \
-d limit=100 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1700000000000,
"data_map": {
"50": {
"mapping": ["from", "to", "turnover"],
"short": [
[184601.0, 104672.4, 66262.0273686],
[104672.4, 104743.8, 567185.0349501]
],
"long": [
[100499.0, 100567.6, 39065.6318472],
[100567.6, 100636.2, 146365.2013005]
],
"timestamp": 1749783658
}
}
}
]
}
Get Liquidation Map
Based on historical estimated liquidation map data, this endpoint returns the latest data point to help monitor the distribution of liquidation risk in real time.
Request Parameters
- Name
dbkey- Type
- string
- Description
Trading pair identifier, e.g. "btcswapusdt:binance"
- Name
cycle- Type
- string
- Description
Time window, supported: 24h, 7d
- Name
leverage- Type
- string
- Description
Leverage multiplier, e.g. "50". If empty, returns all leverage multipliers.
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
futures:LIQUIDATION_MAPpermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Supported Trading Pairs
| dbkey | Description |
|---|---|
| solswapusdt:binance | Binance SOL futures |
| btcswapusdt:binance | Binance BTC futures |
| ethswapusdt:binance | Binance ETH futures |
| btcswapusdt:okcoinfutures | OKX BTC futures |
| ethswapusdt:okcoinfutures | OKX ETH futures |
| solswapusdt:okcoinfutures | OKX SOL futures |
Supported Leverage Multipliers
| leverage | Description |
|---|---|
| 10 | 10x leverage |
| 25 | 25x leverage |
| 50 | 50x leverage |
| 100 | 100x leverage |
Response Data
- Name
code- Type
- string
- Description
Status code
- Name
msg- Type
- string
- Description
Message
- Name
data- Type
- object
- Description
Latest liquidation map data
- Name
time- Type
- integer
- Description
Data timestamp (milliseconds)
- Name
data_map- Type
- object
- Description
Liquidation map data grouped by leverage
- Name
mapping- Type
- array
- Description
Field mapping, fixed as ["from", "to", "turnover"]
- Name
short- Type
- array
- Description
Short-side liquidation data, format: [[fromPrice, toPrice, turnover], ...]
- Name
long- Type
- array
- Description
Long-side liquidation data, format: [[fromPrice, toPrice, turnover], ...]
- Name
timestamp- Type
- integer
- Description
Calculation timestamp
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/liquidation/map \
-d dbkey=btcswapusdt:binance \
-d cycle=24h \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"msg": "success",
"data": {
"time": 1700000000000,
"data_map": {
"50": {
"mapping": ["from", "to", "turnover"],
"short": [
[184601.0, 104672.4, 66262.0273686],
[104672.4, 104743.8, 567185.0349501]
],
"long": [
[100499.0, 100567.6, 39065.6318472],
[100567.6, 100636.2, 146365.2013005]
],
"timestamp": 1749783658
},
"25": {
"mapping": ["from", "to", "turnover"],
"short": [
[184601.0, 104672.4, 66262.0273686],
[104672.4, 104743.8, 567185.0349501]
],
"long": [
[100499.0, 100567.6, 39065.6318472],
[100567.6, 100636.2, 146365.2013005]
],
"timestamp": 1749783658
}
}
}
}
This endpoint queries historical estimated liquidation map data within the last 1 hour and returns the most recent data point by timestamp.
Get Historical Order Book Depth
This endpoint returns historical order book depth data for a specified trading pair.
Request Parameters
- Name
key- Type
- string
- Description
Pair:exchange, e.g. "btcswapusdt:okcoinfutures"
- Name
start_time- Type
- integer
- Description
Start timestamp (milliseconds). If omitted, the most recent data is returned.
- Name
end_time- Type
- integer
- Description
End timestamp (milliseconds)
- Name
limit- Type
- integer
- Description
Maximum number of records to return (default: 100, maximum: 1000)
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
trading_pair:HISTORICAL_DEPTHpermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Supported Trading Pairs
| key | Description |
|---|---|
| btcswapusdt:okcoinfutures | OKX BTC perpetual futures |
| ethswapusdt:okcoinfutures | OKX ETH perpetual futures |
Response Data
- Name
code- Type
- string
- Description
Status code
- Name
msg- Type
- string
- Description
Message
- Name
data- Type
- array
- Description
Historical order book depth data
- Name
time- Type
- integer
- Description
Data timestamp (milliseconds)
- Name
asks- Type
- array
- Description
Ask-side depth, format: [[price, amount], ...], sorted by price ascending
- Name
bids- Type
- array
- Description
Bid-side depth, format: [[price, amount], ...], sorted by price descending
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/historical-depth \
-d key=btcswapusdt:okcoinfutures \
-d limit=100 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"msg": "success",
"data": [
{
"time": 1700000000000,
"asks": [
[104150.5, 2.5],
[104151.0, 1.8],
[104152.0, 3.2]
],
"bids": [
[104149.5, 1.9],
[104149.0, 2.1],
[104148.0, 1.5]
]
}
]
}
Get Super Depth History
This endpoint returns historical large-order depth data for a specified trading pair, which can be used to monitor changes in large orders in the market.
Request Parameters
- Name
key- Type
- string
- Description
Pair:exchange, e.g. "btcswapusdt:okcoinfutures"
- Name
start_time- Type
- integer
- Description
Start timestamp (milliseconds). If omitted, returns data from the last 24 hours by default.
- Name
end_time- Type
- integer
- Description
End timestamp (milliseconds)
- Name
amount- Type
- integer
- Description
Amount threshold (default: 10000)
- Name
limit- Type
- integer
- Description
Maximum number of records to return (default: 100, maximum: 1000)
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
trading_pair:SUPER_DEPTH_HISTORYpermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Supported Trading Pairs
| key | Description |
|---|---|
| btcswapusdt:okcoinfutures | OKX BTC perpetual futures |
| ethswapusdt:okcoinfutures | OKX ETH perpetual futures |
| btcswapusdt:binance | Binance BTC perpetual futures |
Response Data
- Name
code- Type
- string
- Description
Status code
- Name
msg- Type
- string
- Description
Message
- Name
data- Type
- array
- Description
Super depth history
- Name
id- Type
- string
- Description
Unique order identifier
- Name
coin_type- Type
- string
- Description
Coin type
- Name
platform- Type
- string
- Description
Exchange platform
- Name
depth_type- Type
- string
- Description
Order side: "bid" for buy orders, "ask" for sell orders
- Name
depth_price- Type
- number
- Description
Order price
- Name
depth_amount- Type
- number
- Description
Order amount (USDT)
- Name
depth_vol- Type
- number
- Description
Order quantity
- Name
depth_state- Type
- integer
- Description
Order state (0=pending, 1=confirmed, 2=partially filled, 3=fully filled, 4=canceled)
- Name
hold_time- Type
- integer
- Description
Order duration (milliseconds)
- Name
trade_amount- Type
- number
- Description
Executed trade amount
- Name
trade_vol- Type
- number
- Description
Executed trade quantity
- Name
transaction_ratio- Type
- number
- Description
Fill ratio (%)
- Name
create_time- Type
- integer
- Description
Order creation time (timestamp in milliseconds)
- Name
start_time- Type
- integer
- Description
Order start time (timestamp in milliseconds)
- Name
update_time- Type
- integer
- Description
Last update time (timestamp in milliseconds)
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/super-depth/history \
-d key=btcswapusdt:okcoinfutures \
-d amount=10000 \
-d limit=100 \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"msg": "success",
"data": [
{
"id": "mIRLwpYBzW61Mmzuz0tL",
"cache_bbx_id": 110000000332883550,
"coin_type": "btc",
"coin": "btcswapusdt",
"platform": "okcoinfutures",
"trade_type": "futures",
"depth_type": "bid",
"depth_price": 104100,
"depth_amount": 5000.16,
"depth_turnover": 5205166.56,
"depth_vol": 50.0016,
"create_time": 1747016470308,
"start_time": 1747016469005,
"update_time": 1747016610234,
"update_state_time": 1747016610234,
"depth_state": 2,
"depth_status": 0,
"show_state": 1,
"bait_state": 0,
"hold_time": 131567,
"order_over_time": 1747016599006,
"order_over_status": 0,
"order_miss_time": 1747016609006,
"order_miss_price": 104093.4,
"uporder_time": 1747016609006,
"trade_start_time": 1747016572528,
"trade_stop_time": 1747016600572,
"trade_miss_time": 1747016600572,
"trade_miss_price": 104099.9,
"uptrade_time": 1747016606844,
"trade_price": 104112.1,
"trade_amount": 10021.24,
"trade_turnover": 10432110.84,
"trade_vol": 100.2124,
"trade_count": 433,
"transaction_ratio": 2.00419,
"high_amount": 10095.76,
"high_turnover": 10509686.16,
"high_vol": 100.9576,
"high_trade_amount": 1122.3,
"high_trade_turnover": 1168314.3,
"high_trade_vol": 11.223,
"last_amount": 8053.88,
"last_turnover": 8384089.08,
"last_vol": 80.5388,
"last_check_amount": 1875.56,
"miss_price": 104099.9,
"miss_time": 1747016600572,
"position_start": 2278885.09,
"position_start_vol": 22788.8509,
"position_start_turnover": 2372319378.69001,
"position_stop": 2282126.8,
"position_stop_vol": 22821.268,
"position_stop_turnover": 2375693998.8,
"position_sub": 3241.7099999999,
"position_sub_vol": 32.4171,
"position_sub_turnover": 3374620.1099999,
"fake_price": 104208.598273844
}
]
}
This endpoint can be used for large-order monitoring, liquidity analysis, and market sentiment analysis. Order state: 0=pending, 1=confirmed, 2=partially filled, 3=fully filled, 4=canceled.
Field Notes:
depth_type: Order side ("bid" for buy orders, "ask" for sell orders)depth_price: Order pricedepth_amount: Order amount (USDT)depth_vol: Order quantity (BTC)depth_state: Order state (0=pending, 1=confirmed, 2=partially filled, 3=fully filled, 4=canceled)hold_time: Order duration (milliseconds)trade_amount: Executed trade amounttrade_vol: Executed trade quantitytransaction_ratio: Fill ratio (%)create_time: Order creation time (timestamp in milliseconds)start_time: Order start time (timestamp in milliseconds)update_time: Last update time (timestamp in milliseconds)
Use Cases:
- Large-order monitoring: monitor changes in large orders in the market
- Liquidity analysis: analyze liquidity provision at specific price levels
- Market sentiment: infer market sentiment and trends from large-order behavior
Get Trade Data
This endpoint returns the latest trade data for a trading pair and supports both real-time queries and historical range queries.
Request Parameters
- Name
dbkey- Type
- string
- Description
Pair:exchange, e.g. "btcswapusdt:okcoinfutures"
- Name
start_time- Type
- integer
- Description
Start timestamp (milliseconds). If omitted, returns data from the last 1 hour by default.
- Name
end_time- Type
- integer
- Description
End timestamp (milliseconds)
- Name
limit- Type
- integer
- Description
Maximum number of records to return (default: 100, maximum: 1000)
- Name
AccessKeyId- Type
- string
- Description
User access key ID (requires
trading_pair:TRADE_DATApermission)
- Name
SignatureNonce- Type
- string
- Description
Signature nonce
- Name
Timestamp- Type
- string
- Description
Request timestamp (seconds), valid for 30 seconds
- Name
Signature- Type
- string
- Description
Signature generated with HmacSHA1 + Base64. See Generate API Signature
Some Supported Trading Pairs
| dbkey | Description |
|---|---|
| btcswapusdt:okcoinfutures | OKX BTC perpetual futures |
| ethswapusdt:okcoinfutures | OKX ETH perpetual futures |
| solswapusdt:okcoinfutures | OKX SOL perpetual futures |
| btcswapusdt:binance | Binance BTC perpetual futures |
| ethswapusdt:binance | Binance ETH perpetual futures |
Response Data
- Name
code- Type
- string
- Description
Status code
- Name
msg- Type
- string
- Description
Message
- Name
data- Type
- array
- Description
Latest trade data
- Name
timestamp- Type
- string
- Description
Trade timestamp (milliseconds, string)
- Name
price- Type
- string
- Description
Trade price (string)
- Name
amount- Type
- string
- Description
Trade amount (string)
- Name
side- Type
- string
- Description
Trade side: "buy" for buy, "sell" for sell
- Name
tradeId- Type
- string
- Description
Trade ID (exchange-provided unique identifier)
Request
curl -G https://open.bbx.com/api/upgrade/v2/futures/trade-data \
-d dbkey=btcswapusdt:okcoinfutures \
-d "AccessKeyId=YOUR_ACCESS_KEY_ID" \
-d "SignatureNonce=RANDOM_NONCE" \
-d "Timestamp=CURRENT_TIMESTAMP" \
-d "Signature=YOUR_SIGNATURE"
Response
{
"code": "0",
"msg": "success",
"data": [
{
"timestamp": "1750402519156",
"price": "104672.1",
"amount": "0.07",
"side": "buy",
"tradeId": "1600028593"
},
{
"timestamp": "1750402519477",
"price": "104672.1",
"amount": "0.25",
"side": "buy",
"tradeId": "1600028594"
},
{
"timestamp": "1750402519832",
"price": "104672.1",
"amount": "0.02",
"side": "buy",
"tradeId": "1600028595"
}
]
}
Data latency is very low, supporting both real-time and historical queries. Data is sorted by the exchange’s original timestamp to ensure correct time ordering.
Data Highlights:
- Completeness: Includes full trade details such as price, amount, and side
- Time Ordering: Sorted by timestamp and supports precise time-range queries
- High Throughput: Supports large queries up to 1000 records
Use Cases:
- Trading analysis: analyze trade activity and price changes over a time range
- Market monitoring: monitor exchange trades in near real time
- Quant strategies: provide accurate trade prints for quantitative strategies
- Price discovery: study price formation using trade data
Notes:
- Use
limitto control payload size and avoid overly large responses - Long time-range queries may return large datasets; consider paging/batching
- Data is sorted by the exchange’s original timestamp to ensure correct time ordering