# Solana Historical Balances

**URL:** <https://community.bitquery.io/t/solana-historical-balances/2343>\
**Category:** GraphQL API\
**Tags:** support, open\
**Created:** [April 2, 2025, 10:03am UTC](https://community.bitquery.io/t/solana-historical-balances/2343 "2025-04-02T10:03:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kafuka](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@kafuka](https://community.bitquery.io/u/kafuka)\
**Post date:** [April 2, 2025, 10:03am UTC](https://community.bitquery.io/t/solana-historical-balances/2343/1 "2025-04-02T10:03:38Z")

</div>

how to get Solana historical balance? in V1, V2? EAP?  
in v1, I tried this:

```auto
query MyQuery {
  solana {
    address(address: {is: "MfDuWeqSHEqTFVYZ7LoexgAK9dxk7cy4DFJWjWMGVWa"}) {
      address
      balance
    }
    blocks(date: {is: "2025-01-01T00:00:00Z"}) {
      date {
        dayOfMonth
      }
      time {
        iso8601
        unixtime
      }
    }
  }
}

```

Then I got:

```auto
ActiveRecord::ActiveRecordError: Response code: 500: Code: 396, 
e.displayText() = DB::Exception: Limit for result exceeded, 
max rows: 25.00 thousand, current rows: 65.50 thousand 
(version 20.8.11.17 (official build)) 

```

Why cannot the balance take an argument for timestamp???

---

<div class="post-metadata">

**Author:** ![kafuka](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@kafuka](https://community.bitquery.io/u/kafuka)\
**Post date:** [April 3, 2025, 2:58pm UTC](https://community.bitquery.io/t/solana-historical-balances/2343/2 "2025-04-03T14:58:38Z")

</div>

request body = `query: `{\n solana {\n sent: transfers(\n time: {till: “${isoTime}”}\n currency: {is: “${tokenMint}”}\n senderAddress: {is: “${targetAddr}”}\n ) {\n amount\n currency {\n name\n decimals\n symbol\n address\n }\n }\n received: transfers(\n time: {till: “${isoTime}”}\n currency: {is: “${tokenMint}”}\n receiverAddress: {is: “${targetAddr}”}\n ) {\n amount\n currency {\n name\n decimals\n symbol\n address\n }\n }\n }\n}\n`, variables: "{}",`

---

<div class="post-metadata">

**Author:** ![kafuka](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@kafuka](https://community.bitquery.io/u/kafuka)\
**Post date:** [April 7, 2025, 6:46am UTC](https://community.bitquery.io/t/solana-historical-balances/2343/3 "2025-04-07T06:46:01Z")

</div>

Token, use URL = V1

```auto
{
  solana {
    sent: transfers(
      time: {till: "2025-01-01T00:00:00"}
      currency: {is: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"}
      senderAddress: {is: "8J88dokAnQBPJ5UopmTGNUHrciRXC5bqHqvK5ktKvFAA"}
    ) {
      amount
      currency {
        name
        decimals
        symbol
        address
      }
    }
    received: transfers(
      time: {till: "2025-01-01T00:00:00"}
      currency: {is: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"}
      receiverAddress: {is: "8J88dokAnQBPJ5UopmTGNUHrciRXC5bqHqvK5ktKvFAA"}
    ) {
      amount
      currency {
        name
        decimals
        symbol
        address
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![akshat.bitquery](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@akshat.bitquery](https://community.bitquery.io/u/akshat.bitquery)\
**Post date:** [May 23, 2025, 7:42am UTC](https://community.bitquery.io/t/solana-historical-balances/2343/4 "2025-05-23T07:42:19Z")

</div>

Sorry for the late reply. Yes this is the correct way to get historical balance in Solana. You need to get sent and received transfer amounts and calculate on your end the final balance by doing total received amount - total sent amount.
