wisespace-io / binance-rs

Rust Library for the Binance API
Other
665 stars 297 forks source link

Error on sample get_depth #26

Closed antoncoding closed 5 years ago

antoncoding commented 5 years ago

Fail to make sample get_depth api call.

extern crate binance;

use binance::api::*;
use binance::market::*;

fn main() {
    let market: Market = Binance::new(None, None);

    // Order book
    match market.get_depth("ETHBTC") {
        Ok(answer) => println!("{:?}", answer),
        Err(e) => println!("Error: {}", e),
    }
}

Result

Error: invalid length 2, expected struct Bids with 3 elements at line 1 column 61

Cargo version

cargo 1.35.0 (6f3e9c367 2019-04-04)

wisespace-io commented 5 years ago

@antoncoding I released a new version with a fix, could you try it?

antoncoding commented 5 years ago

@wisespace-io It's working perfectly now! thanks for the quick fix!