Skip to content

Create an order ​

http
POST /api/orders

Trader

Body ​

FieldTypeRules
typeenumSELL or BUY
xlmAmountstring | number≤ 7 decimals, between MIN_TRADE_XLM (10) and MAX_TRADE_XLM (100,000)
ngnRatestring | number≤ 2 decimals, > 0
paymentMethodsenum[]At least one; duplicates removed
termsstring, optional≤ 500 chars; empty string ignored
json
{ "type": "SELL", "xlmAmount": "100", "ngnRate": "520.50", "paymentMethods": ["OPAY", "KUDA"], "terms": "Own-name accounts only" }

Additional checks ​

CheckApplies to
Fewer than 10 active ordersAll
A payout account for every methodSELL
available ≥ committed + xlmAmount + 2SELL

expiresAt is set to now + ORDER_TTL_MINUTES. An order:created socket event is broadcast.

Response 201 ​

The order with user (public fields).

Errors ​

StatusCodeCause
400VALIDATION_ERROR
403EMAIL_NOT_VERIFIED, KYC_REQUIRED
422ORDER_SIZE_OUT_OF_RANGE
422TOO_MANY_ORDERS
422PAYMENT_ACCOUNT_REQUIREDdetails.missing lists methods
422INSUFFICIENT_BALANCEdetails has available, committed, needed
503HORIZON_UNAVAILABLEBalance check failed

Nexlm is a peer-to-peer facilitator and never holds customer Naira.