Skip to main content
The API needs no SDK: it is plain HTTPS and JSON. Until the TypeScript SDK is published, build on the samples below. Each one runs as it is; the page snippets are cut from these same files.

At a glance

The Node.js and Python samples use only the standard library: no packages to install.

The samples

Quickstart

samples/http/quickstart.sh, samples/node/quickstart.mjs and samples/python/quickstart.py: list assets, quote, order and follow.

Request signing

request-signing in Node.js and Python, checked against the published test values.

Webhook verification

webhook-verify in cURL, Node.js and Python: verifies a delivery and refuses a changed body or a stale timestamp.

All samples

Every script the guides show, by language.
Each API script reads its settings from environment variables (TETRAFI_BASE_URL, TETRAFI_API_KEY, TETRAFI_SIGNING_SECRET, and its own options listed at its top), signs requests when the key has request signing on, and prints one JSON summary as its last line; the webhook verifiers also run offline against a built-in test vector. A script that can place an order stops before ordering unless you set TETRAFI_PLACE_ORDER=1, and saves the order record it needs to recover the order before it sends.

Next

Quickstart

Run your first quote and order.

Test before you trade

What you can try without moving assets.