Skip to main content

Python Examples

These examples use the official Ticksupply Python client. For raw HTTP examples, see the cURL page.

Setup

Install the client library:
Create a client instance:

Catalog operations

List exchanges

List instruments

Paginate through instruments

List datastreams

Subscription operations

Create a subscription

List subscriptions

Manage a subscription

Export operations

Create an export

Poll for completion and download

List exports

Export schema operations

Create a custom schema

List schemas

Use a schema in an export

You can reference a schema by name, by ID, or define it inline:
Omit schema= to export raw JSON rows.

Iterate on a schema via draft

Use the draft workflow to evolve a schema without affecting existing exports. Exports snapshot the schema at creation time, so publishing a new version never touches exports that already ran.

Delete a schema

Availability

Check data availability

Idempotency

Most mutating operations — create, delete, pause, resume, cancel, publish-draft — accept an optional idempotency_key kwarg. Pass any UUID (v1/v4/v7, up to 128 chars). Retries with the same key return the original result instead of executing the operation twice.
The client already retries transient network and 5xx errors internally. Use idempotency_key for retries from your own code — e.g. after a process crash or when resuming a job queue.

Error handling

The client automatically retries on transient errors (5xx, timeouts) with exponential backoff. You only need to handle business logic errors like NotFoundError and ConflictError.
Every error carries a request_id sourced from the X-Request-Id response header. Include it when reporting issues to support — it uniquely identifies the failed request in our server logs.

Async usage

The AsyncClient provides the same interface for use with asyncio:

Complete workflow

Subscribe to a data stream, wait for data, then export and download:
Last modified on April 20, 2026