download examples

Token-authenticated access to production market data

Wildcard Patterns

Select exactly the data you need using path patterns with /api/download/<pattern>

All data for specific symbol
consolidated/production/date=*/hour=*/
  msg=trade/inst=*/exch=*/sym=BTCUSDT/**
Specific date range
consolidated/production/date=2026-06-*/
  hour=*/msg=trade/**
Bybit perpetual L2 deltas
consolidated/production/date=*/hour=*/
  msg=depth/inst=linear_perp/
  exch=bybit/sym=BTCUSDT/**
OKX spot book snapshots
consolidated/production/date=*/hour=*/
  msg=booksnapshot/inst=spot/
  exch=okx/sym=BTC-USDT/**
All Binance data
consolidated/production/date=*/hour=*/
  msg=*/inst=*/exch=binance/**
Specific trading hours
consolidated/production/date=2026-06-24/
  hour=14/msg=trade/**
Only perpetual futures
consolidated/production/date=*/hour=*/
  msg=fundingrate/inst=linear_perp/**
Complex query
consolidated/production/date=2026-06-*/
  hour=*/msg=bbo/inst=spot/
  exch=binance/sym=BTC*/**
Python: List, Download, Load

Filter server-side, download with your token, load with pandas

import requests
import pandas as pd

TOKEN = "your_api_token"
API_BASE = "https://api.quantum-edge.app"
HEADERS = {"Authorization": f"Bearer {TOKEN}"}

# List files matching filters
resp = requests.get(
    f"{API_BASE}/api/datasets/depth/files",
    headers=HEADERS,
    params={
        "date": "2026-07-04",
        "exchange": "bybit",
        "instrument_type": "linear_perp",
        "symbol": "BTCUSDT",
    },
)
resp.raise_for_status()
files = resp.json()["files"]
print(f"Found {len(files)} files")

# Download each file with the same token
for f in files:
    data = requests.get(API_BASE + f["downloadUrl"], headers=HEADERS)
    data.raise_for_status()
    with open(f["metadata"]["filename"], "wb") as out:
        out.write(data.content)

df = pd.read_parquet(files[0]["metadata"]["filename"])
print(df.head())
DuckDB over Downloaded Files

Query a directory of hourly parquet as one table

import duckdb

# After downloading files into ./data/ (see Python
# or wget examples), query them all at once:
con = duckdb.connect()

df = con.execute("""
  SELECT ts_exchange, price, quantity, side
  FROM read_parquet('data/**/*.parquet')
  WHERE symbol = 'BTCUSDT'
  ORDER BY ts_exchange
""").df()

print(f"Rows: {len(df):,}")
Bulk Download with wget

Download a specific hourly file by its path

# First, get your API token from /tokens page
TOKEN="your_api_token_here"

# Ask the API for matching files, then download each returned file
wget --header="Authorization: Bearer $TOKEN" \
  "https://api.quantum-edge.app/api/download/\
consolidated%2Fproduction%2Fdate%3D2026-06-24%2Fhour%3D14%2Fmsg%3Dtrade%2Finst%3Dlinear_perp%2Fexch%3Dbinance%2Fsym%3DBTCUSDT%2Fhourly.parquet"
Polars Lazy Scan

Lazy evaluation over downloaded files for large datasets

import polars as pl

# Lazy scan over files downloaded into ./data/
df = pl.scan_parquet("data/**/*.parquet")

# Filter and aggregate (evaluated lazily)
result = (df
    .filter(pl.col("symbol") == "BTC-USDT")
    .group_by("date")
    .agg([
        pl.len().alias("levels"),
        pl.col("last_update_id").max()
    ])
    .collect()
)

print(result)
Wildcard Support: Use * for any characters, ** for recursive directory matching
Quota Tracking: Downloads are authenticated and counted against your monthly quota
Authentication: Create API tokens at /tokens for programmatic access
Efficient Queries: Path patterns are evaluated server-side - only matching files are scanned