https://exchange.jamesxu.dev
A machine-readable OpenAPI schema and Swagger UI are also available:
Public endpoints
No authentication required.GET /health
GET /health
Returns the service status and current persistence state. No authentication required.Response fields
string
required
ok when persistence is disabled or ok. degraded when persistence is retrying, backpressured, or stopped.string
required
Always
exchange.string
required
Current server time in RFC 3339 format.
object
required
Current persistence status including mode.
GET /api/v1/markets
GET /api/v1/markets
Returns the list of all configured markets. No authentication required.
- Trader endpoints
- Admin endpoints
Trader routes require the
x-api-key header. API keys are provisioned by an admin and are prefixed with exch_.GET /api/v1/user
GET /api/v1/user
Returns the authenticated trader’s profile.
GET /api/v1/positions
GET /api/v1/positions
Returns all open positions for the authenticated trader.
net_quantityis a signed integer. Positive values are long, negative values are short.realized_pnlaccumulates as fills close or reduce the position.
GET /api/v1/portfolio
GET /api/v1/portfolio
Returns a portfolio snapshot including position limit and all current positions.
position_limit reflects the exchange-wide per-market net position limit of +/-1000.GET /api/v1/leaderboard
GET /api/v1/leaderboard
Returns traders ranked by their current marked net PnL. Marking uses settled prices, orderbook mid prices, or market reference prices.Query parameters
number
Optional. Maximum number of rows to return. Omit to return all traders.
GET /api/v1/open-orders
GET /api/v1/open-orders
Returns all resting open orders for the authenticated trader. Filter by market using the optional
market query parameter.Query parametersstring
Optional. Filter results to a single market, e.g.
BTC-USD.GET /api/v1/fills
GET /api/v1/fills
Returns all fills for the authenticated trader. Filter by market using the optional
market query parameter.Query parametersstring
Optional. Filter results to a single market, e.g.
BTC-USD.POST /api/v1/orders
POST /api/v1/orders
Submits a limit order. Returns the order, any fills that occurred, and whether the order is resting in the book.Request bodyResponse fields
string
required
Market symbol, e.g.
BTC-USD. Must follow the BASE-QUOTE format.string
required
BUY or SELL.number
required
Limit price. Must be greater than zero and align to the market’s
tick_size.number
required
Order quantity. Must be at least the market’s
min_order_quantity.object
required
The submitted order with its assigned
id and current remaining quantity.array
required
List of fills that occurred immediately on submission. Empty if the order rested.
boolean
required
true if the order has remaining quantity in the book after matching.PATCH /api/v1/orders/{order_id}
PATCH /api/v1/orders/{order_id}
Amends the remaining quantity of a resting order. You can only reduce Request body
remaining — increasing it is not allowed.Path parametersstring
required
UUID of the resting order to amend.
number
required
New remaining quantity. Must be greater than zero and less than or equal to the current remaining.
DELETE /api/v1/orders/{order_id}
DELETE /api/v1/orders/{order_id}
Cancels a resting order. Returns the canceled order.Path parameters
string
required
UUID of the order to cancel.
Data model notes
sideisBUYorSELLprice,quantity, andremainingare unsigned 64-bit integers (u64)- The per-market net position limit is +/-1000
- Traders can sell from flat and go short; order admission is based on worst-case net exposure if all resting open orders were to execute
- Realized PnL is tracked on positions; no pre-seeded inventory or cash balance is required to open a long or short position
- Leaderboard ranking uses settled prices, orderbook marks, or market reference prices
- Pagination is not yet implemented