curl --request POST \
--url https://api.portfobit.com/api/v1/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"connector_id": "<string>",
"credentials": {},
"tags": [
"<string>"
]
}
'import requests
url = "https://api.portfobit.com/api/v1/accounts"
payload = {
"name": "<string>",
"connector_id": "<string>",
"credentials": {},
"tags": ["<string>"]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
connector_id: '<string>',
credentials: {},
tags: ['<string>']
})
};
fetch('https://api.portfobit.com/api/v1/accounts', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'connector_id' => '<string>',
'credentials' => [
],
'tags' => [
'<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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"credentials\": {},\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.portfobit.com/api/v1/accounts")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"credentials\": {},\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"credentials\": {},\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "acc_01H8XFK9A",
"connector_id": "con_binance",
"name": "Binance_Main",
"venue": "binance",
"market_type": "crypto",
"tags": [
"Long_Term"
],
"portfolio_ids": [
"pf_01J2K7M9N3"
],
"api_key_masked": "VMx8_ellipsis_9Lp2",
"requested_permissions": {
"read": true,
"trade": false,
"transfer": false,
"withdraw": false
},
"permission_status": "verified",
"permission_issue_code": null,
"inspectable_permissions": [
"read",
"trade",
"transfer",
"withdraw"
],
"status": "active",
"subscription_access": "available",
"last_synced_at": "2026-08-07T08:00:00Z",
"created_at": "2026-08-01T00:00:00Z",
"updated_at": "2026-08-07T08:00:00Z"
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-07T08:00:01Z"
}
}{
"error": {
"code": "invalid_connector_id",
"message": "Connector ID is invalid.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "connector_not_found",
"message": "Connector not found.",
"details": {
"connector_id": "con_unknown"
}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "duplicate_account_connection",
"message": "This CEX credential is already connected.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}Create a CEX account connection
Requires account:write and Idempotency-Key. Credentials are encrypted and are never returned. requested_permissions is the user’s declaration and execution switch; withdraw must be false. A declared permission that the connector cannot inspect remains unknown rather than denied, and the provider makes the final check when that capability is used.
curl --request POST \
--url https://api.portfobit.com/api/v1/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"connector_id": "<string>",
"credentials": {},
"tags": [
"<string>"
]
}
'import requests
url = "https://api.portfobit.com/api/v1/accounts"
payload = {
"name": "<string>",
"connector_id": "<string>",
"credentials": {},
"tags": ["<string>"]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
connector_id: '<string>',
credentials: {},
tags: ['<string>']
})
};
fetch('https://api.portfobit.com/api/v1/accounts', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'connector_id' => '<string>',
'credentials' => [
],
'tags' => [
'<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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"credentials\": {},\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.portfobit.com/api/v1/accounts")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"credentials\": {},\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"connector_id\": \"<string>\",\n \"credentials\": {},\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "acc_01H8XFK9A",
"connector_id": "con_binance",
"name": "Binance_Main",
"venue": "binance",
"market_type": "crypto",
"tags": [
"Long_Term"
],
"portfolio_ids": [
"pf_01J2K7M9N3"
],
"api_key_masked": "VMx8_ellipsis_9Lp2",
"requested_permissions": {
"read": true,
"trade": false,
"transfer": false,
"withdraw": false
},
"permission_status": "verified",
"permission_issue_code": null,
"inspectable_permissions": [
"read",
"trade",
"transfer",
"withdraw"
],
"status": "active",
"subscription_access": "available",
"last_synced_at": "2026-08-07T08:00:00Z",
"created_at": "2026-08-01T00:00:00Z",
"updated_at": "2026-08-07T08:00:00Z"
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-07T08:00:01Z"
}
}{
"error": {
"code": "invalid_connector_id",
"message": "Connector ID is invalid.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "connector_not_found",
"message": "Connector not found.",
"details": {
"connector_id": "con_unknown"
}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "duplicate_account_connection",
"message": "This CEX credential is already connected.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}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.
1 - 255Body
Show child attributes
Show child attributes
User-declared CEX credential capabilities and execution switches. A capability outside a connector's inspectable_permissions remains unknown rather than denied; an explicit denial requires reliable provider evidence.
Show child attributes
Show child attributes