NOTE
- Lite URL:
https://lite-api.jup.ag/trigger/v1/cancelOrder
- Pro URL:
https://api.jup.ag/trigger/v1/cancelOrder
- Get a list of the order accounts you want to cancel via
/getTriggerOrders
endpoint. - Use the list of order accounts to make a post request to the
/cancelOrder
endpoint to get the transaction to cancel one or multiple orders. - Sign then send the transaction to the network either via
/execute
endpoint or by yourself.
GET TRIGGER ORDERSRefer to the
/getTriggerOrders
section to prepare the list of order accounts you want to cancel.INFOTo cancel multiple orders, you can use the
/cancelOrders
endpoint to pass in a list of order accounts and it will build the transaction for multiple cancellations.Cancel Order
Cancel Order Response
Success Example ResponseCancel Orders
WARNINGIf no orders are specified, the API will return the transaction to cancel ALL open orders, batched in groups of 5 orders.
TIPOrders are batched in groups of 5, if you have 6 orders to cancel, you will receive 2 transactions.Do note that you will receive a list of transactions, so you will need to access each transaction in it to sign and send individually.If using
/execute
endpoint, you should pass in the same requestId
for the different transactions.