# Tron Historical Balances

**URL:** <https://community.bitquery.io/t/tron-historical-balances/2344>\
**Category:** GraphQL API\
**Tags:** support, open\
**Created:** [April 2, 2025, 10:26am UTC](https://community.bitquery.io/t/tron-historical-balances/2344 "2025-04-02T10:26:52Z")\
**Posts on this page:** 2\
**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:26am UTC](https://community.bitquery.io/t/tron-historical-balances/2344/1 "2025-04-02T10:26:52Z")

</div>

I can get Tron historical balances by the query below, but it is only between 2 block heights.  
Can I specify an unix timestamp or iso time like “2025-01-01T00:00:00Z” ?

```auto
query MyQuery {
  tron {
    address(address: {is: "TJ7hhYhVhaxNx6BPyq7yFpqZrQULL3JSdb"}) {
      address
      balances(currency: {is: "TRX"}, height: {between: [70170900, 70170952]}) {
        currency {
          tokenId
          name
        }
        history {
          value
          timestamp
          transferAmount
        }
        value
      }
    }
  }
}

```

Currently the workaround is to get the block height first:

```auto
query MyQuery {
  tron {
    blocks(time: {since: "2025-01-01T00:00:00Z"}, 
      options: {limit: 1}) {
      height
      timestamp {
        iso8601
      }
    }
  }
}

```

---

<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:35am UTC](https://community.bitquery.io/t/tron-historical-balances/2344/2 "2025-04-07T06:35:28Z")

</div>

Use URL = EAP  
For tokens

```auto
{
  Tron(dataset: archive) {
    BalanceUpdates(
      where: {
         Currency: {SmartContract: {is: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"}}, 
         BalanceUpdate: {Address: {is: "YOUR_ADDR"}}, 
         Block: {Number: {le: "68346198"}}}
    ) {
      sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
      Currency {
        Name
        Symbol
        SmartContract
      }
    }
  }
}

```

For TRX:

```auto
BalanceUpdates( where: {Currency: {Native: true}, ...}) ...

```
