bitfinexcom / bitfinex-api-go

BITFINEX Go trading API - Bitcoin, Litecoin, and Ether exchange
https://www.bitfinex.com/
MIT License
309 stars 220 forks source link

Generate checksum with raw string #150

Closed JacobPlaster closed 5 years ago

JacobPlaster commented 5 years ago

The orderbook is generated using floats which do not have high enough precision when it comes to smaller pairs such as VET/BTC. The best way to ensure that the checksum that is generated is correct is to use the exact values that are given to use via the websocket.

This pull request keeps the raw string representations of the price/amount values and uses them when buidling the checksum.