API Reference
The complete surface of the LEXX Trading API v2 — generated from the machine specifications, so it always matches what the server actually accepts. Guides live in the sidebar; every operation below links back to the concept pages it depends on.
REST base https://api.lexx-trade.com/api/v2 · WebSocket wss://api.lexx-trade.com/api/v2/ws · Auth: Ed25519 request signatures (
Authentication) · Envelope: { data, meta } (Conventions)
REST endpoints
4 endpoints Exchange Exchange account settings — hedge mode, margin configuration
3 endpoints Orders Order lifecycle — create, cancel, list, trades
5 endpoints Bots Bot management — create, configure, start, stop
11 endpoints Portfolio Account balances, positions, history, and configuration
10 endpoints
WebSocket
Machine-readable specs
The same specifications this reference is generated from — drop them into codegen, Postman, or your own tooling.
Quick index
Server
| GET | /server/time | Get server time |
| GET | /server/status | Get API status |
| GET | /server/version | Get build/version info |
| GET | /ping | Authenticated health check |
Exchange
| GET | /exchange/supported | Get supported exchanges |
| GET | /exchange/hedge-mode | Get hedge mode status |
| POST | /exchange/hedge-mode | Set hedge mode |
Orders
| GET | /orders | List orders (from cache) |
| POST | /orders | Create order |
| DELETE | /orders/{id} | Cancel order |
| POST | /orders/{id}/split | Split order |
| GET | /orders/trades | List trades/fills |
Bots
| GET | /bots | List bots |
| POST | /bots | Create bot |
| GET | /bots/{id} | Get bot by ID |
| PATCH | /bots/{id} | Update bot configuration |
| DELETE | /bots/{id} | Delete bot |
| POST | /bots/{id}/runs | Start bot |
| DELETE | /bots/{id}/runs/{runId} | Stop bot |
| POST | /bots/{id}/runs/{runId}/message | Send message to running bot |
| DELETE | /bots/batch | Batch delete bots |
| POST | /bots/batch/runs | Batch start bots |
| DELETE | /bots/batch/runs | Batch stop bots |
Portfolio
| GET | /portfolio | Get account balance |
| GET | /portfolio/positions | Get open positions |
| GET | /portfolio/position/leverage | Get current leverage for symbol(s) |
| POST | /portfolio/position/leverage | Set leverage for a futures symbol |
| GET | /portfolio/margin-mode | Get margin mode |
| POST | /portfolio/margin-mode | Set margin mode |
| POST | /portfolio/position/margin-type | Set position margin type |
| GET | /portfolio/leverage-brackets | Get leverage brackets |
| GET | /portfolio/dust | Get convertible dust assets |
| POST | /portfolio/dust/convert | Convert dust to a target asset |