TestnetDeep testnet is live. Trading access is expanding in stages on the road to mainnet.
View live status

Quickstart

Sign in, stream an orderbook, place an order.

1. Sign in (SIWE)

Post an EIP-4361 message to POST /v1/auth/siwe. The gateway returns a bearer token scoped to one session key.

2. Stream

const ws = new WebSocket('wss://api.liberx.xyz/ws/v1');
ws.onopen = () => ws.send(JSON.stringify({
  op: 'subscribe',
  streams: ['book.BTCUSD', 'trades.BTCUSD'],
}));
ws.onmessage = (ev) => {
  // MessagePack-encoded frames; decode with @msgpack/msgpack
};

3. Place an order

curl -X POST https://api.liberx.xyz/v1/orders \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "symbol": "BTCUSD",
    "side": "long",
    "type": "market",
    "margin": 1000,
    "leverage": 10,
    "nonce": 17
  }'