Cancel all live open orders for one market
curl --request DELETE \
--url https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"symbol": "<string>",
"otp_code": "<string>"
}
'import requests
url = "https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders"
payload = {
"symbol": "<string>",
"otp_code": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({symbol: '<string>', otp_code: '<string>'})
};
fetch('https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'otp_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"otp_code\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"otp_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"otp_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "act_01J2K8D",
"action_type": "order_cancel_all",
"status": "succeeded",
"action_summary": {
"account_id": "acc_01H8XFK9A",
"venue": "binance",
"symbol": "BTC/USDT",
"scope": "symbol_open_orders"
},
"provider_reference_id": null,
"failure_code": null,
"failure_message": null,
"risk": {
"status": "available",
"level": "low",
"model_version": "risk_v1",
"as_of": "2026-08-07T08:05:00Z",
"reasons": [],
"metrics": {
"gross_exposure": "0"
}
},
"requested_at": "2026-08-07T08:05:00Z",
"completed_at": "2026-08-07T08:05:01Z"
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-07T08:05:01Z"
}
}Trading
Cancel all live open orders for one market
Requires trade:write, an active Plus or Pro subscription, Idempotency-Key, and otp_code. symbol is required; the server never cancels every market by default.
DELETE
/
accounts
/
{account_id}
/
open-orders
Cancel all live open orders for one market
curl --request DELETE \
--url https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"symbol": "<string>",
"otp_code": "<string>"
}
'import requests
url = "https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders"
payload = {
"symbol": "<string>",
"otp_code": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({symbol: '<string>', otp_code: '<string>'})
};
fetch('https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'otp_code' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"otp_code\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"otp_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/accounts/{account_id}/open-orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"otp_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "act_01J2K8D",
"action_type": "order_cancel_all",
"status": "succeeded",
"action_summary": {
"account_id": "acc_01H8XFK9A",
"venue": "binance",
"symbol": "BTC/USDT",
"scope": "symbol_open_orders"
},
"provider_reference_id": null,
"failure_code": null,
"failure_message": null,
"risk": {
"status": "available",
"level": "low",
"model_version": "risk_v1",
"as_of": "2026-08-07T08:05:00Z",
"reasons": [],
"metrics": {
"gross_exposure": "0"
}
},
"requested_at": "2026-08-07T08:05:00Z",
"completed_at": "2026-08-07T08:05:01Z"
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-07T08:05:01Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Opaque retry key, unique to the same user, method, and path.
Required string length:
1 - 255Path Parameters
Connected CEX account ID.