Open pavelsmolensky opened 3 years ago
Version: github.com/bitvavo/go-bitvavo-api v1.2.0
b = bitvavo.Bitvavo{ ApiKey: "***", ApiSecret: "***", RestUrl: "https://api.bitvavo.com/v2", WsUrl: "wss://ws.bitvavo.com/v2/", AccessWindow: 10000, Debugging: false, } _, err := b.Markets(map[string]string{"market": "BTC-EUR"}) if err != nil { log.Fatal(err) }
Results in
Error returned by API: errorCode:0, Message:
The root cause is that response for /markets?market=BTC-EUR contains json object, instead of json array expected by the lib: https://github.com/bitvavo/go-bitvavo-api/blob/master/bitvavo.go#L716
Underlying error is json: cannot unmarshal object into Go value of type []bitvavo.Markets
json: cannot unmarshal object into Go value of type []bitvavo.Markets
Have the same issue..
Version: github.com/bitvavo/go-bitvavo-api v1.2.0
Results in
Error returned by API: errorCode:0, Message:
The root cause is that response for /markets?market=BTC-EUR contains json object, instead of json array expected by the lib: https://github.com/bitvavo/go-bitvavo-api/blob/master/bitvavo.go#L716
Underlying error is
json: cannot unmarshal object into Go value of type []bitvavo.Markets