Closed McYoloSwagHam closed 3 years ago
@McYoloSwagHam I released a new version with a possible fix. Now, we have DayTicker and DayTickerAll
If you want an individual symbol, you should use DayTicker, see example.
https://github.com/wisespace-io/binance-rs/blob/master/examples/binance_websockets.rs#L168
In case of all Symbols, you should use DayTickerAll
https://github.com/wisespace-io/binance-rs/blob/master/examples/binance_websockets.rs#L120
It is because the request to the stream !ticker@arr still returns an array as stated in the docs:
Line 103 in websockets.rs
according to my debugging,
msg.as_str()
returns a json structure that isn't an arrayThe way to fix this would be
To change the type to not be a Vec in that code, and in the Enum WebsocketEvents, for individual tickers this is the case