Exports

Order book history as Parquet, served via presigned download URLs.

GET/markets/{market_id}/export
sdkclient.exports.download(market_id)

Order book history (snapshots, deltas, trades) for a single market as a Parquet file. Returned as a 302 redirect to a presigned URL valid for one hour.

Parameters
market_idstrrequired
Market UUID.
data_dirstr | PathLike= "."
SDK only. Directory to write the Parquet into. Created if missing.
coalescebool= false
Trade-aligned compact variant. Book reconstructed from it is exact at every trade and snapshot.
client.exports.download( "4ee145e2-3fee-5b15-bb95-56a33a292945", data_dir="data", ) result = client.backtest( strategy, "4ee145e2-3fee-5b15-bb95-56a33a292945", initial_cash=10_000, data_dir="data", )
http
HTTP/1.1 302 Found Location: https://hel1.your-objectstorage.com/marketlens/history/... X-Export-Events: 92866 Cache-Control: no-store
GET/series/{series_id}/export
sdkclient.exports.download_series(series_id, **params)

Order book history for every market in a series, with one presigned URL per ready market.

Parameters
series_idstrrequired
Series slug or UUID.
data_dirstr | PathLike= "."
SDK only. Directory to write each market's Parquet into. Created if missing.
afterint | str
Window start (ms epoch or ISO 8601).
beforeint | str
Window end (ms epoch or ISO 8601).
coalescebool= false
Trade-aligned compact variant. Book reconstructed from it is exact at every trade and snapshot.
client.exports.download_series( "btc-up-or-down-5m", data_dir="data", after="2026-04-15T01:45:00Z", before="2026-04-15T01:50:00Z", ) result = client.backtest( strategy, "btc-up-or-down-5m", initial_cash=10_000, after="2026-04-15T01:45:00Z", before="2026-04-15T01:50:00Z", data_dir="data", )
jsonResponse
{ "ready": [ { "market_id": "4ee145e2-3fee-5b15-bb95-56a33a292945", "url": "https://hel1.your-objectstorage.com/marketlens/history/...", "events": 92866 }, { "market_id": "8b6f1a02-9c3d-4e7a-b1f8-2a9d4c5e6f70", "url": "https://hel1.your-objectstorage.com/marketlens/history/...", "events": 81234 } ], "pending": [], "failed": [], "rate_limited": [], "events_charged": 174100 }

Auto-download

Backtest directly against the bulk export, no separate download step required. The first run fetches the files to disk; subsequent runs replay from the local cache.

python
# downloads on first run, replays from cache after result = client.backtest( strategy, "btc-up-or-down-5m", initial_cash=10_000, after="2026-04-15T01:45:00Z", before="2026-04-15T01:50:00Z", data_dir="data", )