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

FieldDescriptionRequired
vCurrent price for the pairYes
cCurrent absolute change over the last 24 hoursNo
CCurrent relative change over the last 24 hours already in percentNo

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"
}



  © 2018-2023 Taurus SA. All rights reserved.