tiagosiebler / bybit-api

Node.js SDK for the Bybit APIs and WebSockets, with TypeScript & browser support.
https://www.npmjs.com/package/bybit-api
MIT License
244 stars 80 forks source link

fundingRate missing in ticker delta events #329

Closed davidpccu closed 4 months ago

davidpccu commented 5 months ago

In the V5 API version, subscribe to the Public ticker stream via WebSocket In Linear/Inverse, the Response is missing the fundingRate field. https://bybit-exchange.github.io/docs/v5/websocket/public/ticker

tiagosiebler commented 4 months ago

Hey @davidpccu

Did a quick test, it's shown in the first snapshot event when first subscribing:

Screenshot 2024-04-18 at 13 54 11

The delta events don't seem to always include all of the fields. Seems like it's designed to only include a field when that value changed:

Screenshot 2024-04-18 at 13 54 53

So if you don't see fundingRate, you can assume that value hasn't changed since the last time you saw the funding rate field

tiagosiebler commented 4 months ago

The docs confirm this: "This topic utilises the snapshot field and delta field. If a response param is not found in the message, then its value has not changed."

https://bybit-exchange.github.io/docs/v5/websocket/public/ticker