Use your own Bitstamp-format data¶
How to point the pipeline at your own capture instead of the bundled sample, and tune the configuration for other instruments. For non-Bitstamp, non-LOBSTER sources, see Custom components.
Custom Bitstamp-format CSV¶
Place orders.csv and trades.csv in the same directory (a capture made with
ob-analytics capture bitstamp shows the expected trades.csv schema).
Point the pipeline at the orders path; it resolves sibling trades.csv
automatically.
from ob_analytics import Pipeline, PipelineConfig
config = PipelineConfig(
tick_size=0.01,
price_decimals=2,
lot_size=1e-8,
volume_decimals=8,
)
result = Pipeline(config=config).run("my_run/orders.csv")
Configuration presets¶
Set the instrument's price step (tick_size) and size step (lot_size), with
the decimals that show one step (price_decimals, volume_decimals). A
lot_size finer than volume_decimals can show is refused, because sizes
would be shown rounded.
Related¶
- LOBSTER data — message + orderbook files
- Databento MBO files — DBN per-order data for many venues
- Custom components — write a loader for any other format
- Configuration API — every
PipelineConfigfield