Cancel a Delta Order
To cancel orders, you can use the /cancel endpoint provided by the API, which would remove the orders from the order book. The signature is an EIP-712 signature, built with the following structure. Both LIMIT and MARKET orders can be canceled.
domain
{
"name": "Portikus",
"version": "2.0.0",
"chainId": <chainId>,
"verifyingContract": <deltaAddress>
}type
{
"OrderCancellations": [
{
"name": "orderIds",
"type": "string[]",
}
]
}value
{
"orderIds": [<id1>, <id2>]
}POST https://api.paraswap.io/delta/orders/cancel
Body
Name
Type
Description
orderIds
string[]
Order IDs to cancel
signature
string
EIP-712 signature with the structure described above
Response
{
"success": true
}{
"errorType": "OrderCancellationError",
"details": "Order not found"
}Upon successful cancellation, the API will return a confirmation message indicating that the limit order has been successfully cancelled.
Last updated