Transaction Details | Moonbeam

Query to get the details of a transaction by hash, you get the gas and swap data in this case

By lukas · saved 24 August 2022 · run 21 times · Bitquery API v1

What it returns

Filters

The query

query {
  ethereum(network: moonbeam) {
    
    transactions(txHash: {is: "0x4bb98edd1c252d0352130b4777259e3b162fca47a475e986d32f5e908a5324ab"}){
      block {
        height
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      gas
      gasPrice
      gasCurrency {
        symbol
      }
      gasValue
      gas_value_usd: gasValue(in: USD)
      success
    }
    transfers(
      txHash: {is: "0x4bb98edd1c252d0352130b4777259e3b162fca47a475e986d32f5e908a5324ab"}
    ) {
      sender {
        address
      }
      receiver {
        address
      }
      amount
      amount_usd: amount(in: USD)
      currency {
        symbol
        address
      }
    }
  }
}

Similar queries