HomeDocumentationAPI Reference
Log In
API Reference

Cancel Algo Order

Method Name

private/cancel_algo_order

Cancels a single active algo order.
Required minimum session key permission level is admin

Parameters

order_idstringrequired
subaccount_idintegerrequired

Response

idstring or integerrequired
resultobjectrequired
result.amountstringrequired
Order amount in units of the base
result.average_pricestringrequired
Average fill price
result.cancel_reasonstringrequired
If cancelled, reason behind order cancellation
enum user_requestmmp_triggerinsufficient_marginsigned_max_fee_too_lowcancel_on_disconnectioc_or_market_partial_fillsession_key_deregisteredsubaccount_withdrawncompliancetrigger_failedvalidation_failedalgo_completed
result.creation_timestampintegerrequired
Creation timestamp (in ms since Unix epoch)
result.directionstringrequired
Order direction
enum buysell
result.filled_amountstringrequired
Total filled amount for the order
result.instrument_namestringrequired
Instrument name
result.is_transferbooleanrequired
Whether the order was generated through private/transfer_position
result.labelstringrequired
Optional user-defined label for the order
result.last_update_timestampintegerrequired
Last update timestamp (in ms since Unix epoch)
result.limit_pricestringrequired
Limit price in quote currency
result.max_feestringrequired
Max fee PER contract, denominated in USDC.Max fee must be > 2 x max(taker_fee, maker_fee) x spot_price + extra_fee / amount.If the order crosses the book, it must be >= 2 x max(taker_fee, maker_fee) x spot_price + base_fee / fill_amount + extra_fee / amount.Note, in this calculation, regardless of the account taker / maker fees, the standard taker / maker fees are used.
result.mmpbooleanrequired
Whether the order is tagged for market maker protections
result.nonceintegerrequired
Unique nonce defined as (UTC_timestamp in ms)(random_number_up_to_3_digits) (e.g. 1695836058725001, where 001 is the random number)
result.order_feestringrequired
Order fee paid so far
result.order_idstringrequired
Order ID
result.order_statusstringrequired
Order status
enum openfilledcancelledexpireduntriggeredalgo_active
result.order_typestringrequired
Order type
enum limitmarket
result.quote_idstring or nullrequired
Quote ID if the trade was executed via RFQ
result.signaturestringrequired
Ethereum signature of the order
result.signature_expiry_secintegerrequired
Signature expiry timestamp
result.signerstringrequired
Owner wallet address or registered session key that signed order
result.subaccount_idintegerrequired
Subaccount ID
result.time_in_forcestringrequired
Time in force
enum gtcpost_onlyfokioc
result.algo_duration_secinteger or null
Total execution window in seconds
result.algo_num_slicesinteger or null
Number of child executions
result.algo_slices_completedinteger or null
Number of slices executed so far
result.algo_typestring or null
Algo order type (twap or vwap)
enum twap
result.extra_feestring or null
(Optional) Extra fee in USDC added to the total final fee paid by user (must be between 0.000001 and 1,000 USDC).
result.replaced_order_idstring or null
If replaced, ID of the order that was replaced
result.signed_limit_pricestring or null
The original limit price that the user signed. Only set when the order was adjusted (i.e., for post-only orders with reject_post_only=false that would have crossed). Used for on-chain submission.
result.trigger_pricestring or null
(Required for trigger orders) Index or Market price to trigger order at
result.trigger_price_typestring or null
(Required for trigger orders) Trigger with Index or Mark Price
enum markindex
result.trigger_reject_messagestring or null
(Required for trigger orders) Error message if error occured during trigger
result.trigger_typestring or null
(Required for trigger orders) Stop-loss or Take-profit.
enum stoplosstakeprofit

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}