★ TRADING API

Trade programmatically.

REST and WebSocket APIs live today. 56 endpoints, 18 typed event variants, one unified surface across every perpetual and forex pair. FIX 4.4 gateway lands at the LD4 bare-metal cutover.

REST ENDPOINTS
56
WS EVENT VARIANTS
18
MARKETS COVERED
35+
UPDATE LATENCY
<5ms
SECTION 01

REST API — most-used endpoints

All public routes are no-auth and CORS-enabled. Order submission and account routes are HMAC-signed via your per-account API key. Full route table in the contract spec.

GET/v1/market/:symbol/tickerBest bid / ask, mark, index, funding rate, next-funding timestamp.
GET/v1/market/:symbol/depthFull order book (configurable depth) — bid + ask price levels.
GET/v1/market/:symbol/klinesHistorical candles (1m, 5m, 1h, 1d) for charting.
POST/v1/ordersSubmit a market / limit / stop / TWAP / OCO / bracket order.
DELETE/v1/ordersCancel all open orders for a client (optionally narrowed to one symbol).
PATCH/v1/orders/:symbol/:idIn-place modify (price or quantity) — preserves queue priority when reducing size.
GET/v1/positions/:client_idAll open positions across every market for a client.
POST/v1/positions/:client_id/close_allReduce-only market sweep to flatten every position.
GET/v1/accounts/:id/detailFull account snapshot — balance, available, equity, positions, open orders, recent fills.
GET/v1/funding/:symbolLive funding rate, premium index, settlement countdown.
GET/v1/insuranceInsurance fund balance per shard — public, no auth.
GET/v1/risk/haltsCurrently halted markets and reason.

EXAMPLE — SUBMIT A LIMIT ORDER

# Submit a limit buy order
curl -X POST https://api.lmexmarkets.com/v1/orders \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_KEY' \
  -d '{
    "client_id":   "your-uuid",
    "symbol":      "BTC-PERP",
    "side":        "buy",
    "order_type":  "limit",
    "price":       "69500.00",
    "quantity":    "0.5",
    "tif":         "gtc",
    "margin_mode": "cross",
    "leverage":    10
  }'
SECTION 02

WebSocket channels

One connection, multi-channel subscribe. Public channels are no-auth; private.{client_id} requires your API key on the upgrade request.

orderbook.{symbol}Top-N book snapshots, sequence-numbered.
trades.{symbol}Public prints — price, size, side, timestamp.
ticker.{symbol}Bid/ask/mark/index ticks.
funding.{symbol}Funding rate updates and settlement ticks.
market_status.{symbol}Open / closed transitions.
circuit_breaker.{symbol}Halt activations.
private.{client_id}All private events for one trader — order_ack, fill, account_update, position_update, liquidated, funding_payment, margin_warning.

EXAMPLE — SUBSCRIBE TO BOOK + PRIVATE FEED

// Subscribe to BTC-PERP order book + your private channel
const ws = new WebSocket('wss://api.lmexmarkets.com/ws')

ws.onopen = () => {
  ws.send(JSON.stringify({ action: 'subscribe', channel: 'orderbook.BTC-PERP' }))
  ws.send(JSON.stringify({ action: 'subscribe', channel: 'private.' + clientId }))
}

ws.onmessage = (ev) => {
  const e = JSON.parse(ev.data)
  switch (e.type) {
    case 'orderbook':       /* { symbol, bids, asks, seq } */         break
    case 'fill':            /* { order_id, price, quantity, fee } */  break
    case 'account_update':  /* { balance, available, equity, ... } */ break
    case 'liquidated':      /* { symbol, size, pnl, ... } */          break
  }
}
SECTION 03 · COMING AT LD4

FIX 4.4 Gateway — Institutional

FIX 4.4 acceptor over TCP for buy-side, prop firms and brokers. Translates to the same binary submit / cancel path as the REST and WS surfaces, with full session-level reliability (heartbeats, sequence recovery, resend).

Goes live with the LD4 bare-metal cutover (Q3 2026). If you're evaluating LMEX Markets for institutional flow, talk to us — we can preview the message set and onboarding checklist now.

Authentication

Per-account API key + HMAC-SHA384 signing on order and account routes. Public market data is unsigned. Detailed signing spec in the contract document.

Rate limits (planned at launch)

100 req/s per client on order submission; 1000 req/s global on market data; 10 WS connections per IP. Adjustments available for VIP 3+ and institutional accounts.

Error format

Every error returns { "error": "human readable" } with appropriate HTTP status (400 validation, 401/403 auth, 422 semantic, 503 unavailable).

FULL API REFERENCE
Every endpoint, every parameter, every response shape.
56 routes documented in OpenAPI 3.1, rendered with sidebar nav + search.
Open the reference →
Get API Keys →Read the help center →

API keys are provisioned per-account from your trader dashboard.