FAQ: GraphQL Query to retrieve transactions for a specific address

faq

#1

Example Query:

{
  address(hash: "0x...") {
    transactions(first:5) {
      edges {
        node {
          blockNumber
          createdContractAddressHash
          fromAddressHash
          gas
          hash
        }
      }
    }
  }
}

Note that transactions can accept the following arguments:

  • first
  • after
  • before

This request could be sent via an HTTP GET to the Ethereum Mainnet using:

https://blockscout.com/eth/mainnet/graphql?query={ address(hash: "0x….") { transactions(first: 10) { edges { node { blockNumber createdContractAddressHash fromAddressHash gas hash } } } } }

More information on GraphQL