API

REST and WebSocket access to 1024EX perpetuals and options: base URLs, response envelope, and the map of this section.

The 1024EX API exposes the same matching engine, risk engine and market data that the web app runs on. Two venues are first-class: perpetuals (non-expiring, USDC-margined, 218 markets across crypto, US equities, ETFs and commodities) and options (dated, cash-settled, USDC-collateralized, ~24,000 live contracts on 106 underlyings). Prediction markets share the same account and the same credential.

Everything is plain HTTPS + JSON. There is no signing of order payloads with a wallet key, no nonce ladder, and no on-chain transaction to submit: you hold an API key, you sign each HTTP request with HMAC-SHA256, and the exchange settles in its database with an asynchronous on-chain audit trail.

Base URLs

EnvironmentRESTWebSocket
Mainnethttps://api-mainnet.1024ex.comwss://api-mainnet.1024ex.com/api/v1/ws
Testnethttps://api-testnet-stable.1024ex.comwss://api-testnet-stable.1024ex.com/api/v1/ws

Testnet is a full copy of the stack with faucet USDC. Keys are not shared between the two — mint a key separately on each.

All routes are prefixed /api/v1/. Market data endpoints are open; everything that touches an account requires the three auth headers described in Authentication.

Response envelope

Every response — success or failure, 200 or 500 — has the same three-key shape.

{
  "success": true,
  "data": { "serverTime": 1790094672927, "timezone": "UTC" },
  "meta": { "requestId": "req_e903dea8e2d14348b2e3ea92bdecb631", "timestamp": 1790094672927 }
}
{
  "success": false,
  "error": {
    "code": "TRADE_MARKET_NOT_FOUND",
    "codeNum": 13014,
    "message": "Market not found: NOPE-USDC",
    "details": { "market": "NOPE-USDC" }
  },
  "meta": { "requestId": "req_b2fbe365c9604884a4d202b451c57e45", "timestamp": 1790094673430 }
}

Two rules that save debugging time:

  • Unwrap data yourself. Clients that forget this and read response.price get undefined rather than an error.
  • Branch on error.code, not on the HTTP status or on message. Codes are stable; messages are not. See Error responses.
  • Quote meta.requestId in any support request — it is the key to the server-side log line for that exact call.

Your first request

No credentials needed for market data:

curl -s https://api-mainnet.1024ex.com/api/v1/perp/markets/BTC-USDC/ticker
{
  "success": true,
  "data": {
    "market": "BTC-USDC",
    "lastPrice": "86145.55",
    "markPrice": "86148.955",
    "indexPrice": "86148.955",
    "bid": "86128.92",
    "ask": "86166.57",
    "openInterest": "0.012139",
    "fundingRate": "0.00005000",
    "nextFundingTime": 1790121600000,
    "priceChangePercent24h": "0.31"
  },
  "meta": { "requestId": "req_196ded…", "timestamp": 1790094673948 }
}

Then mint a key and place your first order — see Authentication for the 20-line signing helper, and Perpetuals: trading for the order body.

Cookbook

Short scripts you can paste into a terminal. Every one of them was run against
the live API before it was published, and the output shown on the page is what
it actually returned.

RecipeWhat you walk away with
Sign your first requestA signer you reuse for every private endpoint, and a clock-drift check that rules out the most common cause of AUTH_INVALID_SIGNATURE
Build a limit price the engine acceptsA price on the tick grid, a size on the step grid, and the notional checked before you send
Walk the options chainStrikes, marks and implied vol for one expiry, with the E6 decoding done for you
Place, check and cancel an orderA full order lifecycle, plus the four rejections you hit first: off-grid price, too many decimals, outside the price band, reused client id
Stream a market and notice what you missedA WebSocket loop that tells a heartbeat from data and knows when to resynchronize

Five things that bite first-time integrations

Each of these is silent — you get a 200, just not the answer you expected.

  • /perp/markets ignores limit. It has no paging; you always get the
    full list (218 markets today). Filter client-side.
  • Caps are applied without telling you. Ask klines for limit=5000 and you
    get 200 with 1000 rows, not an error.
  • The book can be thinner than the depth you ask for. depth=100 on a
    market quoted 20 levels deep returns 20. That is the book, not a failure.
  • Options underlying is the full symbol. BTC-USDC works; a bare BTC
    returns an empty list rather than an error, which reads like "no options
    listed" when the real answer is "wrong symbol".
  • /options/expiries and /options/chain disagree on date format. The
    first answers 2026-09-25T08:00:00Z, the second wants expiry=2026-09-25.
    Feeding the timestamp straight back gives 400.

This section

PageWhat it covers
NotationE6 integers vs decimal strings, symbol formats, timestamps, the snake_case bodies
AuthenticationMinting a key, the HMAC canonical payload, worked examples, key permissions
Rate limitsPer-second weights, burst, daily caps, the five 429 codes
Error responsesThe full code table by family
Perpetuals: market dataMarkets, book, trades, klines, mark/index, funding, OI
Perpetuals: tradingOrders, positions, leverage, margin, TP/SL, one-way vs hedge
Perpetuals: advanced ordersTWAP, VWAP, POV, scale, iceberg, OCO, bracket, pegged, sniper, conditional, trailing stop
Options: contractsSymbology, contract specs, marks and IV, fees, the expiry timeline
Options: market dataUnderlyings, expiries, chain with Greeks, book, tape
Options: tradingSingle orders, multi-leg baskets, positions, underlying-referenced TP/SL
Options: exercise and settlementManual exercise, auto-settlement, payout and fee basis
WebSocketChannels, subscribe frames, socket auth, connection hygiene

SDKs and tools

ToolWhat it is
quant1024open-source Python toolkit (pip install quant1024) wrapping this API
SDK & deploymentscaffolding and deploying a strategy built on that SDK
1024Chain on GitHubthe chain the exchange settles its audit trail to

Machine-readable spec

The OpenAPI 3.0 document is served live by the exchange and is what the API Reference section is generated from:

curl -s https://api-mainnet.1024ex.com/api-docs/openapi.json

It is generated from the handlers themselves, so it is always in lockstep with the deployed build. To check which build you are talking to:

curl -s https://api-mainnet.1024ex.com/version
# {"git_sha":"0159efe7…","service":"1024-public-api","source":"file"}

Did this page help you?