Skip to main content
POST
/
v1
/
export-schemas
Create export schema
curl --request POST \
  --url https://api.ticksupply.com/v1/export-schemas \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data @- <<EOF
{
  "name": "my_trades",
  "stream_type": "trade",
  "unfold": {
    "bybit_linear": {
      "path": "data"
    },
    "bybit_spot": {
      "path": "data"
    }
  },
  "columns": [
    {
      "output_column": "timestamp_ns",
      "meta": {
        "value": "collection_timestamp_ns",
        "format": "ns"
      }
    },
    {
      "output_column": "price",
      "data": {
        "binance": {
          "json": {
            "path": "p",
            "type": "decimal(18)"
          }
        },
        "bybit_linear": {
          "json": {
            "path": "p",
            "type": "decimal(18)"
          }
        }
      }
    },
    {
      "output_column": "quantity",
      "data": {
        "binance": {
          "json": {
            "path": "q",
            "type": "decimal(18)"
          }
        },
        "bybit_linear": {
          "json": {
            "path": "v",
            "type": "decimal(18)"
          }
        }
      }
    },
    {
      "output_column": "side",
      "data": {
        "binance": {
          "json": {
            "path": "m",
            "type": "bool"
          },
          "transform": "CASE WHEN {v} THEN 'sell' ELSE 'buy' END"
        },
        "bybit_linear": {
          "json": {
            "path": "S",
            "type": "string"
          }
        }
      }
    }
  ]
}
EOF
{
  "id": "sch_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4",
  "name": "normalized_trades",
  "stream_type": "trade",
  "created_at": "2023-11-07T05:31:56Z",
  "columns": [
    {
      "id": "<string>",
      "schema_id": "<string>",
      "position": 1,
      "output_column": "price",
      "meta": {
        "value": "collection_timestamp_ns",
        "format": "ns"
      },
      "data": {}
    }
  ],
  "unfold": {}
}

Authorizations

X-Api-Key
string
header
required

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

Body

application/json
name
string
required

Schema name (must be unique within your account)

Example:

"my_trades"

stream_type
string
required

Stream type this schema is for

Example:

"trade"

columns
object[]
required
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.

Response

Schema created

Export schema with its column definitions

id
string
required

Export schema ID

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

"sch_0194a1b2c3d4e5f6a7b8c9d0e1f2a3b4"

name
string
required

Schema name

Example:

"normalized_trades"

stream_type
string
required

Stream type this schema applies to

Example:

"trade"

created_at
string<date-time>
required

Creation timestamp

columns
object[]
required
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.

Last modified on April 5, 2026