Download data

How to get simulation IDs and download output data.

All simulation data is downloaded via get_sim_data(sim_id). To use it you first need a sim_id — where you get one depends on your tier.

Getting simulation IDs

Free tier — cached simulations

Use list_cached() to browse pre-run simulations and pick a sim_id. See Simulations for the full list of available cached data and filtering options.

Pro tier — running a simulation

run() returns queued_sim_ids immediately on submission. You can also retrieve sim_ids from a completed job via get_job_results(). See Simulations for the full submission and job tracking API.

Downloading data

Once you have a sim_id, use get_sim_data() to download any of the output files as a Polars DataFrame.

Single simulation

python
# Full simulation output (default file)
df = client.simulation.get_sim_data(sim_id)
print(df.shape)
print(df.head())

# Mid-price resampled to 1-minute bars
mid_df = client.simulation.get_sim_data(sim_id, "mid_price_by_min.parquet")

Bulk download

Download multiple simulations at once as a ZIP using get_bulk_data().

python
cached = client.simulation.list_cached(symbol="700.HK")
sim_ids = [s["example_sim_id"] for s in cached["simulations"]]

zip_bytes = client.simulation.get_bulk_data(
    sim_ids=sim_ids,
    include_sim_data=True,
    include_mid_price=True
)

with open("simulation_data.zip", "wb") as f:
    f.write(zip_bytes)

# Or load directly without saving
import zipfile, io, polars as pl

with zipfile.ZipFile(io.BytesIO(zip_bytes)) as zf:
    for name in zf.namelist():
        if name.endswith(".parquet"):
            df = pl.read_parquet(io.BytesIO(zf.read(name)))
            print(f"{name}: {df.shape}")

Output files

FileDescription
sim_data.parquetFull simulation output (order book + orders at tick resolution)
mid_price_by_min.parquetMid-price resampled to 1-minute bars
exec_schedule.parquetExecution schedule with order times and quantities (if algo present)
schedule_by_min.parquetAlgo orders aggregated to 1-minute buckets (if algo present)
exec_results.parquetMarket slippage, risk and impact metrics (if algo present)
params.jsonSimulation configuration and parameters
results.jsonSummary metrics from the simulation

mid_price_by_min.parquet

ColumnTypeDescription
timedatetimeMinute timestamp
mid_pricefloatMid-price at end of minute
python
mid_df = client.simulation.get_sim_data(sim_id, "mid_price_by_min.parquet")

import matplotlib.pyplot as plt
plt.plot(mid_df["time"], mid_df["mid_price"])
plt.title("Simulated Price Path")
plt.show()

Execution files

Execution files are only present when the simulation was submitted with an exec_algos parameter (Pro tier only).

python
files = client.simulation.list_sim_files(sim_id)
if files["has_exec_schedule"]:
    exec_df = client.simulation.get_sim_data(sim_id, "exec_schedule.parquet")

Available symbols (Pro tier)

Pro tier users can run simulations across the top 50 most actively traded HKEX equities. Use client.data.get_available_symbols() to retrieve valid symbols and calibration dates programmatically.

NameTickerIndustry
MEITUAN-W3690.HKConsumer Internet / Food Delivery
TENCENT700.HKTechnology / Gaming / Social Media
BABA-SW9988.HKE-commerce / Cloud / Technology
LAOPU GOLD6181.HKJewelry / Luxury Retail
XIAOMI-W1810.HKConsumer Electronics / Technology
JD-SW9618.HKE-commerce / Technology
KUAISHOU-W1024.HKSocial Media / Short Video
BIDU-SW9888.HKInternet / AI / Technology
SHENZHOU INTL2313.HKApparel Manufacturing
LI AUTO-W2015.HKElectric Vehicles / Automotive
CHINA MOBILE941.HKTelecommunications
NTES-S9999.HKInternet / Gaming / Entertainment
PING AN2318.HKInsurance / Financial Services
CNOOC883.HKOil & Gas / Energy
SUNNY OPTICAL2382.HKOptical Components / Technology
BILIBILI-W9626.HKOnline Entertainment / Video
PETROCHINA857.HKOil & Gas / Energy
ANTA SPORTS2020.HKSportswear / Consumer Goods
CHINA SHENHUA1088.HKCoal / Energy
HKEX388.HKFinancial Services / Stock Exchange
CCB939.HKBanking / Financial Services
BYD ELECTRONIC285.HKElectronics Manufacturing
AIA1299.HKInsurance / Financial Services
CHINAHONGQIAO1378.HKAluminum / Materials
TRIP.COM-S9961.HKTravel / Online Services
CHINA RES GAS1193.HKGas Utilities / Energy
ICBC1398.HKBanking / Financial Services
LI NING2331.HKSportswear / Consumer Goods
ZIJIN MINING2899.HKMining / Materials
XPENG-W9868.HKElectric Vehicles / Automotive
HAIDILAO6862.HKRestaurants / Food & Beverage
BRILLIANCE CHI1114.HKAutomotive
CM BANK3968.HKBanking / Financial Services
SENSETIME-W20.HKArtificial Intelligence / Technology
HSBC HOLDINGS5.HKBanking / Financial Services
CHINA UNICOM762.HKTelecommunications
SMIC981.HKSemiconductors / Technology
LENOVO GROUP992.HKConsumer Electronics / Technology
SINOPEC CORP386.HKOil & Gas / Chemicals / Energy
JD HEALTH6618.HKHealthcare / Digital Health
BUD APAC1876.HKBeverages / Consumer Goods
WUXI BIO2269.HKBiotechnology / Healthcare
COSCO SHIP HOLD1919.HKShipping / Transportation
NONGFU SPRING9633.HKBeverages / Consumer Goods
CPIC2601.HKInsurance / Financial Services
MENGNIU DAIRY2319.HKDairy / Consumer Goods
GANFENGLITHIUM1772.HKLithium Mining / Materials
CHINA OVERSEAS688.HKReal Estate / Property
ENN ENERGY2688.HKGas Utilities / Energy
HAIER SMARTHOME6690.HKHome Appliances / Consumer Electronics