curl --request POST \
--url https://api.portfobit.com/api/v1/accounts/{account_id}/activity-history-imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"activity_type": "trades",
"symbol": "BTC/USDT",
"from": "2025-01-01T00:00:00Z",
"to": "2025-02-01T00:00:00Z"
}
'import requests
url = "https://api.portfobit.com/api/v1/accounts/{account_id}/activity-history-imports"
payload = {
"activity_type": "trades",
"symbol": "BTC/USDT",
"from": "2025-01-01T00:00:00Z",
"to": "2025-02-01T00:00:00Z"
}
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({
activity_type: 'trades',
symbol: 'BTC/USDT',
from: '2025-01-01T00:00:00Z',
to: '2025-02-01T00:00:00Z'
})
};
fetch('https://api.portfobit.com/api/v1/accounts/{account_id}/activity-history-imports', 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}/activity-history-imports",
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([
'activity_type' => 'trades',
'symbol' => 'BTC/USDT',
'from' => '2025-01-01T00:00:00Z',
'to' => '2025-02-01T00:00:00Z'
]),
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}/activity-history-imports"
payload := strings.NewReader("{\n \"activity_type\": \"trades\",\n \"symbol\": \"BTC/USDT\",\n \"from\": \"2025-01-01T00:00:00Z\",\n \"to\": \"2025-02-01T00:00:00Z\"\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}/activity-history-imports")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activity_type\": \"trades\",\n \"symbol\": \"BTC/USDT\",\n \"from\": \"2025-01-01T00:00:00Z\",\n \"to\": \"2025-02-01T00:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/accounts/{account_id}/activity-history-imports")
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 \"activity_type\": \"trades\",\n \"symbol\": \"BTC/USDT\",\n \"from\": \"2025-01-01T00:00:00Z\",\n \"to\": \"2025-02-01T00:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "ahi_01J2K8H",
"account_id": "acc_01H8XFK9A",
"venue": "binance",
"activity_type": "trades",
"symbol": "BTC/USDT",
"requested_from": "2025-01-01T00:00:00Z",
"requested_to": "2025-02-01T00:00:00Z",
"status": "queued",
"fetched_count": 0,
"written_count": 0,
"skipped_count": 0,
"page_count": 0,
"failure_code": null,
"failure_message": null,
"started_at": null,
"completed_at": null,
"deadline_at": "2026-09-01T10:05:00Z"
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-09-01T10:00:00Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "activity_history_import_rate_limited",
"message": "The daily activity-history import allowance has been reached.",
"details": null
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-09-01T10:00:00Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}Start a bounded activity-history import
Requires activity:write, an effective Plus or Pro subscription, Idempotency-Key, and the read scope matching activity_type. The default maximum range is 90 days. Each user and connected CEX credential has 168 daily work-units, measured as the requested range rounded up to hours. The request does not require a trading OTP and clients must not bypass the quota by automatically splitting or retrying requests.
curl --request POST \
--url https://api.portfobit.com/api/v1/accounts/{account_id}/activity-history-imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"activity_type": "trades",
"symbol": "BTC/USDT",
"from": "2025-01-01T00:00:00Z",
"to": "2025-02-01T00:00:00Z"
}
'import requests
url = "https://api.portfobit.com/api/v1/accounts/{account_id}/activity-history-imports"
payload = {
"activity_type": "trades",
"symbol": "BTC/USDT",
"from": "2025-01-01T00:00:00Z",
"to": "2025-02-01T00:00:00Z"
}
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({
activity_type: 'trades',
symbol: 'BTC/USDT',
from: '2025-01-01T00:00:00Z',
to: '2025-02-01T00:00:00Z'
})
};
fetch('https://api.portfobit.com/api/v1/accounts/{account_id}/activity-history-imports', 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}/activity-history-imports",
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([
'activity_type' => 'trades',
'symbol' => 'BTC/USDT',
'from' => '2025-01-01T00:00:00Z',
'to' => '2025-02-01T00:00:00Z'
]),
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}/activity-history-imports"
payload := strings.NewReader("{\n \"activity_type\": \"trades\",\n \"symbol\": \"BTC/USDT\",\n \"from\": \"2025-01-01T00:00:00Z\",\n \"to\": \"2025-02-01T00:00:00Z\"\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}/activity-history-imports")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activity_type\": \"trades\",\n \"symbol\": \"BTC/USDT\",\n \"from\": \"2025-01-01T00:00:00Z\",\n \"to\": \"2025-02-01T00:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/accounts/{account_id}/activity-history-imports")
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 \"activity_type\": \"trades\",\n \"symbol\": \"BTC/USDT\",\n \"from\": \"2025-01-01T00:00:00Z\",\n \"to\": \"2025-02-01T00:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "ahi_01J2K8H",
"account_id": "acc_01H8XFK9A",
"venue": "binance",
"activity_type": "trades",
"symbol": "BTC/USDT",
"requested_from": "2025-01-01T00:00:00Z",
"requested_to": "2025-02-01T00:00:00Z",
"status": "queued",
"fetched_count": 0,
"written_count": 0,
"skipped_count": 0,
"page_count": 0,
"failure_code": null,
"failure_message": null,
"started_at": null,
"completed_at": null,
"deadline_at": "2026-09-01T10:05:00Z"
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-09-01T10:00:00Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "activity_history_import_rate_limited",
"message": "The daily activity-history import allowance has been reached.",
"details": null
},
"meta": {
"request_id": "req_01J2K8B7QW",
"generated_at": "2026-09-01T10:00:00Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"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 - 255Path Parameters
Connected CEX account ID.
Body
order_history, trades, ledger, transactions Inclusive RFC 3339 UTC start time.
Exclusive RFC 3339 UTC end time; it must not be in the future.
Optional exact CCXT unified symbol. An omitted symbol does not guarantee discovery of every inactive historical market.