tron query for block height

Returns transactions and contracts on Tron: block height, timestamp time, hash, result, index, internal transactions count, success and 15 more fields.

By gaurav · saved 21 October 2021 · run 4 times · Bitquery API v1

What it returns

The query

query ($fromBlockHeight: Int!, $toBlockHeight: Int!) {
  tron {
    transactions {
      block(height: {gteq: $fromBlockHeight, lt: $toBlockHeight}) {
        height
        timestamp {
          time
        }
      }
      hash
      result
      index
      internalTransactionsCount
      success
      fee
      feeLimit
      netFee
      energyFee
      energyUsageTotal
      netUsage
    }
    contracts {
      block(height: {gteq: $fromBlockHeight, lt: $toBlockHeight}) {
        height
        timestamp {
          time
        }
      }
      txOwner {
        address
        annotation
      }
      currency {
        symbol
        address
        tokenId
        tokenType
      }
      txHash
      contractType
      amount
    }
  }
}

Variables

{
  "fromBlockHeight": 1400000,
  "toBlockHeight": 1400010,
  "network": "tron"
}

Similar queries