wisespace-io / binance-rs

Rust Library for the Binance API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing `use binance::model::*` in readme market data example

qtfkwk opened this issue · comments

0.18.4 market data example in readme produces the error during cargo build:

error[E0412]: cannot find type `KlineSummary` in this scope
  --> src/bin/binance-kline.rs:84:32
   |
84 |                     let kline: KlineSummary = klines[0].clone(); // You need to iterate over the klines
   |                                ^^^^^^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
1  | use binance::futures::model::KlineSummary;
   |

For more information about this error, try `rustc --explain E0412`.
error: could not compile `cc` due to previous error

fix: add use binance::model::*;

@qtfkwk Thank you for pointing it out.