Authentication

API keys

One bearer token. Reads are open; creating and reading orders needs a key.

Get a key

Create a key self-serve — it's shown once, so store it securely. Each key is a full secret; treat it like a password and never ship it in front-end code.

Live vs test keys

PrefixModeBehavior
cx_live_…LiveReal swaps on the real engine. Returns real deposit addresses. 0% markup.
cx_test_…SandboxSimulated swaps. Deposit addresses are fake and the order auto-advances through its lifecycle. No real funds ever move.

Build and test your integration end-to-end with a test key, then swap in a live key — the request/response shapes are identical.

Sending the key

Send it as a bearer token (preferred):

Authorization: Bearer cx_live_...

Or as a header, if that's easier for your client:

X-API-Key: cx_live_...

Which calls need a key

EndpointKey
GET /currenciesOptional (works without a key)
GET /estimateOptional (works without a key)
POST /exchangeRequired
GET /order/{id}Required — you can only read orders your key created
Orders are scoped to the key that created them. A key can never read or affect another key's orders (you'll get 404).

Rotation & revocation

Lost or leaking a key? Create a new one and stop using the old — revoked keys immediately return 401. There's no limit on how many keys you hold; use a separate key per app or environment so you can revoke one without touching the others.

Non-custodial. A key lets you route swaps — it never gives us (or anyone) access to your wallet or funds. Funds always move wallet → deposit address → recipient.
← Quickstart Webhooks →