Core Objects
Use IDs and symbols exactly as returned by the API. Do not infer pair names, decimal precision, minimum sizes, or route availability from hardcoded configuration.
Today, the supported exchange pair is
USD/NGN. As new pairs are added, they will appear in GET /partner/exchange/markets; build against discovery rather than assuming this list is permanent.
Market Data
Market data routes are read-only and should be used before order submission and during reconciliation:
Market data changes frequently. Treat responses as snapshots, cache only for short intervals, and refresh before sending price-sensitive orders.
Orders
An order request is an instruction, not a guarantee that the order has fully executed. The create route validates the request, records the intent, and returns an order that may still be pending. Matching and final settlement are asynchronous.
For example, on
USD/NGN, USD is the base currency and NGN is the quote currency.
Order Lifecycle
Orders can move through the following statuses:
Only
filled, cancelled, rejected, and expired should be treated as
terminal. A partially_filled order still has remaining quantity unless the
order later moves to a terminal state.
Reconciliation Pattern
- Generate a UUID
Idempotency-Keyand a uniqueclient_order_id, and store both with the local order intent. - Submit the order with
POST /partner/exchange/ordersand store the returnedorder_id. - If the create response is uncertain, retry with the same
Idempotency-Key. A retry answers with a neworder_id; the duplicate command is discarded, so reconcile byclient_order_idrather than trusting the retry’s ID. See Idempotency. - Apply exchange webhooks or private WebSocket updates to the local order.
- Periodically reconcile order detail, its fills, and wallet transactions from REST.
- Run reconciliation after event-consumer downtime or a connection reset.
X-Api-Key with trades:view for reads, trades:create for order creation, and trades:execute for cancel and replace. Always send Idempotency-Key on order writes.