Quickstart
Make your first API call in under 5 minutes.
REST API
Full reference for all REST endpoints and request/response schemas.
WebSocket API
Real-time L3 market data, order entry, and user events over WebSocket.
Authentication
API keys, admin bearer tokens, and WebSocket session auth.
Platform overview
Exchange is a Rust-based trading platform providing REST and WebSocket APIs for competition-style trading events. Operators provision traders, configure markets, and control the exchange lifecycle. Traders submit limit orders, view their positions and fills, and subscribe to live orderbook data.| Protocol | Base URL |
|---|---|
| REST | https://exchange.jamesxu.dev |
| WebSocket | wss://exchange.jamesxu.dev/ws |
| OpenAPI / Swagger | https://exchange.jamesxu.dev/docs |
Core capabilities
Order entry
Submit, amend, and cancel limit orders via REST or WebSocket with sub-millisecond matching.
Live market data
Subscribe to L3 orderbook snapshots and sequenced deltas — every add, fill, and cancel.
Account state
Query open orders, fills, net positions, and realized PnL across all markets.
Operator control
Start/stop trading, create and settle markets, provision users, and broadcast messages.
Risk management
Position-based risk enforcement with a per-market net limit of +/-1000 at order admission.
Durable persistence
PostgreSQL-backed writes with in-memory cache, background batch flushing, and startup recovery.
Getting started
See the Quickstart for a full walkthrough including WebSocket connection and live market data.