You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an orderbook containing prices smaller than 0.000001, i.e. those which are stringified in e-notation, is passed to Orderbook.checksumArr(), it takes pains to ensure that those are stringified without e-notation. The resulting checksum value doesn't match the checksum from the Bitfinex websocket 'book' stream. In my own rather naive implementation I just let Node.js stringify those numbers in e-notation and the checksum does match.
I only tested Orderbook.checksumArr(), not Orderbook.checksum(), but the latter looks it probably behaves in the same way.
Issue type
Brief description
When an orderbook containing prices smaller than 0.000001, i.e. those which are stringified in e-notation, is passed to
Orderbook.checksumArr()
, it takes pains to ensure that those are stringified without e-notation. The resulting checksum value doesn't match the checksum from the Bitfinex websocket 'book' stream. In my own rather naive implementation I just let Node.js stringify those numbers in e-notation and the checksum does match.I only tested
Orderbook.checksumArr()
, notOrderbook.checksum()
, but the latter looks it probably behaves in the same way.Steps to reproduce
Expected: -776929505
Result: 758960098
Subscribing to a market such as tVSYBTC where the prices are very small should give you your own real-world examples if you doubt.
Additional Notes:
ws.send(JSON.stringify({event: 'conf', flags: 131072}));
The text was updated successfully, but these errors were encountered: