For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/institutional/cancel-orders-cefi.md.
Cancel order
Begins the cancellation process of an existing active order from the exchange. N.B. it is still possible to receive trades on the order that is being canceled.
JWTAuthorizationBearer <JWT>Present a True Markets-issued JWT access
token as Authorization: Bearer <token>, together with
x-truex-auth-timestamp (current Unix seconds, which guards against
replays). No request signing is required.
Obtain a token pair by exchanging a signed challenge for your
registered ES256 (EC P-256) API key at POST /v1/auth/api-key/token
(see the Auth API); the same token is issued by the standard sign-in
flows.
The token must carry a client_id claim, which scopes every request
to your CeFi client. The claim is present only once your account is
enabled for CeFi trading; a JWT without a client_id claim is
rejected with 401 Unauthorized.
ref_id*stringID of order to cancel. For id_type=exchange (default): positive integer. For id_type=client: 1-18 char ASCII string or 36-char UUID.
^(?!^0$)[a-zA-Z0-9-]+$1 <= lengthid_type?stringType of ID the ref_id is, must be either 'client' or 'exchange'. If omitted will default to 'exchange'
"client""exchange"x-truex-auth-timestamp*stringTimestamp when request was made in seconds since epoch. Must be no older than 15 seconds and no more than 1 second in the future. It guards against replayed requests.
Successful operation.
application/json- response
id?stringstatus?stringThe current status of the order.
- INITIALIZED Order has been created, but not sent yet.
- NEW_PENDING Order has been sent, but not confirmed by the exchange or downstream process.
- REJECTED An order setting or market condition prevents the order from getting processed.
- ACTIVE The order was accepted by the system and open to trading (order and market conditions permitting).
- FILLED The entire order traded.
- CANCEL_PENDING Indicates a cancel request was received and being processed.
- CANCELED The order was canceled from a cancel request, order conditions, or market conditions.
- MODIFY_PENDING Indicates a modification request was received and being processed.
"INITIALIZED""NEW_PENDING""REJECTED""ACTIVE""FILLED""CANCEL_PENDING""CANCELED""MODIFY_PENDING"order_info?modify_info?external_id?stringA unique identifier created by the client. Must be in one of the following formats:
- UUID version 4 in its human readable form, with hypens, and in lowercase.
- ASCII character string of up to 18 characters containing only the unreserved URL characters: letters (a–z, A–Z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~).
ref_external_id?stringA unique identifier created by the client. Must be in one of the following formats:
- UUID version 4 in its human readable form, with hypens, and in lowercase.
- ASCII character string of up to 18 characters containing only the unreserved URL characters: letters (a–z, A–Z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~).
pending_qty?stringOrder quantity that has been acknowledge by the exchange but is not yet trading.
leaves_qty?stringOrder quantity that is currently active in the market.
executed_qty?stringAmount of quantity currently executed.
executed_vwap?stringVolume weighted average price calculation for all executions on the order.
curl -X DELETE 'https://api.truex.co/v1/cefi/orders/string' \ -H 'x-truex-auth-timestamp: string'{ "id": "799477895858487977", "status": "ACTIVE", "order_info": { "msg_id": "799477895858487977", "parent_id": "432351810263056385", "client_id": "78901949710204932", "instrument_id": "78901949723181070", "qty": "0.00145", "price": "111067", "flags": [ "USE_AGGRESSIVE_PRICING" ], "side": "BUY", "type": "LIMIT", "tif": "GTC", "exec_inst_flags": [ "ALO" ], "hold_fee_bps": "20", "hold_fee_rate": "0.002", "stp": "NONE" }, "modify_info": { "msg_id": "1", "parent_id": "1", "client_id": "1", "prev_modify": "0", "new_qty": "0", "new_price": "0", "new_type": "MARKET" }, "external_id": "EXT-ORDER-123", "ref_external_id": "REF-EXT-ORDER-123", "pending_qty": "0", "leaves_qty": "0.00145", "executed_qty": "0.00239", "executed_vwap": "111050.5"}Modify order PATCH
Modify an existing active order request.
Cancel all orders DELETE
Requests cancellation of every active order belonging to the authenticated client. Processed asynchronously: the gateway dispatches a cancel per order and returns 202 Accepted immediately, listing the orders a cancel was dispatched for in accepted. Per-order completion is reported on the order event stream (cancel reports), not in this response. N.B. it is still possible to receive trades on an order while it is being canceled.