Available on crate feature
live-binance only.Expand description
Binance spot REST historical kline fetcher.
Where super::binance streams live klines over a WebSocket, this module
pulls historical candles from Binance’s public REST endpoint
(GET /api/v3/klines) with a single blocking request. It is the native,
dependency-free replacement for hand-rolled urllib / jackson / jsonlite
download helpers in every binding.
Example (requires the live-binance feature):
use wickra_data::live::binance::Interval;
use wickra_data::live::binance_rest::fetch_klines;
let candles = fetch_klines("BTCUSDT", Interval::OneHour, 500, None, None)?;
println!("got {} candles", candles.len());Structs§
- Binance
Rest Config - Endpoint configuration for
fetch_klines_with_config. The default points at Binance’s public production REST host; tests and Testnet users overridebase_urlto aim the request elsewhere.
Functions§
- fetch_
klines - Fetch historical klines from Binance’s production endpoint.
- fetch_
klines_ with_ config - Like
fetch_klinesbut against a customBinanceRestConfig(Testnet or a local mock server).