With the DataEvent<KrakenFuturesBookUpdate> callback parameter is impossible to get the symbol.
Piggy69 opened this issue · 1 comments
In the spot version SpotApi.SubscribeToOrderBookUpdatesAsync
, the handler callback argument DataEvent<KrakenStreamOrderBook>
contains, in the Topic property, the symbol related to the order book update since the KrakenStreamOrderBook class does not have any property referring to the updated instrument.
I was expecting a similar behavior with FuturesApi.SubscribeToOrderBookUpdatesAsync
, but for the updateHandler callback I am unable to find a property to read the instrument symbol: the KrakenFuturesBookUpdate class does not contain the Symbol property, and the Topic is always empty (null).
I think the symbol should be available (sourcing the value from the "product_id" response field) in the Topic property or as a Symbol\ProducId property of the KrakenFuturesBookUpdate class (in my opinion this latter solution would be better).
Please note the original api responses (both the snapshot and the delta data) always contains the "product_id" field.
This is the original data property of the updateHandler callback.
{"feed":"book","product_id":"PI_XBTUSD","side":"buy","seq":45798106,"price":31198.5,"qty":0.0,"timestamp":1689288009532}
but the DataEvent.Topic
property is null.
The snapshotHandler callback is ok (since the KrakenFuturesBookSnapshotUpdate class has the property Symbol populated as expected).
Has been fixed in the latest version, update now also has an update property