Orders and fills
An order buys or sells one listing in one portfolio. Place it with POST /v1/accounts/{id}/orders (trade
scope) and an Idempotency-Key.
| Field | Values |
|---|---|
side |
buy or sell |
type |
market (at the best price now) or limit (at limitPrice or better) |
quantity |
Units as a decimal string, within the listing’s quantityDecimals |
limitPrice |
Limit orders: the price in the listing’s currency |
linkedTo |
Optional: the instruction this belongs with, for example the currency conversion that funds it |
reason |
A firm’s own trade under a discretionary mandate: why, in one line (required then, at most 200 characters) |
What is set aside
Section titled “What is set aside”The moment an order is accepted, IDEALX sets aside what it needs so it cannot be spent twice:
- a buy sets aside cash:
limitPrice × quantityfor a limit order, or the ask × quantity plus 3% for a market order (so a moving price still fills); what is not used comes back when the order ends; - a sell sets aside the units.
setAside on the order shows what is still held back. Before placing, GET /v1/accounts/{id}/orders/fee returns the
transaction fee the order would pay and an estimate of its value.
Lifecycle
Section titled “Lifecycle”pending_approval ─► placing ─► open ─► partially_filled ─► filled │ │ │ │ │ ├─► waiting_market ─► placing (market closed: sent at the open) │ ├─► waiting_funding ─► placing (the venue is being funded) ─► expired │ ├─► queued ─► … (venues that take orders at set times) │ └─► rejected └──────────────┴────────┴─────────────┴──► cancelled| State | Meaning | Ends? |
|---|---|---|
pending_approval |
The account’s approval policy needs more approvals | |
placing |
Being sent to the venue | |
waiting_market |
The market is closed; sent at the open | |
waiting_funding |
Ready, waiting for the venue to be funded | |
queued |
Collected and sent with others at the venue’s next time | |
open |
Working at the venue | |
partially_filled |
Some units filled, the rest still working | |
filled |
Completely filled | yes |
cancelled |
Cancelled before it filled completely | yes |
rejected |
The venue refused it (rejectReason says why) |
yes |
expired |
Funding did not arrive in time; everything set aside went back | yes |
An order fills in one or more fills. The order shows the running totals: filledQuantity and filledValue (what
was paid for a buy or received for a sell, with any accrued interest for bonds). Once an order has filled, its trade
confirmation is a PDF at GET /v1/orders/{id}/confirmation.pdf, and the trade appears in the account’s activity and
transactions.
Approvals and cancelling
Section titled “Approvals and cancelling”On an account whose policy needs several approvals, the order waits in pending_approval; another person approves
with POST /v1/orders/{id}/approve. POST /v1/orders/{id}/cancel cancels an order that has not filled completely
(409 otherwise). Both need the trade scope.
Following an order
Section titled “Following an order”Subscribe to the order.updated webhook (state changes) and order.expired, and read the order back with
GET /v1/accounts/{id}/orders. See Place and track an order.
Endpoints
Section titled “Endpoints”- GET
/v1/accounts/{id}/orders/feeThe transaction fee an order would pay, before placing it - POST
/v1/accounts/{id}/ordersBuy or sell in a portfolio - GET
/v1/accounts/{id}/ordersOrders on this account, newest first - POST
/v1/orders/{id}/approveApprove an order waiting for you - POST
/v1/orders/{id}/cancelCancel an order that has not filled - GET
/v1/orders/{id}/confirmation.pdfThe trade confirmation for an order that filled