bitfinexcom / bitfinex-api-go

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

SubscribeBook to a Funding Book fUSD #206

Open djimmo opened 4 years ago

djimmo commented 4 years ago

Issue type

Brief description

When subscribing to a funding orderbook a different update format is received. For trading pairs it is PRICE, COUNT, AMOUNT but for funding this is RATE, PERIOD, COUNT, AMOUNT (found here https://docs.bitfinex.com/reference#ws-public-books). When using the UpdateWith() or SetWithSnapshot() methods on the Orderbook type the orderbook is filled incorrectly due to this different format.

Steps to reproduce

Try to fill Orderbook of fUSD

Additional Notes:

Is this functionality not yet included in this API, or am I not using it correctly?

kind regards, Djim

fshiori commented 4 years ago

Yes, it should be a bug. I think old API don't support funding, so the SDK still only support old style result. I fix REST API in #205, but I am not sure WS API used the same function.

JacobPlaster commented 4 years ago

Thanks for the PR @fshiori. I've left a comment and will test/merge once addressed