Querying a Collection
You can query the QuickNode Graph API for information about an NFT collection using the collection
query. Here is an example query to retrieve information about a specific token within a specific NFT collection:
Example query
query CollectionToken($contractAddress: String!, $tokenId: String!) {
ethereum {
collection(contractAddress: $contractAddress) {
name
externalUrl
... on ERC721Collection {
stats {
volume
floor
}
nft(tokenId: $tokenId) {
tokenId
attributes {
name
value
}
uploads {
url
}
}
}
}
}
}
Querying a wallet by ENS
You can query the QuickNode Graph API for information about an ENS wallet by using the walletByENS
query. Here is an example in which we query a wallet by ENS to return the total count of NFTs held by the wallet, as well as details about each NFT collection within the wallet :
Example query
query NFTsByENS($ensName: String!) {
ethereum {
walletByENS(ensName: $ensName) {
walletCollections {
totalCount
edges {
node {
collection {
name
address
image {
url
}
}
nftsCount
}
}
}
}
}
}
Querying Transactions
You can query the QuickNode Graph API for a paginated list of transactions by using the Transactions
query. Here is an example in which we query Transactions to return details about transactions. You can filter Transactions by fromAddress
, toAddress
, blockNumber
, and timestamp
:
Example query
query walletTransactions($filter: TransactionsFilterInput){
ethereum {
transactions(
first: 5
orderDirection: DESC
filter: $filter
) {
edges {
node {
blockTimestamp
fromAddress
transactionIndex
hash
blockNumber
contractAddress
cumulativeGasUsed
effectiveGasPrice
gas
gasUsed
gasPrice
input
maxFeePerGas
maxPriorityFeePerGas
toAddress
type
value
}
}
}
}
}