Skip to main content
GET
/
v1
/
portfolio
/
transactions
cURL
curl --request GET \
  --url 'https://api.coinstats.app/v1/portfolio/transactions?currency=USD' \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.coinstats.app/v1/portfolio/transactions?currency=USD"

headers = {"X-API-KEY": "<api-key>"}

response = requests.request("GET", url, headers=headers)

print(response.json())
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.coinstats.app/v1/portfolio/transactions?currency=USD', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/portfolio/transactions?currency=USD",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-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"
"io"
"net/http"
)

func main() {

url := "https://api.coinstats.app/v1/portfolio/transactions?currency=USD"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-KEY", "<api-key>")

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.coinstats.app/v1/portfolio/transactions?currency=USD")
.header("X-API-KEY", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.coinstats.app/v1/portfolio/transactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "transactionType": "Roll In",
      "date": "2025-08-28T08:35:50.384Z",
      "profitLoss": {
        "profit": -0.21637050600000052,
        "profitPercent": -3.5658153241650377,
        "currentValue": 5.851540654
      },
      "fee": {
        "coin": {
          "rank": 2,
          "identifier": "ethereum",
          "symbol": "ETH",
          "name": "Ethereum",
          "icon": "https://static.coinstats.app/coins/1650455629727.png",
          "priceChange24h": -5.74,
          "priceChange1h": 0.1,
          "priceChange7d": 1.12,
          "priceChange1m": 8.42,
          "volume": 61315198931.43572,
          "isFake": false,
          "isFiat": false
        },
        "count": 0.001,
        "totalWorth": 25.5,
        "price": 25500,
        "toAddress": "0x42382d7853beb8d0ec968de4184a6a3c89cf6b5f",
        "fromAddress": "0x8ac77cbf06b44ec918e4ed99698e83a0be222e0e"
      },
      "portfolioInfo": {
        "name": "KuCoin Spot",
        "icon": "https://static.coinstats.app/portfolio_images/kucoin_dark.png"
      },
      "coinData": {
        "identifier": "pepe",
        "count": 596062,
        "symbol": "PEPE",
        "totalWorth": 6.06791116,
        "currentValue": 5.851540654
      },
      "transfers": [
        {
          "transferType": "Received",
          "items": [
            {
              "coin": {
                "rank": 2,
                "identifier": "ethereum",
                "symbol": "ETH",
                "name": "Ethereum",
                "icon": "https://static.coinstats.app/coins/1650455629727.png",
                "priceChange24h": -5.74,
                "priceChange1h": 0.1,
                "priceChange7d": 1.12,
                "priceChange1m": 8.42,
                "volume": 61315198931.43572,
                "isFake": false,
                "isFiat": false
              },
              "count": -0.00000544,
              "toAddress": "0x42382d7853beb8d0ec968de4184a6a3c89cf6b5f",
              "fromAddress": "0x8ac77cbf06b44ec918e4ed99698e83a0be222e0e",
              "totalWorth": 0.0000054389555199999995,
              "price": 0.999808
            }
          ]
        }
      ],
      "note": {
        "name": "KuCoin Spot",
        "icon": "https://static.coinstats.app/portfolio_images/kucoin_dark.png"
      }
    }
  ],
  "meta": {
    "page": 1,
    "limit": 10
  }
}
{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}
{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}
4 credits per request

  • Complete list of buy/sell operations
  • Transaction dates and amounts
  • Price information at time of transaction
  • Supports pagination for viewing large transaction sets
This endpoint is only available for users with a Degen plan subscription (when using shareToken).
  • shareToken OR portfolioId: Provide one of these to identify the portfolio.
    • shareToken: Get this from your CoinStats portfolio page by clicking “Share”
    • portfolioId: Use a portfolio connected via POST /portfolio/wallet or POST /portfolio/exchange
  • If neither is provided, returns transactions from all API-connected portfolios
  • currency: Specify the currency for price values
  • page & limit: Control the number of transactions per page
  • from & to: Filter transactions by date range
  • passcode: Passcode for accessing protected portfolio data (can be passed in header or query parameter)
  • hideUnidentifiedCoins: Set to true to hide transactions of unidentified coins. Defaults to false.

Authorizations

X-API-KEY
string
header
required

API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.

Headers

sharetoken
string
passcode
string

Passcode for accessing protected portfolio data

Example:

"123456"

Query Parameters

page
number

Page number to retrieve (1-based indexing)

Example:

1

limit
number

Number of items to return per page

Example:

20

currency
string
required

The fiat currency to return values in

Example:

"USD"

coinId
string

Coin ID to filter transactions for a specific coin

Example:

"bitcoin"

hideUnidentifiedCoins
boolean
default:false

When true, hides transactions of unidentified coins. Accepted values: true, false, 1, 0. Defaults to false.

Example:

true

portfolioId
string

Portfolio ID for accessing a specific API-connected portfolio. Required if shareToken is not provided.

Example:

"abc123def456"

Response

Transactions

data
object[]
required

Array of transaction items

meta
object
required

Pagination metadata