Skip to content

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 (see scripts/collect_bitstamp_btcusd.py for 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(price_decimals=2, volume_decimals=8)
result = Pipeline(config=config).run("my_run/orders.csv")

Configuration presets

config = PipelineConfig(price_decimals=2, volume_decimals=8)
config = PipelineConfig(price_decimals=2, volume_decimals=6)
config = PipelineConfig(
    price_decimals=4,
    volume_decimals=2,
    depth_bps=5,
    depth_bins=100,
)
config = PipelineConfig(price_decimals=2, volume_decimals=0)