Get an activity-history import
curl --request GET \
--url https://api.portfobit.com/api/v1/activity-history-imports/{import_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.portfobit.com/api/v1/activity-history-imports/{import_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.portfobit.com/api/v1/activity-history-imports/{import_id}', 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/activity-history-imports/{import_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.portfobit.com/api/v1/activity-history-imports/{import_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.portfobit.com/api/v1/activity-history-imports/{import_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/activity-history-imports/{import_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}
}Activity
Get an activity-history import
Requires the read scope matching the import’s activity type. A failed task can retain partial counts and successfully written activity facts; interrupted tasks do not resume automatically.
GET
/
activity-history-imports
/
{import_id}
Get an activity-history import
curl --request GET \
--url https://api.portfobit.com/api/v1/activity-history-imports/{import_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.portfobit.com/api/v1/activity-history-imports/{import_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.portfobit.com/api/v1/activity-history-imports/{import_id}', 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/activity-history-imports/{import_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.portfobit.com/api/v1/activity-history-imports/{import_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.portfobit.com/api/v1/activity-history-imports/{import_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.portfobit.com/api/v1/activity-history-imports/{import_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Activity-history import task ID.