2

Trying to understand the difference between a match and ticker message type. If I understand the message types correctly, a match represents trades from a maker perspective and a ticker represents a trade from a taker perspective. Said differently, a "ticker" event could be associated with multiple "match" events because the taker's order was larger than the first order on the book. However, after monitoring for such an event on the websocket feed, I did not observe a 1 ticker to many matches occurrence.

Which leads me to believe my understanding is incorrect.

What is the difference between the match and ticker event types in the Websocket API? (Starting to think nothing, they just represent different detail)

Joseph Carroll
  • 465
  • 6
  • 15

1 Answers1

1

ticker channel describes some properties of the current state of the order book (in particular it has some pieces of information about the last match) and a message is sent on this channel whenever a (cascading) match happens.

This is a message I just got from the ticker channel (I removed some entries for brevity):

{
  'type': 'ticker',
  'product_id': 'BTC-EUR',
  'price': '41353.04',
  'best_bid': '41343.73',
  'best_ask': '41353.04',
  'side': 'buy',
  'time': '2021-10-02T20:34:01.789371Z',
  'trade_id': 50907907,
  'last_size': '0.0037041',
  ...
}

In particular, here we see that the current highest open buy order is 41343.73 and the lowest open sell order is 41353.04. I can see that the taker side is "buy" (comment from the docs: "side": "buy", // Taker side). It makes sense that the price (I assume it's the price of the last match) is at the lowest_sell order ('price': '41353.04' which probably wasn't filled 100% so it remains at this level).

Here's a matching :) match message from the matches channel which describe matches, and not the current state of the order book.

{
'type': 'match',
'trade_id': 50907907,
'maker_order_id': 'bc002935-a5ce-484c-b3e5-bc353138fe65',
'taker_order_id': 'e575a531-21a8-447d-9801-6c79b136dc0f',
'side': 'sell',
'size': '0.0037041',
'price': '41353.04',
'product_id': 'BTC-EUR',
'time': '2021-10-02T20:34:01.789371Z'
}

Here the side is "sell", from the docs of the "match" message: The side field indicates the maker order side..

hciinq
  • 53
  • 4