Skip to main content
The client.orders namespace provides full lifecycle management for your open and historical orders. Use these methods to inspect order state, amend resting orders, cancel individual orders or all orders at once, submit multiple orders in a single batch request, and retrieve fill records for a subaccount.

orders.get

Retrieve a single order by its ID. Method: client.orders.get(order_id) — GET /v1/orders/{id}
integer | string
required
The Molecule order ID to retrieve. Accepts either the integer ID or its string representation.

orders.list

List all orders for a subaccount, optionally filtered by status. Method: client.orders.list(subaccount_id, status=None) — GET /v1/orders
string
required
The subaccount whose orders to retrieve.
OrderStatus
Optional status filter. One of PENDING_SUBMISSION, OPEN, PARTIAL, FILLED, CANCELLED, REJECTED, or EXPIRED. Omit to return orders across all statuses.

orders.amend

Amend a resting order’s price, quantity, or other mutable fields. Method: client.orders.amend(order_id, **payload) — PATCH /v1/orders/{id}
integer | string
required
The ID of the order to amend. The order must be in an amendable state (OPEN or PARTIAL).
string
New limit price as a decimal string.
string
New quantity as a decimal string. May be reduced but not increased beyond the original quantity on some venues.
Only pass fields you want to change. Unspecified fields retain their current values.

orders.cancel

Cancel a single open order by ID. Method: client.orders.cancel(order_id) — DELETE /v1/orders/{id}
integer | string
required
The ID of the order to cancel.

orders.cancel_all

Cancel all open orders for a subaccount. Omit subaccount_id to cancel across all subaccounts. Method: client.orders.cancel_all(subaccount_id=None) — POST /v1/orders/cancel-all
string
The subaccount whose open orders to cancel. Omit to cancel across all subaccounts associated with your key.
This action is irreversible. All resting orders for the specified scope are cancelled immediately.

orders.batch

Submit multiple orders in a single atomic request. Useful for placing a set of related orders while minimising round-trips. Method: client.orders.batch(orders) — POST /v1/orders/batch
array
required
A list of order objects. Each object accepts the same fields as a single order creation payload, including subaccount_id, instrument_id, side, type, tif, price, qty, and routing.

orders.fills

Retrieve all fill records for a subaccount. Method: client.orders.fills(subaccount_id) — GET /v1/fills
string
required
The subaccount whose fill history to retrieve.
Fill records are also accessible via client.portfolio.fills(subaccount_id), which exposes the same GET /v1/fills endpoint. Use whichever namespace is more natural for your workflow.

Error reference