The ticker feed returns ticker information about listed products. Only tradeable markets are available via individual WebSocket market data feeds.
Authentication is not required.
Feed |
Event Type |
Permissible API Keys |
ticker
|
subscribe / unsubscribe
|
N/A |
Sample Sent Message |
{ "event":"subscribe", "feed":"ticker", "product_ids":[ "PI_XBTUSD" ] } |
Sample Return if Successful. (A result message is received per product id) |
{
|
Field |
Type | Description |
event
|
string | The result, subscribed or subscribed_failed or unsubscribed or unsubscribed_failed |
feed | string | The requested subscription feed |
product_ids | list of strings | A list of strings which represent the products that user will receive information upon |
The subscription data will return values for all fields even if the value of only a single field has changed since the last payload.
Sample Subscription Data |
{ "time": 1612270825253, "feed": "ticker", "product_id": "PI_XBTUSD", "bid": 34832.5, "ask": 34847.5, "bid_size": 42864, "ask_size": 2300, "volume": 262306237, "dtm": 0, "leverage": "50x", "index": 34803.45, "premium": 0.1, "last": 34852, "change": 2.995109121267192, "funding_rate": 3.891007752e-9, "funding_rate_prediction": 4.2233756e-9, "suspended": false, "tag": "perpetual", "pair": "XBT:USD", "openInterest": 107706940, "markPrice": 34844.25, "maturityTime": 0, "relative_funding_rate": 0.000135046879166667, "relative_funding_rate_prediction": 0.000146960125, "next_funding_rate_time": 1612281600000 } |
Field |
Type | Description |
time | positive integer | The UTC time of the server in milliseconds |
feed | string | The subscribed feed |
product_id | string | The subscribed product (referred also as instrument or symbol) |
bid | positive float |
The price of the current best bid |
ask | positive float |
The price of the current best ask |
bid_size | positive float |
The size of the current best bid |
ask_size | positive float |
The size of the current best ask |
volume | positive float |
The sum of the sizes of all fills observed in the last 24 hours |
dtm | positive integer |
The days until maturity |
leverage | string |
The leverage of the product |
index | positive float |
The real time index of the product |
premium | float |
The premium associated with the product |
last | positive float |
The price of the last trade of the product |
change | float | The 24h change in price |
suspended | string | True if the market is suspended, false otherwise |
tag | string |
Currently can be 'perpetual', 'month' or 'quarter'. Other tags may be added without notice. |
pair | string |
The currency pair of the instrument |
openInterest | float |
The current open interest of the instrument |
markPrice | float |
The market price of the instrument |
maturityTime | positive integer |
The UTC time, in milliseconds, at which the contract will stop trading |
funding_rate (Perpetuals only) |
float |
The current funding rate. If zero, field is not populated. |
funding_rate_prediction (Perpetuals only) |
float |
The estimated next funding rate. If zero, field is not populated. |
relative_funding_rate (Perpetuals only) |
float |
The absolute funding rate relative to the spot price at the time of funding rate calculation. If zero, field is not populated. |
relative_funding_rate_prediction (Perpetuals only) |
float |
The estimated next absolute funding rate relative to the current spot price. If zero, field is not populated. |
next_funding_rate_time (Perpetuals only) |
float | The time until next funding rate in milliseconds. |
Sample Return if Unsuccessful |
{ "event":"error", "message":"Invalid product id" } |
Field |
Type | Description |
event | string | Always error |
message | string |
An error message out of:
|