Place an order
Stores the order, then sends it to the exchange once. If an order ends in uncertain, we don’t send it again. Retrieve it, or wait for its event, until it resolves. Requires the trade scope.
Authorizations
Headers
A key you choose to identify this request. Send the same key every time you retry the request. Once used, a key stays tied to that request permanently. It must be printable ASCII with no spaces, and we compare it byte for byte. Send the header only once.
1 - 255^[!-~]+$Body
The order to place or estimate.
Send numbers as JSON numbers, not quoted strings. We reject unknown fields and any field that appears twice, even with different letter case.
An ETF takes limit orders only. Shares take limit and market orders. The broker rejects a market order on an ETF with reject_reason set to etf_limit_orders_only. A market order is priced at the day's price limit: the upper limit for a buy, the lower limit for a sell.
limit, market day: good for the current trading session only. gtc: good till cancelled. ioc: immediate or cancel. fok: fill or kill. We accept every type with every time_in_force. The broker decides which combinations it supports, and rejects the rest as order_rejected with a reject_reason. If it refuses an order with a reason it doesn't publish, the order is uncertain until our operations team reconciles it.
day, gtc, ioc, fok Your own reference for this, such as your internal ID, so you can find it again. 1 to 64 printable ASCII characters, with no spaces, matched exactly. We store it and return it. It's part of the request an Idempotency-Key stands for, so a retry with a different client_reference returns 409. Never put personal data in it: no names, phone numbers, email addresses, BVN, NIN or account numbers of your customers.
1 - 64^[!-~]{1,64}$"ord-88213"
Response
This idempotency key was already used for this same order, so we didn't send anything new. The body shows the order's current state. It reads sending while the first request is in progress, or after it if its outcome was not recorded.
Fees are not on the order. The broker fixes them only on the contract note, so see GET /v1/accounts/{account}/contract-notes for what an order cost.
sending: stored, and the send is in progress. If it still reads sending after its request has ended, its outcome was not recorded: it resolves as an uncertain order does, and an identical order is refused with 409 similar_order_unresolved until then. pending: the exchange has the order. partially_filled, filled: some or all of the order has traded. uncertain: the exchange did not confirm receipt. The gateway does not resubmit it, and our operations team reconciles it against the exchange's records. Until it resolves, an identical order on the same account is refused with 409 similar_order_unresolved. rejected: the broker or the exchange rejected it; see reject_reason. refused: it never reached the exchange: we refused it before sending, or our operations team confirmed the exchange never received it. cancelled: the exchange confirmed the cancel. expired: its time in force ran out. New values can be added: handle an unrecognised value with a safe default.
sending, pending, partially_filled, filled, uncertain, rejected, refused, cancelled, expired Why the broker or the exchange rejected the order. Set only when state is rejected. New values can be added: handle an unrecognised value with a safe default.
insufficient_funds, market_closed, settlement_lockout, etf_limit_orders_only, limit_orders_etf_only, unknown_symbol, symbol_not_tradable, account_not_at_broker, rejected_by_exchange, null The average price the filled shares traded at, in kobo, as a decimal string, before charges. It's exact when it has 12 decimal places or fewer, and otherwise rounded to 12. Null until a share has traded, or when we don't have the exchange's prices for the fills.
^[0-9]+(\.[0-9]{1,12})?$"47512.5"