Market Index Subscription
Info
- The push delay of this method is about:5000ms
Market Index Subscription
- Method:
index.subscribe - Parameters:
| Parameter Name | Required | Type | Notes |
|---|---|---|---|
| market_list | true | []string | List of market names |
- Example:
// Subscribe to a singular market
{
"method": "index.subscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}
// Subscribe to multiple markets
{
"method": "index.subscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT"]},
"id": 1
}
Market Index Price Push
- Method:
index.update - Parameters:
| Parameter Name | Type | Notes |
|---|---|---|
| market | string | Market name |
| index_price | string | Index price |
- Example
{
"method": "index.update",
"data": {
"market": "BTCUSDT",
"index_price": "40000.91"
},
"id": null
}
Cancel Index Price Subscription
- Method:
index.unsubscribe
| Parameter Name | Required | Type | Notes |
|---|---|---|---|
| market_list | true | []string | List of market names. Empty list to unsubscribe to all markets. |
- Example:
// Unsubscribe to a singular market
{
"method": "index.unsubscribe",
"params": {"market_list": ["ETHUSDT"]},
"id": 1
}
// Unsubscribe to multiple markets
{
"method": "index.unsubscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT"]},
"id": 1
}
// Unsubscribe to all markets
{
"method": "index.unsubscribe",
"params": {"market_list": []},
"id": 1
}