Cancel Orders

Cancel an Open Order

PUT https://api.liquid.com/orders/{order_id}/cancel OR /orders/client:{client_order_id}/cancel

Cancel an open order with order ID or client order ID.

Path Parameters

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
}

Cancellation requests for non-live orders will be responded with 404.

Cancel All Open Orders

PUT https://api.liquid.com/orders/cancel_all

Cancel all open orders in bulk. 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. This endpoint does not cancel conditional orders (take profit & stop loss on positions).

Request Body

HTTP 200
{
   "models":[
      {
         "id":12345,
         "client_order_id":"0987aaaaa"
      },
      {
         "id":12346,
         "client_order_id":"0987bbbbb"
      },
      {
         "id":12347,
         "client_order_id":null
      }
   ]
}

Last updated