One Trading API
REST APIWebSocket API
REST APIWebSocket API
  1. Trading
  • Public
    • Currencies
      GET
    • Instruments
      GET
    • Candlesticks
      GET
    • Fee Groups
      GET
    • Order Book
      GET
    • Market Ticker
      GET
    • Market Ticker For Instrument
      GET
    • Time
      GET
  • Trading
    • Balances
      GET
    • Fees
      GET
    • Get Orders
      GET
    • Create Order
      POST
    • Get Order by Order ID
      GET
    • Get Order by Client ID
      GET
    • Cancel All Orders
      DELETE
    • Cancel Order by Order ID
      DELETE
    • Cancel Order by Client ID
      DELETE
    • Get Trades for Order
      GET
    • Get Trades
      GET
    • Get Trade by Trade ID
      GET
  • Futures
    • Introduction
    • Funding Rate Methodology
    • Current Funding Rate
      GET
    • Funding Rate History
      GET
    • Futures Portfolio Summary
      GET
    • Get Futures Open Positions
      GET
  1. Trading

Cancel Order by Client ID

DELETE
https://api.onetrading.com/fast/v1/account/orders/client/{client_id}
Submits a request to cancel an open order by providing a valid client_id.
Note
If you have created multiple orders with the same client_id, only the most recent will be cancelled with this request. It is your responsibility to ensure uniqueness in your client_ids.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request DELETE 'https://api.onetrading.com/fast/v1/account/orders/client/'
Response Response Example
200 - Success
{
  "order_id": "e4cc5059-b6dd-4e7e-9d22-2d3576333fab",
  "client_id": "316d076d-76f7-49c6-beb1-7831e0f93a9e",
  "account_id": "726288e6-a463-4f88-9068-024ae8f97a34",
  "instrument_code": "SOL_EUR",
  "time": "2024-11-14T15:56:37.417Z",
  "side": "SELL",
  "price": "150",
  "amount": "1",
  "type": "LIMIT",
  "status": "CANCELLED"
}

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Path Params
client_id
string <uuid>
required

Responses

🟢200OK
application/json
Body
order_id
string <uuid>
required
client_id
string <uuid>
required
account_id
string <uuid>
required
instrument_code
string 
required
time
string <date-time>
required
side
string 
required
price
string 
required
amount
string 
required
type
enum<string> 
required
Allowed value:
LIMIT
status
enum<string> 
required
Allowed value:
CANCELLED
🟠400Bad Request
🟠404Record Not Found
Previous
Cancel Order by Order ID
Next
Get Trades for Order
Built with