Order states
An order that ends as
cancelled, expired or rejected can have a filled_quantity above zero: shares that traded before it ended. We record those fills first, so you receive an order.partially_filled event before the final one.
New states can be added. Treat a state you don’t recognise as not final, and retrieve the order again later. See Versioning.
Order types
The broker accepts limit orders only for ETFs. A limit order on any other security is rejected with
422 order_rejected and reject_reason set to limit_orders_etf_only. The order is stored as rejected, so place a market order with a new Idempotency-Key.
Time in force
We accept every
type with every time_in_force. The broker decides which combinations it supports. If it doesn’t support one, the order comes back as 422 order_rejected, and reject_reason says why.
Fills
We check the broker for changes to your open orders every 30 seconds. When an order fills, partly or fully, we record the change, and you receive the event within seconds of that. Expect a fill to reach you within about a minute of the trade. You can also retrieve the order withGET /v1/orders/{id}, which returns what we’ve recorded and doesn’t ask the broker.
Cancel an order
SendDELETE /v1/orders/{id}. You can cancel only a limit order that is pending or partially_filled.
Estimate before you order
POST /v1/orders/estimate takes the same body as POST /v1/orders and returns estimated_total_kobo without placing anything. For a buy, it’s the estimated cost. For a sell, it’s the estimated proceeds. The figure is the broker’s estimate and is indicative. The quickstart shows how the sandbox works it out.