Skip to main content

parse_binance_klines

Function parse_binance_klines 

Source
pub fn parse_binance_klines(json: &str) -> Result<Vec<Candle>>
Expand description

Parse a Binance GET /api/v3/klines response (a JSON array of kline arrays) into candles. Each kline is [openTime_ms, "open", "high", "low", "close", "volume", …] where the OHLCV fields are JSON strings; the open time is milliseconds since epoch and is converted to seconds. This is always available (no HTTP dependency) so the parser can be tested offline.