Orders API
Enter, amend, approve, release, cancel and allocate (simulated) orders; fills; blotter views.
Objects
- Order: one security and side, split across one or more accounts (allocations; a block when several). It carries its state, compliance state, approval requirement, algorithm and slices, simulated fills and its history.
hidden_allocationscounts allocations on accounts you may not see (never shown). - Fill: a simulated execution of a slice, with its price, the arrival price and slippage.
- Blotter view: a saved layout of the trade blotter.
Everything is simulated: "simulated": true. Nothing reaches a broker.
Order states
proposed → pending_compliance → compliance_hold ─(override)─┐
→ rejected │
→ pending_approval → approved → working → partially_filled → filled
→ rejected (cancel at any open state → cancelled)| State | Next call |
|---|---|
compliance_hold | POST /orders/{id}/override with a reason (Compliance decides above the threshold: POST /overrides/{id}/decision) |
pending_approval | POST /orders/{id}/approve or /reject, by someone with approve on every account who did not enter it |
approved | POST /orders/{id}/release with an algorithm and slices |
working, partially_filled | wait, POST /orders/{id}/release (mode all runs the remaining slices), /rework, /amend or /cancel |
filled | Operations: POST /orders/{id}/allocate |
The compliance check
POST /orders runs the pre-trade check before answering. The answer's result has the compliance results (rule, outcome, measured, limit), who must still approve, and whether an override is needed. A hard block creates the order in state rejected (201), with the failed checks in result.compliance. Amendments and releases re-check: if they would now break a rule they answer 422 compliance_blocked with the checks in the problem's checks, and nothing changes. Every executed slice is checked against the in-trade rules.
Typical sequence
POST /orders(Idempotency-Key) →pending_approval.- Another person:
POST /orders/{id}/approve. - A trader:
POST /orders/{id}/release{"algo":"vwap","slices":4}→working. GET /orders/{id}/fills, or listen to the webhooksorder.updatedandfill.created.
Amendments need If-Match with the order's ETag (412 when it changed meanwhile).
Endpoints
| Call | What it does | Scope |
|---|---|---|
GET/orders | Orders on the accounts you can see | orders:read |
GET/orders/{id} | One order with allocations, compliance and history | orders:read |
POST/orders | Enter an order: checked by compliance and routed by the workflow rules like any order (paper trading) | orders:write |
POST/orders/{id}/amend | Amend quantity or limit (compliance re-checked; If-Match) | orders:write |
POST/orders/{id}/cancel | Cancel the unfilled part | orders:write |
POST/orders/{id}/release | Release an approved order to the simulator (compliance re-checked) | orders:write |
POST/orders/{id}/rework | Re-plan a working order's unfilled shares with another algo | orders:write |
POST/orders/{id}/approve | Approve (four eyes: never the person who entered it) | orders:approve |
POST/orders/{id}/reject | Reject | orders:approve |
POST/orders/{id}/override | Override a soft compliance warning with a written reason | orders:write |
POST/orders/{id}/allocate | Confirm the allocation of executions (Operations) | orders:write |
GET/orders/{id}/fills | Simulated fills of an order | orders:read |
GET/executions | Simulated fills on the accounts you can see | orders:read |
GET/blotter/views | Saved blotter views (yours and the firm's) | orders:read |
POST/blotter/views | Save a blotter view (validated against the field registry) | orders:write |
PUT/blotter/views/{id} | Replace a blotter view | orders:write |
DELETE/blotter/views/{id} | Delete a blotter view | orders:write |