Skip to content

BitMEX Websocket QUOTE Stream

DreamingLambos edited this page Jan 14, 2019 · 1 revision

Please refer to the Home Page for the common logic to interpret messages

QUOTE STREAM

The QUOTE stream is a stream that updates you about the current BID and ASK for an instrument, this include the highest Bid Price and its size and the lowest Ask Price and its size.

The Quote is practically the current trading price of an instrument.

PROPERTIES

Properties included for the Quote object are:

  • Timestamp, for the timestamp of the value
  • Symbol, a string for the instrument example XBTUSD
  • Ask Price, current lowest ask price
  • Ask Size, current ask size
  • Bid Price, current highest bid price
  • Bid Size, current bid size

METHODS

The only method of the class is UpdateFromWebsocket which is called once a message containing "quote" is received and deserialised. The method updates the object's values with the new ones.

NOTE

Since there can be several updates of price/size between a websocket message and another, the message almost always includes a series of quotes. During the deserialization we also keep the latest value of the quote, which is the most recent.

Clone this wiki locally