Skip to main content
All requests go to the base URL: https://exchange.jamesxu.dev A machine-readable OpenAPI schema and Swagger UI are also available:

Public endpoints

No authentication required.
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.
Returns the list of all configured markets. No authentication required.

Trader routes require the x-api-key header. API keys are provisioned by an admin and are prefixed with exch_.
Returns the authenticated trader’s profile.
Returns all open positions for the authenticated trader.
  • net_quantity is a signed integer. Positive values are long, negative values are short.
  • realized_pnl accumulates as fills close or reduce the position.
Returns a portfolio snapshot including position limit and all current positions.
position_limit reflects the exchange-wide per-market net position limit of +/-1000.
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.
Returns all resting open orders for the authenticated trader. Filter by market using the optional market query parameter.Query parameters
string
Optional. Filter results to a single market, e.g. BTC-USD.
Returns all fills for the authenticated trader. Filter by market using the optional market query parameter.Query parameters
string
Optional. Filter results to a single market, e.g. BTC-USD.
Submits a limit order. Returns the order, any fills that occurred, and whether the order is resting in the book.Request body
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.
Response fields
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.
Order admission checks worst-case net exposure from all resting open orders. A position limit of +/-1000 applies per market. Exceeding this returns 409 Conflict.
Amends the remaining quantity of a resting order. You can only reduce remaining — increasing it is not allowed.Path parameters
string
required
UUID of the resting order to amend.
Request body
number
required
New remaining quantity. Must be greater than zero and less than or equal to the current remaining.
Cancels a resting order. Returns the canceled order.Path parameters
string
required
UUID of the order to cancel.

Data model notes

  • side is BUY or SELL
  • price, quantity, and remaining are 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