Cancel an single Order

This endpoint requires a L2 Header.

Cancel an order.

HTTP REQUEST

DELETE /<clob-endpoint>/order

Request Payload Parameters

NameRequiredTypeDescription
orderIDyesstringID of order to cancel

Response Format

NameTypeDescription
canceledstring[]list of canceled orders
not_canceleda order id -> reason map that explains why that order couldn’t be canceled
resp = client.cancel(order_id="0x38a73eed1e6d177545e9ab027abddfb7e08dbe975fa777123b1752d203d6ac88")
print(resp)

Cancel Multiple Orders

This endpoint requires a L2 Header.

HTTP REQUEST

DELETE /<clob-endpoint>/orders

Request Payload Parameters

NameRequiredTypeDescription
nullyesstring[]IDs of the orders to cancel

Response Format

NameTypeDescription
canceledstring[]list of canceled orders
not_canceleda order id -> reason map that explains why that order couldn’t be canceled
resp = client.cancel_orders(["0x38a73eed1e6d177545e9ab027abddfb7e08dbe975fa777123b1752d203d6ac88", "0xaaaa..."])
print(resp)

Cancel ALL Orders

This endpoint requires a L2 Header.

Cancel all open orders posted by a user.

HTTP REQUEST

DELETE /<clob-endpoint>/cancel-all

Response Format

NameTypeDescription
canceledstring[]list of canceled orders
not_canceleda order id -> reason map that explains why that order couldn’t be canceled
resp = client.cancel_all()
print(resp)
print("Done!")

Cancel orders from market

This endpoint requires a L2 Header.

Cancel orders from market.

HTTP REQUEST

DELETE /<clob-endpoint>/cancel-market-orders

Request Payload Parameters

NameRequiredTypeDescription
marketnostringcondition id of the market
asset_idnostringid of the asset/token

Response Format

NameTypeDescription
canceledstring[]list of canceled orders
not_canceleda order id -> reason map that explains why that order couldn’t be canceled
resp = client.cancel_market_orders(market="0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af", asset_id="52114319501245915516055106046884209969926127482827954674443846427813813222426")
print(resp)