Introduction
The Exchange API provides programmatic access to trading functionality, market data, and account management. All endpoints accept and return JSON-formatted data.Base URL
All API requests should be made to:The base URL may vary depending on your deployment environment. Check your configuration for the correct server address.
API endpoints
Health
Check API server health status
Users
Create and manage user accounts
Orders
Execute, retrieve, and cancel orders
Market depth
Get order book depth for trading pairs
Trades
Retrieve recent trade history
Klines
Get candlestick/OHLC data
Tickers
Get 24-hour ticker statistics
Request format
All POST and DELETE requests require a JSON body with the appropriate parameters. GET requests use query parameters.Example POST request
Response format
Successful responses return HTTP 200 with JSON data:Success response
Error handling
The API uses standard HTTP status codes to indicate success or failure:| Status Code | Description |
|---|---|
| 200 | Success |
| 500 | Internal Server Error - Request failed or timed out |
Most endpoints use a Redis pub/sub pattern for processing. If a request times out or the processing service is unavailable, you’ll receive a 500 error.
Common patterns
Symbol format
Trading pairs use underscore-separated symbols:SOL_USDCBTC_USDCETH_USDC
Decimal precision
Prices and quantities are represented as decimal strings to maintain precision:Order sides
Orders can be either:BUY- Purchase the base assetSELL- Sell the base asset
Rate limiting
The API currently uses CORS with permissive settings allowing requests from any origin. No explicit rate limiting is implemented at the API level.
Health
Check health status
Users
Create user
Currently, user IDs are auto-generated. In production, this would typically be authenticated via JWT or session cookies.
Orders
Execute order
Get open order
Cancel order
Get all open orders
Cancel all orders
Market depth
Get order book depth
symbol(required) - Trading pair symbol (e.g.,SOL_USDC)
Trades
Get recent trades
symbol(required) - Trading pair symbol (e.g.,SOL_USDC)
Klines
Get candlestick data
symbol(required) - Trading pair symbol (e.g.,SOL_USDC)interval(required) - Time interval:1min,1h,1d,1w,1m,1ystartTime(required) - Unix timestamp for start of data range
Interval values are case-insensitive and converted to standard formats (minute, hour, day, week, month, year).