Skip to content

Guide

Exports

Exports write the result of any data endpoint to one JSON file in the background, following its pages for you. Queue the job, poll it, download the file.
On this page

Create, poll, download#

  1. Queue the export. POST /v1/exports with the path of any data endpoint and the query you would send to it. It answers 202.
  2. Poll until it is ready. GET /v1/exports/{id} until data.status is ready (or failed).
  3. Download the file. GET /v1/exports/{id}/download, or the relative data.download_url.
# 1. Queue the export
curl -sS -X POST "https://api.ordermap.si/v1/exports" \
  -H "Authorization: Bearer $ORDERMAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"path":"/v1/options/trades","query":{"underlying_symbol":"SPXW","date":"2026-10-16","limit":50000}}'

# 2. Poll until data.status is "ready"
curl -sS "https://api.ordermap.si/v1/exports/$EXPORT_ID" \
  -H "Authorization: Bearer $ORDERMAP_API_KEY"

# 3. Download the file
curl -sS --compressed -o export.json "https://api.ordermap.si/v1/exports/$EXPORT_ID/download" \
  -H "Authorization: Bearer $ORDERMAP_API_KEY"

The request#

  • The body is {"path": ..., "query": {...}}. Query values are strings, numbers, booleans or arrays of those (for list parameters).
  • The query is validated with the endpoint's own rules before the job is accepted: a 400 with details prefixed query..
  • Platform and account endpoints cannot be exported.
  • Entitlement checks are those of the endpoint: dataset release, overnight and history window. The window applies to end_time as well as start_time, so a range ending before it is refused up front. Futures session values are filters, not overnight data: exporting them needs no overnight entitlement, as for the endpoint itself.
  • On a paginated endpoint limit is the maximum number of rows in the file (1 to 100,000), not a page size. cursor_id is not accepted: the export follows the pages itself.

The job#

The 202 response is {"data": {...}, "meta": {"request_id"}}. Every timestamp is a Unix millisecond integer (created_timestamp, and last_attempt_timestamp and failed_timestamp once they apply), and query echoes your query with one string per parameter.

statusMeaning
queuedAccepted and waiting.
retryingA transient failure is being retried automatically.
awaiting_configurationThe service cannot run the job yet. It stays queued until it can.
failederror_code and failure_reason say why.
readyThe job adds bytes, rows, pages, truncated, resolution and download_url.

The file#

Downloaded file

{
  "data": [ ... ],
  "meta": { "request_id": "<the export id>", "coverage": { "complete": true } },
  "pages": 12,
  "truncated": false
}
  • data holds every row of every page in order (an object for single-object endpoints). meta is the endpoint's meta, and request_id is the export id.
  • truncated is true when the data was cut at a limit. Then meta.coverage.complete is false and meta.coverage.truncated is true.
  • Download results soon after they are ready. Files are not guaranteed to be kept indefinitely.

Limits#

ScopeLimit
Per file100,000 rows, 64 MiB, 1,000 pages, about 35 seconds of reading (the file is then finished with truncated: true and a warning: request a narrower window for the rest), and 20 consecutive pages without rows (a filtered scan that finds nothing stops there).
Per accountAt most 5 exports queued or running. The sixth is 429 export_limit.
Rate limitCreating, polling and downloading each count as one request. The background work itself uses no request capacity.

Who can read an export#

Exports belong to the account and to the project of the key that created them: a key of another project gets 404. The worker re-checks the key, project, plan and dataset release before it runs, and if the creating key is revoked before the job runs, the job fails.

Endpoint pages: Create export, Export status and Download export.