Cryptora Institutional API

Run sub-accounts, move funds between them, place orders in batches and follow your orders and balances live, from your own programs. Base URL: https://cryptora.dev

Overview

This API builds on the standard one in the API documentation: the same keys, the same signing, the same /api/v1 endpoints for balances, orders and fills. On top it adds:

  • Ed25519 keys next to HMAC keys: the private key never leaves your server.
  • Sub-accounts by API: create, rename, freeze and close them, and give them their own keys.
  • Transfers between your main account and its sub-accounts, with your own reference for safe retries.
  • Up to 10 orders in one request, and cancelling every open order of a market at once.
  • A user data stream over WebSocket: order changes, balances and transfers as they happen.
  • A higher rate limit for your account when the platform raises your tier.

Every answer is JSON with ok true or false. A refusal carries code and error. Accounts are named by their public UID, never by an internal id.

Keys and permissions

Make keys in API Management (your account), on a sub-account's page (that sub-account), or by API with POST /api/v1/sub-accounts/<uid>/keys. A key acts as the account it belongs to: a sub-account's key trades the sub-account's balances.

PermissionWhat it allows
ReadAlways on. Balances, orders, fills, transfers, the key itself, the user data stream
TradePlace and cancel spot orders, batches and cancel-all
TransferA main account key: move funds between the main account and its sub-accounts. A sub-account key: move funds from itself to its main account
Sub-accountsMain account keys only. Create, rename, freeze and close sub-accounts, manage their keys; includes Transfer
  • No key can withdraw funds from the platform.
  • With an IP list (up to 30 addresses), the key only works from those addresses. The platform may require one for keys that trade, transfer or manage sub-accounts.
  • A key can end on a date you choose (30 days to 10 years), or never.
  • Freezing or closing a sub-account stops its keys; closing deletes them.

Signing

Every signed request carries X-WS-APIKEY, X-WS-TIMESTAMP (milliseconds since 1970, UTC), X-WS-SIGNATURE and optionally X-WS-RECV-WINDOW (5000 by default, up to 60000). The string signed is the same for both kinds of key:

timestamp + METHOD + path with query + body

1790500000000GET/api/v1/sub-accounts
1790500000000POST/api/v1/sub-accounts/transfer{"toUid":10000042,"currency":"USDT","amount":"250"}
KeyX-WS-SIGNATURE
HMAC-SHA256HMAC-SHA256 of the string, keyed with the secret, as lowercase hex
Ed25519The Ed25519 signature of the string (64 bytes) made with your private key, as base64

Sign the exact body bytes you send. Each signature works once. HMAC examples are in the API documentation; Ed25519 below.

Make an Ed25519 key pair

openssl genpkey -algorithm ed25519 -out private.pem
openssl pkey -in private.pem -pubout          # paste this public key when you make the key

Node.js 18+

import crypto from 'node:crypto';
import fs from 'node:fs';

const KEY = process.env.WS_API_KEY;                               // the API key shown when the key was made
const PRIVATE = crypto.createPrivateKey(fs.readFileSync('private.pem'));

async function call(method, path, body) {
  const ts = Date.now().toString();
  const raw = body ? JSON.stringify(body) : '';
  // Ed25519 signs the same string as HMAC; the signature is sent as base64
  const sig = crypto.sign(null, Buffer.from(ts + method + path + raw), PRIVATE).toString('base64');
  const res = await fetch('https://cryptora.dev' + path, {
    method,
    headers: { 'X-WS-APIKEY': KEY, 'X-WS-TIMESTAMP': ts, 'X-WS-SIGNATURE': sig, 'Content-Type': 'application/json' },
    body: raw || undefined,
  });
  return res.json();
}

console.log(await call('GET', '/api/v1/sub-accounts'));
console.log(await call('POST', '/api/v1/sub-accounts/transfer', { toUid: 10000042, currency: 'USDT', amount: '250', clientRef: 'rebalance-2026-11-25' }));

Python (cryptography)

import base64, json, os, time, requests
from cryptography.hazmat.primitives.serialization import load_pem_private_key

KEY = os.environ["WS_API_KEY"]
PRIVATE = load_pem_private_key(open("private.pem", "rb").read(), password=None)

def call(method, path, body=None):
    ts = str(int(time.time() * 1000))
    raw = json.dumps(body, separators=(",", ":")) if body else ""
    sig = base64.b64encode(PRIVATE.sign((ts + method + path + raw).encode())).decode()
    headers = {"X-WS-APIKEY": KEY, "X-WS-TIMESTAMP": ts, "X-WS-SIGNATURE": sig, "Content-Type": "application/json"}
    return requests.request(method, "https://cryptora.dev" + path, headers=headers, data=raw or None).json()

print(call("GET", "/api/v1/sub-accounts/transfers?limit=20"))

curl and OpenSSL 3

TS=$(date +%s000)
PATH_Q='/api/v1/key'
SIG=$(printf '%s' "${TS}GET${PATH_Q}" | openssl pkeyutl -sign -inkey private.pem -rawin | base64 -w0)
curl -s "https://cryptora.dev${PATH_Q}" -H "X-WS-APIKEY: $WS_API_KEY" -H "X-WS-TIMESTAMP: $TS" -H "X-WS-SIGNATURE: $SIG"

Rate limits

Each key may send a number of requests a minute: 600 by default, more when the platform gives your account a higher tier (1,200, 3,000, 6,000 or 12,000). Your sub-accounts' keys share your tier. Every answer says where you stand:

HeaderValue
X-RateLimit-LimitRequests allowed in the minute
X-RateLimit-RemainingRequests left in this minute
X-RateLimit-ResetWhen the minute rolls over, in UNIX seconds
Retry-AfterOnly on 429: seconds to wait

Orders keep the trade page's own limit of new orders a minute per account; each order of a batch counts.

Key and limit

GET/api/v1/keyRead

The key that signed the request: its kind, permissions, IP list and end, its account, and its limit.

Answer

{ "ok": true,
  "key": { "name": "Desk bot", "prefix": "cex_a1b2", "kind": "ed25519",
           "permissions": { "read": true, "trade": true, "subAccounts": false, "transfer": true },
           "ipWhitelist": ["203.0.113.10"], "expiresAt": null, "createdAt": "2026-11-25T09:00:00.000Z" },
  "account": { "uid": 10000042, "isSubAccount": true },
  "rateLimit": { "requestsPerMinute": 3000 } }

GET/api/v1/rate-limitRead

The key's limit and its requests today (UTC).

Answer

{ "ok": true, "requestsPerMinute": 3000, "windowSeconds": 60,
  "today": { "requests": 18240, "errors": 12, "limited": 0 } }

Sub-accounts

A sub-account is a full account of its own (wallets, deposit addresses, orders, keys) that belongs to your main account. Virtual sub-accounts have no sign-in: you run them by API and by switching into them on the website. Email sub-accounts get an invitation, set their own password and sign in on their own. These endpoints need a main account key with the Sub-accounts permission.

GET/api/v1/sub-accounts?includeClosed=1Sub-accounts

Your sub-accounts, newest first, with their value in USD; how many you have and may have. Closed ones only with includeClosed=1.

Answer

{ "ok": true, "masterUid": 10000001, "used": 3, "max": 20, "totalUsd": 184230.55,
  "subAccounts": [ { "uid": 10000042, "label": "Desk 1", "kind": "virtual", "status": "active",
                     "email": null, "inviteState": "none", "note": "", "createdVia": "api",
                     "createdAt": "2026-11-25T09:00:00.000Z", "lastLoginAt": null, "totalUsd": 52010.2 } ] }

POST/api/v1/sub-accountsSub-accounts

Makes a sub-account. label: 1 to 48 letters, digits, spaces, dots, dashes or underscores, unique among yours. An email sub-account gets its invitation by email. Your account must meet the platform's conditions (identity verified, two-factor on) and be under its limit.

Body

{ "label": "Desk 2", "kind": "virtual", "note": "Market making" }
{ "label": "Analyst", "kind": "email", "email": "[email protected]" }

Answer

{ "ok": true, "subAccount": { "uid": 10000043, "label": "Desk 2", "kind": "virtual", "status": "active", ... } }

GET/api/v1/sub-accounts/<uid>Sub-accounts

One sub-account with every balance in every wallet. usd is null for a coin without a price.

Answer

{ "ok": true, "subAccount": { "uid": 10000042, ... , "totalUsd": 52010.2 },
  "balances": [ { "wallet": "spot", "currency": "USDT", "available": "50000", "locked": "1200", "usd": 51200 },
                { "wallet": "funding", "currency": "BTC", "available": "0.01", "locked": "0", "usd": 810.2 } ] }

PATCH/api/v1/sub-accounts/<uid>Sub-accounts

Renames it or changes its note.

Body

{ "label": "Desk 1 (EU)", "note": "Moved to the EU desk" }

POST/api/v1/sub-accounts/<uid>/statusSub-accounts

freeze: signs it out; it cannot trade or receive funds and its keys are refused until unfrozen. Its funds can still move to the main account. unfreeze undoes it (not for one the platform froze). close: for good; every balance must be zero and its orders ended first. Its keys are deleted and it stops counting toward your limit.

Body

{ "action": "freeze" }      // or "unfreeze", "close"

Sub-account keys

GET/api/v1/sub-accounts/<uid>/keysSub-accounts

The sub-account's active keys: name, prefix, kind, permissions, IP list, created, last used, end.

POST/api/v1/sub-accounts/<uid>/keysSub-accounts

Makes a key for the sub-account. The API key (and an HMAC key's secret) is in this answer only. publicKey: PEM, or the raw 32 bytes in base64 or hex. A sub-account key cannot have the Sub-accounts permission.

Body

{ "name": "Desk 1 bot", "kind": "ed25519", "publicKey": "-----BEGIN PUBLIC KEY-----\n...",
  "trade": true, "transfer": true, "ipWhitelist": ["203.0.113.10"], "expiresInDays": 90 }

Answer

{ "ok": true, "key": { "id": "...", "prefix": "cex_9f8e", ... }, "apiKey": "cex_...",
  "secret": "cxs_..." }        // secret only for an HMAC key

DELETE/api/v1/sub-accounts/<uid>/keys/<keyId>Sub-accounts

Revokes one of the sub-account's keys at once.

Transfers

POST/api/v1/sub-accounts/transferTransfer

Moves funds at once and for free. A UID left out (or 0) is the key's own account; wallets default to spot. A main account key moves between any two accounts of the family (sub-account to sub-account too); a sub-account key only from itself to its main account. Nothing goes into a frozen or closed sub-account; a frozen one can still be emptied into the main account.

clientRef (optional, 1 to 64 letters, digits, dots, dashes, colons or underscores) makes a retry safe: the same reference again answers the first transfer instead of moving twice; the same reference with different details is refused with REF_REUSED.

Body

{ "fromUid": 0, "toUid": 10000042, "fromWallet": "spot", "toWallet": "spot",
  "currency": "USDT", "amount": "250", "clientRef": "rebalance-2026-11-25" }

Answer

{ "ok": true, "transfer": { "id": "6f1c...", "fromUid": 10000001, "toUid": 10000042,
  "fromWallet": "spot", "toWallet": "spot", "currency": "USDT", "amount": "250", "via": "api",
  "clientRef": "rebalance-2026-11-25", "createdAt": "2026-11-25T09:30:00.000Z" } }

GET/api/v1/sub-accounts/transfers?uid=&currency=&startTime=&endTime=&limit=&before=Read

The family's transfers, newest first (a sub-account key sees only its own). uid narrows to one account, times are milliseconds, limit up to 500 (50 by default), and before a transfer id to page back from.

Batch orders

POST/api/v1/orders/batchTrade

Places 1 to 10 orders in the order sent, each with every rule of a single order. A batch is not all or nothing: read each result.

Body

{ "orders": [
  { "symbol": "BTC-USDT", "side": "BUY", "type": "LIMIT", "amount": "0.01", "price": "80000" },
  { "symbol": "BTC-USDT", "side": "SELL", "type": "LIMIT", "amount": "0.01", "price": "82000" } ] }

Answer

{ "ok": true, "results": [ { "ok": true, "order": { "id": 18231, ... } },
                         { "ok": false, "error": "Insufficient balance" } ] }

DELETE/api/v1/orders/cancel-all?symbol=BTC-USDTTrade

Cancels every open order of the account in that market. The symbol is required, so one call never empties every market by mistake.

Answer

{ "ok": true, "symbol": "BTC-USDT", "cancelled": 7, "results": [ { "id": "18231", "ok": true }, ... ] }

User data stream

Your orders, balances and transfers pushed to you as they change, instead of asking every second.

POST/api/v1/user-data-streamRead

Opens a listen key for the key's account, good for 60 minutes. Up to 10 per account; an eleventh ends the oldest.

Answer

{ "ok": true, "listenKey": "9c1d...64 hex", "expiresAt": "2026-11-25T10:30:00.000Z",
  "url": "wss://cryptora.dev/ws/v1/user?listenKey=9c1d..." }

PUT/api/v1/user-data-stream?listenKey=...Read

Keeps it alive for 60 minutes from now. Send it every 30 minutes.

DELETE/api/v1/user-data-stream?listenKey=...Read

Closes it; its sockets get listenKeyExpired and close.

Events

eventWhenCarries
connectedOnce, on connectinglistenKey, expiresAt
orderEvery change of one of your spot orders: new, each fill, cancelorder: id, clientOrderId, symbol, side, type, timeInForce, price, averagePrice, amount, filled, remaining, cost, fee, feeCurrency, status, createdAt, updatedAt
balanceAfter an order or a transfer touched a coinbalances: wallet, currency, available, locked
transferA sub-account transfer in or outtransfer: id, direction (in or out), fromUid, toUid, fromWallet, toWallet, currency, amount, clientRef, createdAt
listenKeyExpiredThe listen key ran outthen the socket closes with 4002

Every event has time in milliseconds. An unknown or ended listen key is closed with 4001. The server pings every so often; answer with a pong (browsers and most libraries do it for you).

Node.js 22+

// 1. open a listen key with a signed request (any key: Read is enough)
const { listenKey, url } = await call('POST', '/api/v1/user-data-stream');

// 2. connect; no signing on the socket itself, the listen key is the proof
const ws = new WebSocket(url);            // wss://cryptora.dev/ws/v1/user?listenKey=...
ws.onmessage = (m) => {
  const e = JSON.parse(m.data);
  if (e.event === 'order') console.log('order', e.order.id, e.order.status, e.order.filled);
  if (e.event === 'balance') console.log('balance', e.balances);
  if (e.event === 'transfer') console.log('transfer', e.transfer.direction, e.transfer.amount, e.transfer.currency);
};

// 3. keep it alive: every 30 minutes (it ends 60 minutes after the last keep-alive)
setInterval(() => call('PUT', '/api/v1/user-data-stream?listenKey=' + listenKey), 30 * 60 * 1000);

Sub-account rules

  • A sub-account cannot withdraw to other platforms or addresses, unless the platform allows it for your account. Move funds to the main account and withdraw from there.
  • No P2P trading, sending gifts, card or merchant applications, or referral network settings in a sub-account. It can redeem gift codes.
  • A sub-account has your verification level; it never submits identity documents of its own.
  • A sub-account cannot have sub-accounts.
  • Switched into a sub-account on the website, you cannot change its password or security settings; the switch ends after a few hours or when you sign out.

Errors

The signing errors (MISSING_AUTH, INVALID_SIGNATURE, RATE_LIMITED and the rest) are listed in the API documentation. These come from the endpoints above:

HTTPcodeMeaning
400BAD_LABELThe name is empty, too long, or has other characters
400BAD_EMAILNot an email address
400BAD_AMOUNTThe amount is zero, negative or too large
400BAD_CURRENCYNo coin given
400BAD_WALLETA wallet that cannot be used for transfers
400BAD_REFclientRef has other characters or is too long
400SAME_ACCOUNTFrom and to are the same account
400BAD_PUBLIC_KEYNot an Ed25519 public key
400BAD_IPSAn entry is not an IP address, or more than 30
400IP_REQUIREDThe platform needs an IP list for this key
400BAD_BATCHorders is missing, empty, or has more than 10
400SYMBOL_REQUIREDcancel-all needs a symbol
403PERMISSION_DENIEDThe key lacks the Sub-accounts or Transfer permission
403IS_SUB_ACCOUNTA sub-account key asked for main account actions
403SUB_TO_MASTER_ONLYA sub-account key moves only to its main account
403KYC_REQUIREDVerify your identity to make sub-accounts
403TWO_FACTOR_REQUIREDTurn on two-factor sign-in
403MASTER_SUSPENDEDSub-accounts are switched off for your account
403LIMIT_REACHEDYou have as many sub-accounts as you may
403FROZEN_BY_ADMINThe platform froze it; only support can unfreeze it
404NOT_FOUNDNo such sub-account or key of yours
404NOT_IN_FAMILYThe UID is not you or one of your sub-accounts
404LISTEN_KEY_EXPIREDThe listen key is unknown or over: open a new one
409LABEL_TAKENAnother sub-account of yours has this name
409EMAIL_TAKENAn account with this email exists
409INSUFFICIENT_BALANCENot enough available in that wallet
409TO_NOT_ACTIVENothing can go into a frozen or closed sub-account
409FROM_FROZENA frozen sub-account can only be emptied into the main account
409NOT_EMPTYEmpty the sub-account before closing it
409REF_REUSEDThis clientRef belongs to a different transfer
409KEY_LIMITThe account has as many keys as it may