Start an internal CEX transfer
curl --request POST \
--url https://api.portfobit.com/api/v1/accounts/{account_id}/internal-transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"from_account_type": "<string>",
"to_account_type": "<string>",
"asset": "<string>",
"amount": "<string>",
"otp_code": "<string>",
"client_order_id": "<string>"
}
'import requests
url = "https://api.portfobit.com/api/v1/accounts/{account_id}/internal-transfers"
payload = {
"from_account_type": "<string>",
"to_account_type": "<string>",
"asset": "<string>",
"amount": "<string>",
"otp_code": "<string>",
"client_order_id": "<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({
from_account_type: '<string>',
to_account_type: '<string>',
asset: '<string>',
amount: '<string>',
otp_code: '<string>',
client_order_id: '<string>'
})
};
fetch('https://api.portfobit.com/api/v1/accounts/{account_id}/internal-transfers', 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}/internal-transfers",
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([
'from_account_type' => '<string>',
'to_account_type' => '<string>',
'asset' => '<string>',
'amount' => '<string>',
'otp_code' => '<string>',
'client_order_id' => '<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}/internal-transfers"
payload := strings.NewReader("{\n \"from_account_type\": \"<string>\",\n \"to_account_type\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"otp_code\": \"<string>\",\n \"client_order_id\": \"<string>\"\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/{account_id}/internal-transfers")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_account_type\": \"<string>\",\n \"to_account_type\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"otp_code\": \"<string>\",\n \"client_order_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/accounts/{account_id}/internal-transfers")
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 \"from_account_type\": \"<string>\",\n \"to_account_type\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"otp_code\": \"<string>\",\n \"client_order_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "act_01J2K8X",
"action_type": "internal_transfer",
"status": "succeeded",
"action_summary": {
"account_id": "acc_01H8XFK9A",
"from_account_type": "spot",
"to_account_type": "swap",
"asset": "USDT",
"amount": "1000"
},
"provider_reference_id": "transfer_123",
"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": "120000",
"gross_leverage": "1.94",
"margin_utilization": "0.32"
}
},
"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"
}
}{
"error": {
"code": "invalid_order_parameters",
"message": "A limit order requires a price.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "trading_otp_required",
"message": "A current trading OTP is required before this action can run.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "idempotency_conflict",
"message": "This Idempotency-Key was already used for a different request.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "action_rate_limited",
"message": "This protected action is temporarily rate limited.",
"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"
}
}Trading
Start an internal CEX transfer
Requires transfer:write, an active Plus or Pro subscription, explicit user confirmation, Idempotency-Key, and a current otp_code. The transfer is restricted to two account partitions of the same CEX account.
POST
/
accounts
/
{account_id}
/
internal-transfers
Start an internal CEX transfer
curl --request POST \
--url https://api.portfobit.com/api/v1/accounts/{account_id}/internal-transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"from_account_type": "<string>",
"to_account_type": "<string>",
"asset": "<string>",
"amount": "<string>",
"otp_code": "<string>",
"client_order_id": "<string>"
}
'import requests
url = "https://api.portfobit.com/api/v1/accounts/{account_id}/internal-transfers"
payload = {
"from_account_type": "<string>",
"to_account_type": "<string>",
"asset": "<string>",
"amount": "<string>",
"otp_code": "<string>",
"client_order_id": "<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({
from_account_type: '<string>',
to_account_type: '<string>',
asset: '<string>',
amount: '<string>',
otp_code: '<string>',
client_order_id: '<string>'
})
};
fetch('https://api.portfobit.com/api/v1/accounts/{account_id}/internal-transfers', 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}/internal-transfers",
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([
'from_account_type' => '<string>',
'to_account_type' => '<string>',
'asset' => '<string>',
'amount' => '<string>',
'otp_code' => '<string>',
'client_order_id' => '<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}/internal-transfers"
payload := strings.NewReader("{\n \"from_account_type\": \"<string>\",\n \"to_account_type\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"otp_code\": \"<string>\",\n \"client_order_id\": \"<string>\"\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/{account_id}/internal-transfers")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_account_type\": \"<string>\",\n \"to_account_type\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"otp_code\": \"<string>\",\n \"client_order_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/accounts/{account_id}/internal-transfers")
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 \"from_account_type\": \"<string>\",\n \"to_account_type\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"otp_code\": \"<string>\",\n \"client_order_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "act_01J2K8X",
"action_type": "internal_transfer",
"status": "succeeded",
"action_summary": {
"account_id": "acc_01H8XFK9A",
"from_account_type": "spot",
"to_account_type": "swap",
"asset": "USDT",
"amount": "1000"
},
"provider_reference_id": "transfer_123",
"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": "120000",
"gross_leverage": "1.94",
"margin_utilization": "0.32"
}
},
"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"
}
}{
"error": {
"code": "invalid_order_parameters",
"message": "A limit order requires a price.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "trading_otp_required",
"message": "A current trading OTP is required before this action can run.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "idempotency_conflict",
"message": "This Idempotency-Key was already used for a different request.",
"details": {}
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-08-08T08:00:00Z"
}
}{
"error": {
"code": "action_rate_limited",
"message": "This protected action is temporarily rate limited.",
"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.
Required string length:
1 - 255Path Parameters
Connected CEX account ID.
Body
application/json