Backfilling API¶
Auto-generated API documentation for StreamForge backfilling.
BinanceBackfilling¶
BinanceBackfilling
¶
OkxBackfilling¶
OkxBackfilling
¶
Common Usage¶
Basic Backfill¶
from streamforge import BinanceBackfilling
backfiller = BinanceBackfilling(
symbol="BTCUSDT",
timeframe="1h",
from_date="2024-01-01",
to_date="2024-12-31"
)
backfiller.run() # Sync method
With Emitter¶
backfiller = BinanceBackfilling(
symbol="BTCUSDT",
timeframe="1h",
from_date="2024-01-01",
to_date="2024-12-31"
)
backfiller.register_emitter(postgres_emitter)
backfiller.run()
With Transformer¶
def my_transformer(data: dict) -> dict:
return {...data, "custom_field": value}
backfiller.set_transformer(my_transformer)
backfiller.run()