Skip to main content
An order is uncertain when we sent it and its receipt at the exchange is unconfirmed: the connection dropped, the exchange did not reply in time, or the broker refused it with a reason it doesn’t publish. The order may or may not be at the exchange, so it’s recorded as uncertain, not failed: treating it as failed and placing it again could buy the shares twice.

What you see

POST /v1/orders returns 201 Created with state set to uncertain, and you receive an order.uncertain event. The reason field describes the state. We never resubmit an uncertain order. It stays on your list with its id, and it counts in full against your daily order value.

What to do

  1. Don’t place the same order again under a new Idempotency-Key.
  2. Wait for its next event, or retrieve it with GET /v1/orders/{id}.
  3. Act on the state it moves to:
Retrying with the same key is safe while you wait: it returns 200 OK with the order as it is now. You can’t cancel an uncertain order. A cancel returns 409 order_not_cancelable until the order’s state is known.

How it resolves

About every 30 seconds we check with the broker each uncertain order that hasn’t changed for the longest POST /v1/orders takes to answer. When the broker holds exactly one open order that matches yours and was received while we were sending it, we record it as yours and move it to pending or partially_filled. Our operations team reconciles every order this check cannot match directly with the broker, and records it as held, rejected or never received. If the broker refused an uncertain order, or tells us it expired, we record it as rejected, with reject_reason rejected_by_exchange: no shares traded, and the order is final. If you still want it, place it again with a new Idempotency-Key. A pending order also becomes uncertain if the broker returns another order’s report when asked about it. We record nothing from that report, the automatic check does not change the order, and our operations team reconciles it against the broker’s records. A partially_filled order stays partially_filled in that case, because its fills are already recorded. We check with the broker again at the next check. If a partly filled order stops changing, contact us with its id. Our operations team works from 9:00 to 17:00 West Africa Time (WAT), Monday to Friday. It reconciles an uncertain order the same business day, or the next business day if the order becomes uncertain outside those hours. To ask about one, contact us with its id.

Identical orders while one is unresolved

While an order is unresolved, we refuse an identical order on the same account under a new key: the same symbol, side, quantity, type, time_in_force and price_kobo, whatever its client_reference. You get 409 similar_order_unresolved, and we store nothing, so your new key stays free. We do this because the broker doesn’t echo our reference, and its report doesn’t say which of two identical orders it holds. An order is unresolved while it is uncertain, or while it still reads sending after its request has ended, whether or not you received an answer. A request ends at most the longest any request stays open after the order’s created_at. An order left sending has an outcome that was not recorded, and it resolves as an uncertain order does. We send a 201, 422 order_rejected or 503 order_not_sent only once the outcome is recorded, so an order left sending never follows one of them: your request was answered 503 outcome_not_recorded, or it ended without an answer that gives the order’s outcome. To have it resolved sooner, contact us with its id. An order whose request is still in progress is not counted. An identical order sent under a new key during that request is sent too, and both can trade. Use one key for each order, and reuse it on every retry. The error’s order holds the unresolved order’s id. Retrieve it until it resolves:
  • If it becomes pending, partially_filled or filled, the exchange has it. If your new request repeats it, don’t send it: that would place a second order. If your new request is a separate order, send it again with the key from the request that got the 409.
  • If it becomes rejected, refused or cancelled, it’s final. Check its filled_quantity first: shares that traded before it ended are already bought or sold. Then, if you still want the order, send your new request again with the key from the request that got the 409.

Applications and allocations

Allocations can also become uncertain, for the same reasons. An application becomes uncertain when we can’t read an answer from a registry, the depository or the broker, or can’t confirm that one of them received a step, or when we haven’t asked the depository to open its account within 7 days of when you sent it, or when another answer needs a person, as its reason says: see How we check an application. We don’t send them again ourselves: our operations team reconciles them.

Identical allocations while one is unresolved

While an allocation is unresolved, we refuse another allocation to the same account for the same amount_kobo under a new key, whatever its client_reference. You get 409 similar_allocation_unresolved, and we store nothing, so your new key stays free. We do this because the broker may already have booked the first. An allocation is unresolved while it is uncertain, or while it still reads sending after its request has ended. A request ends at most the longest any request stays open after the allocation’s created_at. An allocation left sending has an outcome that was not recorded. We send a 201, 403 feature_not_enabled, 422 allocation_rejected or 503 allocation_not_sent only once the outcome is recorded, so an allocation left sending never follows one of them: your request was answered 503 outcome_not_recorded, or it ended without an answer that gives the allocation’s outcome. Our operations team reconciles it with the broker, as it does an uncertain one, the same business day, or the next if it becomes unresolved outside 9:00 to 17:00 WAT, Monday to Friday. No automatic check resolves an allocation. An allocation whose request is still in progress is not counted. A second allocation sent under a new key during that request is sent too, and both can be booked. Use one key for each allocation, and reuse it on every retry. The error’s allocation holds the unresolved allocation’s id. Wait for its allocation.booked or allocation.rejected event, or retrieve it until it resolves:
  • If it becomes booked, the broker has it. If your new request repeats it, don’t send it: that would fund the account twice. If your new request is a separate allocation, send it again with the key from the request that got the 409. The allocation’s id and client_reference identify it in your records.
  • If it becomes rejected, the amount has been returned to your wallet. If you still want the allocation, send your new request again with the key from the request that got the 409.