Skip to main content

Crate pine_data

Crate pine_data 

Source
Expand description

Loading market data for a script to run over.

The data itself is pine_core::Data — bars plus the symbol and timeframe they belong to. This crate is the ways of getting one: a CSV file today, an exchange later.

Series history and stateful builtins accumulate as bars execute, so a script must be replayed from its first bar. Handing over the whole series at once is what makes that the only thing a caller can do.

Structs§

BinanceSource
Binance’s public klines endpoint, as a DataProvider: it fetches whatever symbol and timeframe are asked for.
KrakenSource
Kraken’s public OHLC endpoint, as a DataProvider: it fetches whatever pair and timeframe are asked for.
StaticProvider
A fixed dataset served as a provider.
YahooSource
Yahoo Finance’s chart endpoint (the one yfinance uses) as a DataProvider for equities, ETFs, indices, FX and crypto: it fetches whatever symbol and timeframe are asked for.

Enums§

DataError

Functions§

resample
Aggregate bars into tf_ms buckets (open of the first, high/low over all, close of the last, summed volume). A bucket’s time is its last constituent bar’s time — the bar it is confirmed on — so request.security can align it non-repainting.
synthetic