Cancel Orders

put
Cancel an Open Order

https://api.liquid.com/orders/{order_id}/cancel
Cancel an open order.
Request
Response
Request
Path Parameters
order_id
required
string
Example of order ID: 1587896117.
Response
200: OK
HTTP 200
{
"id": 1587896117,
"order_type": "limit",
"quantity": "1.0",
"disc_quantity": "0.0",
"iceberg_total_quantity": "0.0",
"side": "buy",
"filled_quantity": "0.0",
"price": 5000.0,
"created_at": 1598948022,
"updated_at": 1598948363,
"status": "cancelled",
"leverage_level": 1,
"source_exchange": "QUOINE",
"product_id": 1,
"margin_type": null,
"take_profit": null,
"stop_loss": null,
"trading_type": "spot",
"product_code": "CASH",
"funding_currency": "USD",
"crypto_account_id": null,
"currency_pair_code": "BTCUSD",
"average_price": 0.0,
"target": "spot",
"order_fee": 0.0,
"source_action": "manual",
"unwound_trade_id": null,
"trade_id": null,
"client_order_id": "1165241_1598948019390",
"margin_used": "0.0",
"margin_interest": "0.0",
"unwound_trade_leverage_level": null
}

put
Cancel All Open Orders

https://api.liquid.com/orders/cancel_all
Cancel all open orders in bulk. For trading type of spot, this excludes take profit orders. Below are optional body parameters, not specifying any body parameters will result in cancelling all open orders regardless of Product ID, Trading Type, or Side.
Request
Response
Request
Body Parameters
product_id
optional
string
Specify { product_id: 1 } to cancel all BTCUSD orders, for ETHUSD specify { product_id: 27 }.
trading_type
optional
string
Specify { trading_type: "spot" } to cancel all spot orders, for margin, CFD, and Perpetual specify { trading_type: "margin" }, { trading_type: "cfd" }, { trading_type: "perpetual"}.
side
optional
string
Specify { side: "buy" } to cancel all buy side, for sells specify { side: "sell" } .
Response
200: OK
List of all orders that were cancelled.
HTTP 200
{
"models":[
{
"id":12345,
"client_order_id":"0987aaaaa"
},
{
"id":12346,
"client_order_id":"0987bbbbb"
},
{
"id":12347,
"client_order_id":null
}
]
}