Skip to main content
The ordersByCloids query fetches resting orders by the client-assigned order IDs you set at placement time (the c field in a place order action). The response orders[] array uses the same fields as userOrders.
Only orders currently on the book are returned — resting orders, including partially filled ones. Fully filled orders, canceled orders, and untriggered conditional orders are not returned, and an ID that matches no resting order is omitted without an error. An absent order therefore does not tell you whether it filled, was canceled, or never existed. To reconcile, use userOrders for active orders and orderHistory or userFills for terminated orders and fills.

Request

string
required
type (required) — Must be "ordersByCloids".
string
required
accountId (required) — Your account ID. Client order IDs are scoped to an account, so this field is required to avoid collisions across accounts.
integer
required
marketDeployerId (required) — The Market Deployer the orders belong to. An order under a different Market Deployer is not returned.
string[]
required
cloids (required) — Array of client order IDs to look up, each expressed as an int64 decimal string. These must match the c values you supplied when the orders were placed. At most 256 IDs per request. A missing field, a value that is not an array of IDs, or more than 256 IDs returns HTTP 400 with code BAD_REQUEST and message "missing or invalid cloids array".

Response

string
Always "ordersByCloids".
string
The account ID from the request.
integer
The marketDeployerId from the request.
boolean
Always present. false means orders is the complete result. true means the response has an upper bound on the number of orders and orders was cut at an order boundary; split the client order IDs into smaller requests to read the rest.
object[]
The matching resting orders. Each element carries the fields described in userOrders — including originalSize, since size is the remaining quantity rather than the quantity originally submitted.