Skip to main content

API Reference

The Ticksupply API is organized around REST principles. It uses predictable resource-oriented URLs, accepts JSON request bodies, returns JSON responses, and uses standard HTTP response codes and authentication.

Base URL

All API requests are made to:
https://api.ticksupply.com

API versioning

The API is versioned via URL path. The current version is v1:
https://api.ticksupply.com/v1/exchanges
We maintain backward compatibility within a major version. Breaking changes require a new major version.

Authentication

Authenticate requests by including your API key in the X-Api-Key header:
curl -H "X-Api-Key: YOUR_API_KEY" \
  https://api.ticksupply.com/v1/exchanges
See the Authentication guide for details.

Resource IDs

Resources use prefixed IDs for easy identification. The format is {prefix}_{hex} where the prefix indicates the resource type:
PrefixResourceExample
sub_Subscriptionsub_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4
exp_Export Jobexp_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4
art_Export Artifactart_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4
spn_Subscription Spanspn_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4
Treat IDs as opaque strings. Store and pass them exactly as returned by the API.

Request format

Headers

HeaderRequiredDescription
X-Api-KeyYesYour API key
Content-TypeFor POSTSet to application/json
Idempotency-KeyOptionalUnique key for safe retries

Request body

POST requests accept JSON bodies:
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"datastream_id": 123}' \
  https://api.ticksupply.com/v1/subscriptions

Response format

All responses are JSON with these headers:
HeaderDescription
Content-Typeapplication/json
X-Request-IdUnique request identifier for debugging
X-RateLimit-*Rate limiting information

Success responses

Successful responses return appropriate status codes:
CodeMeaning
200 OKRequest succeeded, body contains result
201 CreatedResource created successfully
202 AcceptedRequest accepted for async processing (e.g., exports)
204 No ContentRequest succeeded, no body

Error responses

Errors return a structured JSON body:
{
  "error": {
    "code": "not_found",
    "message": "Subscription not found"
  }
}
See the Error Handling guide for all error codes.

Endpoint categories

Catalog

Explore available data sources.
MethodEndpointDescription
GET/v1/exchangesList all public exchanges
GET/v1/exchanges/{exchange}/instrumentsList instruments for an exchange
GET/v1/datastreamsList datastreams
GET/v1/exchanges/{exchange}/datastreamsList datastreams for an exchange
GET/v1/exchanges/{exchange}/instruments/{instrument}/datastreamsList datastreams for an instrument

Subscriptions

Manage your data subscriptions.
MethodEndpointDescription
POST/v1/subscriptionsCreate a subscription
GET/v1/subscriptionsList all subscriptions
GET/v1/subscriptions/{id}Get subscription details
DELETE/v1/subscriptions/{id}Delete a subscription
POST/v1/subscriptions/{id}/pausePause data collection
POST/v1/subscriptions/{id}/resumeResume data collection
GET/v1/subscriptions/{id}/spansGet collection time spans

Exports

Create and download data exports.
MethodEndpointDescription
POST/v1/exportsCreate an export job
GET/v1/exportsList all exports
GET/v1/exports/{id}Get export details
DELETE/v1/exports/{id}Delete an export
POST/v1/exports/{id}/cancelCancel a queued/running export
GET/v1/exports/{id}/downloadGet download URLs

Availability

Query data coverage.
MethodEndpointDescription
GET/v1/availabilityGet data availability

Common patterns

Pagination

List endpoints support cursor-based pagination:
# First page
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://api.ticksupply.com/v1/subscriptions?limit=20"

# Next page
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://api.ticksupply.com/v1/subscriptions?limit=20&page_token=TOKEN"
See the Pagination guide for details.

Rate limiting

All endpoints are rate limited:
  • 200 requests/minute per account
  • 10,000 requests/hour per account
Monitor usage via response headers:
X-RateLimit-Limit-Minute: 200
X-RateLimit-Remaining-Minute: 195
See the Rate Limiting guide for details.

Idempotency

Use the Idempotency-Key header for safe retries:
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
  -H "Idempotency-Key: unique-key-123" \
  -H "Content-Type: application/json" \
  -d '{"datastream_id": 123}' \
  https://api.ticksupply.com/v1/subscriptions
See the Idempotency guide for details.

Timestamps

Timestamps in request parameters use nanoseconds since Unix epoch (can be passed as strings for precision):
{
  "start_time": "1703116800000000000",
  "end_time": "1703203200000000000"
}
Timestamps in responses use ISO 8601 format:
{
  "created_at": "2024-12-21T12:00:00Z"
}
Convert between formats:
  • To nanoseconds: timestamp_ns = unix_seconds * 1_000_000_000
  • From nanoseconds: unix_seconds = timestamp_ns / 1_000_000_000