getHistoricalTokenAccountsByOwner

Every token a wallet held at a past slot or timestamp, with balances.

2 credits a call. Free plan includes 500,000 credits a month.

What it returns

Pass a wallet and a point in time. You get each token account it owned, with mint, amount and the change that set it. Leave the point out to get current holdings.

Filter to one mint, skip zero balances, and page through large wallets with a pagination token.

What you can build

  • Portfolio on a date

    Show a wallet’s full portfolio at year end or at fund close.

  • Retroactive airdrops

    Find who held a token before a cut-off date.

  • Wallet research

    See what a whale held before a move.

  • Backfill imports

    Fill a portfolio chart for a wallet a user just connected.

Call it

Replace the URL with your endpoint from the dashboard.

getHistoricalTokenAccountsByOwner2 credits

Request

curl "$SOLANA_RPC_URL" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getHistoricalTokenAccountsByOwner",
  "params": [
    {
      "owner": "H8sMJSCQxfKiFTCfDR3DUMLPwcRbM61LGFJ8N4dK3WjS",
      "timestamp": 1672531200,
      "excludeZeroBalance": true,
      "limit": 100
    }
  ]
}'

Response shape

{
  "accounts": [
    {
      "account": "…",
      "owner": "H8sMJSCQxfKiFTCfDR3DUMLPwcRbM61LGFJ8N4dK3WjS",
      "mint": "…",
      "amount": {
        "raw": "…",
        "decimals": 6,
        "uiAmountString": "…"
      },
      "lastBalanceChange": {
        "slot": "…",
        "timestamp": "…"
      }
    }
  ],
  "paginationToken": "…",
  "count": 100
}

Parameters

ownerstring
The wallet address. Required.
slot / timestampnumber
At most one. Omit both for current holdings.
mintstring
Only this token.
excludeZeroBalanceboolean
Skip empty accounts. Default false.
limitnumber
Up to 500 accounts a page. Default 100.
paginationTokenstring
From the previous page.

Good to know

  • A token account closed long ago can be missing here; query it directly with getHistoricalTokenAccountBalances.

Start calling getHistoricalTokenAccountsByOwner.

Free to start. Paid plans from €39 a month.