Skip to main content
POST
/
v1
/
exports
Python (ticksupply library)
# pip install ticksupply
from datetime import datetime, timedelta, timezone
from ticksupply import Client

client = Client(api_key="<api-key>")
end = datetime.now(timezone.utc)
start = end - timedelta(hours=24)
job = client.exports.create(datastream_id=123, start_time=start, end_time=end)
print(job)
{
  "id": "exp_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4",
  "datastream_id": 123,
  "start_time": 1704067200000000000,
  "end_time": 1704153600000000000,
  "format_options": {},
  "created_at": "2023-11-07T05:31:56Z",
  "reason": "<string>",
  "started_at": "2023-11-07T05:31:56Z",
  "finished_at": "2023-11-07T05:31:56Z"
}

Authorizations

X-Api-Key
string
header
required

Your API key. Get one from the dashboard at https://app.ticksupply.com/api-keys

Headers

Idempotency-Key
string<uuid>

Unique key for idempotent requests. If you retry a request with the same key, you'll receive the original response without the operation being performed again.

Must be a valid UUID (any version — v4 recommended for uniqueness), up to 128 characters.

Maximum string length: 128

Body

application/json
datastream_id
integer<int64>
required

Datastream ID to export

start_time
required

Start timestamp. Accepts multiple formats:

  • Nanoseconds since Unix epoch (integer): 1703116800000000000
  • Nanoseconds since Unix epoch (string): "1703116800000000000"
  • ISO 8601 datetime: "2024-01-15T10:00:00Z"
  • ISO 8601 with fractional seconds: "2024-01-15T10:00:00.123456789Z"
Example:

1703116800000000000

end_time
required

End timestamp. Same formats as start_time.

Example:

1703203200000000000

schema
default:raw

Export column schema. Controls which columns appear in the output. Defaults to "raw" (collection_timestamp_ns + raw JSON data blob).

Accepts:

  • "raw" — default two-column output
  • A built-in schema name (e.g., "normalized") — flat columns extracted from JSON
  • A schema ID (e.g., "sch_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4") — custom schema by ID
  • An inline object with columns array — ad-hoc column definitions

"raw" is a reserved schema name — it is always accepted here but is not returned by GET /v1/export-schemas.

Example:

"normalized"

format
enum<string>
default:csv

Output file format. Defaults to csv for backwards compatibility.

Available options:
csv,
parquet
format_options
object

Optional per-format options. Shape must match format; mismatched or unknown keys produce a 400 invalid_argument response.

Server defaults are applied when keys are omitted, and the resolved options are echoed back on every export response so downstream pipelines can pin the exact configuration that was used.

Response

Export job accepted for processing

id
string
required

Prefixed export job ID (e.g., exp_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4)

Pattern: ^exp_[a-f0-9]{32}$
Example:

"exp_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4"

datastream_id
integer<int64>
required

Datastream ID being exported

Example:

123

start_time
integer<int64>
required

Start of data range (nanoseconds since Unix epoch)

Example:

1704067200000000000

end_time
integer<int64>
required

End of data range (nanoseconds since Unix epoch)

Example:

1704153600000000000

format
enum<string>
required

Output container format.

  • csv — gzip-compressed CSV with a header row (.csv.gz). Type information is lost; consumers parse strings.
  • parquet — columnar Parquet (.parquet). Preserves ClickHouse types (Decimal, DateTime64(9), Nullable, Array → LIST), supports per-column compression, and is read efficiently by pandas, Polars, DuckDB, Athena, and Spark.
Available options:
csv,
parquet
format_options
object
required

Server-resolved per-format options, echoed back with every default filled in. The shape matches format: empty object for csv, a populated ParquetFormatOptions for parquet. Pin these values in your client to keep future server default changes from affecting your pipeline.

status
enum<string>
required

Export job status

Available options:
queued,
running,
succeeded,
failed,
canceled
created_at
string<date-time>
required

Creation timestamp

reason
string | null

Failure reason (only present when status is "failed")

started_at
string<date-time> | null

When processing started

finished_at
string<date-time> | null

When processing finished

Last modified on April 18, 2026