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 | Market list. Empty list to subscribe to all markets. |
- 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 |
mark_price | string | Mark price |
- Example:
{
"method": "index.update",
"data": {
"market": "BTCUSDT",
"index_price": "20000",
"mark_price": "20000"
},
"id": null
}
Cancel Index Subscription
- Method:
index.unsubscribe
- Parameters:
Parameter Name | Required | Type | Notes |
---|---|---|---|
market_list | true | []string | Market list. Empty list to subscribe to all markets. |
- Example:
// Unsubscribe to a singular market
{
"method": "index.unsubscribe",
"params": {"market_list": ["BTCUSDT"]},
"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
}