HEYQUANT / DOCUMENTATION
Exports & downloads
Create export requests and save files from an obtained download URL.
Create an export
create_export(dataset, *, symbols, start_date, end_date, format="parquet") sends these fields to POST /exports and returns server JSON.
| Parameter | Client type | Description |
|---|---|---|
dataset |
str |
Dataset identifier |
symbols |
list[str] |
Instrument list |
start_date / end_date |
str |
Date strings; boundary semantics are not published |
format |
str |
Defaults to parquet; no client-side enum validation |
import os
from heyquant import HeyQuantClient
with HeyQuantClient(
base_url=os.environ["HEYQUANT_BASE_URL"],
api_key=os.environ["HEYQUANT_API_KEY"],
) as client:
job = client.create_export(
"bars_stock_daily",
symbols=["600519.SH"],
start_date="2026-01-05",
end_date="2026-01-14",
format="parquet",
)
print(job)Obtain a download URL
The public SDK does not implement job polling or download URL extraction. Do not assume a download_url field in the creation response. Obtain a trusted URL through a valid workflow provided by the service.
Save the file
client.download(download_url, destination) streams a GET response to a path or an open binary file object and returns None. Call it on your configured client.
# Use a trusted download URL obtained from the service
client.download(download_url, "result.parquet")
A path is opened in write mode, overwriting an existing file. A failed download can leave a partial file; confirm success before analysis. Downloads reuse the client connection, so use only trusted service URLs.