Prices
Prices are coming from different sources:
market
: global market price.mid
: average price between the best ask and the best bid of the platform.platform
: price of the platform which is the last trade price on the order book.auction
: theoretical auction price for auction order books.
Price
Field | Description | Required |
---|---|---|
v | Current price for the pair | Yes |
c | Current absolute change over the last 24 hours | No |
C | Current relative change over the last 24 hours already in percent | No |
Subscribe
Price topic will push to the stream any price update for the chosen category. Note that you can subscribe to multiple categories at the same time and updates will be differentiate by the topic in the message.
Request
{
"t": "*@prices@market",
"e": "tdx:subscribe"
}
Replies
After subscribing, the current prices for the category will be sent to the stream.
{
"t": "BTC/USD@prices@market",
"e": "tdx:subscription_received"
}
{
"t": "BTC/CHF@prices@market",
"e": "price",
"d": {
"v": "96556.62"
}
}
{
"t": "BTC/USD@prices@market",
"e": "price",
"d": {
"v": "96556.62",
"c": "1811.2254873992",
"C": "1.91205662167227"
}
}
Unsubscribe
Price updates can be stopped by unsubscribing to the topic.
Request
{
"t": "*@prices@market",
"e": "tdx:unsubscribe"
}
Replies
{
"t": "*@prices@market",
"e": "tdx:unsubscribe_succeeded"
}
Updated 16 days ago