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

wrong usage of string(xxxx) #148

Open gpmn opened 5 years ago

gpmn commented 5 years ago

https://github.com/bitfinexcom/bitfinex-api-go/blob/306fa24acc3e1ce636f3692293dd315e6d2fba99/v2/rest/candles.go#L101-L104

req.Params.Add("end", string(end))
req.Params.Add("start", string(start))
req.Params.Add("limit", string(limit))
req.Params.Add("sort", string(sort))

should be changed to fmt.Sprintf("%d", end), string(100) ==> "d" string(101) ==> "e" that's not your wish.

gpmn commented 5 years ago

https://github.com/gpmn/bitfinex-api-go/blob/135a91fc446e18a239703ab5043b0e20e3f137dc/v2/rest/candles.go#L100

I fixed it, also I have changed somthing other than this issue, unless this, the these four args are all wrong. You can refer my branch, wish it could be a little help.