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 All Orders

DELETE
https://api.onetrading.com/fast/v1/account/orders
Submits a cancel request for all open orders of an account.
Optionally the user can specify one of an instrument_code, a list of ids representing order_id or a list of client_ids as query parameters. The instrument_code parameter will only cancel orders for the given instrument, while the ids and client_ids parameter can be used to specify various orders regardless to which markets they belong. Calling this endpoint without any of the optional parameters will cancel all orders across all markets for the account. Calling this endpoint with more than one of the specified query parameters is not supported.
One Trading will always fill orders with best effort. Therefore, when attempting to close all orders, these orders may be in the process of being filled. In this case, One Trading will attempt to close the orders but the order may already be partially/fully filled.
Make sure to have a valid API key with the scope TRADE, otherwise this operation will be rejected.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request DELETE 'https://api.onetrading.com/fast/v1/account/orders'
Response Response Example
200 - Success
[
  "7749a0ff-9a5f-41ac-a1a5-dc031a70091c",
  "737f07d9-1711-49d0-a834-80b88329c101"
]

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Query Params
instrument_code
string 
optional
The instrument to cancel all orders for
Example:
BTC_EUR
ids
string 
optional
Array of comma separated order ids to cancel orders for
Example:
[d1efc79d-f78d-4a9d-a4c0-dbe76c9a4e6f,8ada8f2d-56ea-4b24-bfd4-06723dfbb3be]
client_ids
string 
optional
Array of comma separated client ids to cancel orders for
Example:
[d1efc79d-f78d-4a9d-a4c0-dbe76c9a4e6f,8ada8f2d-56ea-4b24-bfd4-06723dfbb3be]

Responses

🟢200Success
application/json
Body
array[string <uuid>]
optional
🟠400Bad Request
Previous
Get Order by Client ID
Next
Cancel Order by Order ID
Built with