Moonbase Docs

Cancel an active order

Cancel a single active order by {id} or {client_order_id}. In-memory operations. A successful response guarantees a successful cancel (done order).

Only works on orders that are currently active (open, pending, partially filled).

Requires authentication.

DELETE
/api/v1/order/active
NOVA-KEY<token>

In: header

NOVA-SECRET<token>

In: header

Query Parameters

order_id?string

Order ID to be canceled.

client_order_id?string

Client order id to be canceled.

Response Body

application/json

application/json

curl -X DELETE "https://api.moonbase.vn/api/v1/order/active"
{
  "order": {
    "order_id": "string",
    "client_order_id": "string",
    "user_id": "string",
    "status": "SUBMITTED",
    "done_reason": "string",
    "product_id": "string",
    "side": "BUY",
    "type": "LIMIT",
    "time_in_force": "GTC",
    "post_only": "false",
    "stp": "CANCEL_TAKER",
    "limit_price": "string",
    "base_size": "string",
    "quote_size": "string",
    "exact_quote_size": "string",
    "average_fill_price": "string",
    "filled_base_size": "string",
    "filled_quote_size": "string",
    "maker_fee_rate": "string",
    "taker_fee_rate": "string",
    "fee_asset_id": "string",
    "created_at": "string",
    "updated_at": "string",
    "cancel_requested_at": "string",
    "expired_at": "string",
    "scheduled_at": "string",
    "trades": [
      {
        "id": "string",
        "price": "string",
        "size": "string",
        "liquidity_indicator": "MAKER",
        "time": "string",
        "fee_asset": "string",
        "fee_amount": "string"
      }
    ]
  }
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}