Version 2
Mark Price Feed
The Mark Price feed provides mark price updates for a subscribed perpetual instrument.
Subscribe
Send a JSON formatted message with following fields upon connecting to v2/marketdata
:
Field Name | Type | Values |
---|---|---|
type | string | subscribe |
subscriptions | array | |
-- name | string | mark_price |
-- symbols | array | ["BTC-GUSD-PERP", ...] |
Response
Field Name | Type | Values |
---|---|---|
type | string | mark_price_updates |
symbol | string | BTC-GUSD-PERP |
changes | array | change to mark price |
All elements of changes
share the following fields:
Field Name | Type | Values |
---|---|---|
timestamp | integer | nanoseconds |
mark_price | string | mark price |
spot_index | string | spot index |
Examples
JSON Mark Price Subscription Message
{ "type": "subscribe", "subscriptions": [ { "name": "mark_price", "symbols": ["BTC-GUSD-PERP"] } ] }json
JSON Mark Price Response
{ "type": "mark_price_updates", "symbol": "BTCGUSDPERP", "changes": [ { "timestamp": 1673932381478308169, "mark_price": "21154.098", "spot_index": "21175.27333" } ] }json