Skip to main content
POST
/
v1
/
export-schemas
Python (ticksupply library)
# pip install ticksupply
from ticksupply import Client

client = Client(api_key="<api-key>")
schema = client.export_schemas.create(
    name="my_trades",
    stream_category="trade",
    unfold={"bybit_linear": {"path": "data"}},
    columns=[
        {"output_column": "timestamp_ns",
         "meta": {"value": "collection_timestamp_ns", "format": "ns"}},
        {"output_column": "price",
         "data": {"binance": {"json": {"path": "data.p",
                                        "type": "decimal(18)"}}}},
    ],
)
print(schema)
{
  "id": "sch_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4",
  "name": "normalized",
  "stream_category": "trade",
  "is_built_in": false,
  "created_at": "2023-11-07T05:31:56Z",
  "version": 1,
  "has_draft": false,
  "columns": [
    {
      "output_column": "price",
      "meta": {
        "value": "collection_timestamp_ns",
        "format": "ns"
      },
      "data": {}
    }
  ],
  "unfold": {},
  "derive": {}
}

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
name
string
required

Schema name. Unique per (account, stream_category) — you can reuse the same name across different categories. Conflicts with built-in schema names for the same category are also rejected.

Example:

"my_trades"

stream_category
enum<string>
required

Stream category this schema applies to. Must match the category of the datastreams it will be used with.

Available options:
trade,
orderbook,
book_update,
quote,
kline,
ticker,
liquidation
Example:

"trade"

columns
object[]
required

Column definitions, in output order. Must contain at least one column. Capped at 100 columns by default; contact support to request a higher limit for your account. Exceeding the limit returns 400 invalid_argument.

Minimum array length: 1
unfold
object

Per-exchange unfold rules. When an exchange packs multiple events into one JSON array, unfold expands each element into its own row. Keys are exchange codes, values specify the JSON path to the array.

derive
object

Per-exchange derived-field rules. Each exchange maps to a list of synthetic fields computed from the raw message before column extraction. Use this when you need to merge multiple arrays into one (e.g., combine bids and asks into a single tagged array that unfold can then expand into one row per price level). Keys are exchange codes.

Response

Schema created

Export schema with the content of its latest published version. Returned by create and get-by-id. Exports that reference the schema by name or ID snapshot the latest published version at the time the export is created.

id
string
required

Export schema ID

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

"sch_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4"

name
string
required

Schema name

Example:

"normalized"

stream_category
enum<string>
required

Stream category this schema applies to

Available options:
trade,
orderbook,
book_update,
quote,
kline,
ticker,
liquidation
Example:

"trade"

is_built_in
boolean
required

true for schemas provided by Ticksupply (e.g., normalized, book_5, book_20). Built-ins are read-only and cannot be deleted. false for schemas you created.

Example:

false

created_at
string<date-time>
required

Creation timestamp

version
integer
required

Published version number reflected in this response. 1 for a newly created schema.

Example:

1

has_draft
boolean
required

Whether an unpublished draft version exists for this schema.

Example:

false

columns
object[]
required

Column definitions from the latest published version, in output order.

unfold
object

Per-exchange unfold rules. When an exchange packs multiple events into one JSON array, unfold expands each element into its own row. Keys are exchange codes, values specify the JSON path to the array. Omitted when no unfold rules are configured.

derive
object

Per-exchange derived-field rules. Each exchange maps to a list of synthetic fields computed before column extraction. Omitted when no derive rules are configured.

Last modified on April 5, 2026