QuickNode - AWS for Blockchain

Introduction

Quicknode allows high-performance access to blockchains like Ethereum (as well as most ERC-20 compatible blockchains like Polygon, xDai, etc) and Solana. This plugin makes it simple to power your blockchain applications built on Bubble and scale up as you grow. From elastic APIs & dedicated nodes to powerful tools & analytics, all at your command through a simple control panel. You can get an instant access to both Mainnet and TestNet networks.

How to setup

To start you need to create a project at: https://www.quicknode.com/
  1. Create an account.
Image without caption
2. On the dashboard select Tab: Nodes and then click "Create node" button
Image without caption
3. Select the preferred plan.
Image without caption
4. Select node and network.
Image without caption
5. Pay the selected plan.
Image without caption
6. Select your nodes
Image without caption
7. Go to "Get Started" and copy the HTTP PROVIDER link.
Image without caption
8. Go to the editor Plugin Tab and paste the HTTP PROVIDER link into the plugin settings. 
Image without caption

Ethereum API Call

QuickNode Ethereum RPC Overview
At QuickNode, we run Ethereum RPC endpoints. In aggregate, we serve more than 50 billion requests every month. To make it easier for developers to integrate with QuickNode, we've created this document that shows how to call RPC methods using libraries in Python, Ruby, JavaScript, cURL.With QuickNode, you either have a dedicated endpoint that is always serving traffic from the same location as designated when you booted the endpoint or you get access to our global network which always routes to the nearest available endpoint.

1. eth_getBalance

Image without caption
Parameters:
  • Wallet ID - The address to check for the balance.
Return values:
  • Result - Integer value of current balance in Wei encoded as hexadecimal.

2. eth_blockNumber

Parameters:
  • None
Return values:
  • Result - Integer value of latest block number encoded as a hexadecimal.

3. eth_getTransactionByHash

Image without caption
Parameters:
  • hash - The hash of a transaction.
Return values:
object - Transaction Response Object, or null if no transaction is found:
  • hash - The hash of the transaction
  • nonce - The number of transactions made by the sender prior to this one encoded as hexadecimal.
  • blockHash - The hash of the block where this transaction was in. null if pending.
  • blockNumber - The block number where this transaction was in. null if pending.
  • transactionIndex - Integer of the transactions index position in the block. null if pending.
  • from - Address of the sender.
  • to - Address of the receiver. Null when it' a contract creation transaction.
  • value - The value transferred in Wei, encoded as hexadecimal.
  • gasPrice - The gas price provided by the sender in Wei, encoded as a hexadecimal.
  • gas - The gas provided by the sender, encoded as hexadecimal.
  • input - The data sent along with the transaction.
  • v - The standardized V field of the signature.
  • standardV - The standardized V field of the signature (0 or 1).
  • r - The R field of the signature.
  • raw - The raw transaction data.
  • publickey - The public key of the signer.
  • chainid - The chain id of the transaction, if any.

4. eth_gasPrice

Parameters:
  • None
Return values:
  • Result - Integer value of current gas price in Wei.

5. eth_getBlockByHash

Image without caption
Parameters:
  • Hash - Hash of the block.
  • boolean - If true it returns the full transaction objects, if false only the hashes of the transactions.
Return values:
object - A block object, or null when no block was found.
  • number - The block number of the requested block is encoded as hexadecimal. null if pending.
  • hash - The block hash of the requested block. null if pending.
  • parenthash - Hash of the parent block.
  • nonce - Hash of the generated proof-of-work. null if pending.
  • sha3uncles - SHA3 of the uncle's data in the block.
  • logsbloom - The bloom filter for the logs of the block. null if pending.
  • transactionsroot - The root of the transaction trie of the block.
  • stateroot - The root of the final state trie of the block.
  • receiptsroot - The root of the receipts trie of the block.
  • miner - The address of the beneficiary to whom the mining rewards were given.
  • difficulty - Integer of the difficulty for this block encoded as hexadecimal.
  • totaldifficulty - Integer of the total difficulty of the chain until this block is encoded as hexadecimal.
  • extradata - The “extra data” field of this block.
  • size - The size of this block in bytes as an Integer value encoded as hexadecimal.
  • gaslimit - The maximum gas allowed in this block is encoded as hexadecimal.
  • gasused - The total used gas by all transactions in this block is encoded as hexadecimal.
  • timestamp - The UNIX timestamp for when the block was collated.
  • uncles - Array of uncle hashes.

6. eth_chainId

Parameters:
  • none
Return values:
quantity - EIP155 Chain ID.

7. eth_estimateGas

Image without caption
Parameters:
  • from - 20 Bytes The address the transaction is sent from.
  • to - 20 Bytes The address the transaction is sent from.
  • value - Integer of the value sent with this transaction.
Return values:
  • quantity - The estimated amount of gas used.

8. eth_getBlockByNumber

Image without caption
Parameters:
  • quantity or tag - Integer block number, or the string 'latest', 'earliest' or 'pending', see the default block parameter.
  • boolean - If true it returns the full transaction objects, if false only the hashes of the transactions.
Return values:
object - A block object, or null when no block was found.
  • number - The block number of the requested block is encoded as hexadecimal. null when its pending block.
  • hash - The block hash of the requested block. null when its pending block.
  • parenthash - Hash of the parent block.
  • nonce - Hash of the generated proof-of-work. null when its pending block.
  • sha3uncles - SHA3 of the uncle's data in the block.
  • logsbloom - The bloom filter for the logs of the block. null when its pending block.
  • transactionsroot - The root of the transaction trie of the block.
  • stateroot - The root of the final state trie of the block.
  • receiptsroot - The root of the receipts trie of the block.
  • miner - The address of the beneficiary to whom the mining rewards were given.
  • difficulty - Integer of the difficulty for this block encoded as hexadecimal.
  • totaldifficulty - Integer of the total difficulty of the chain until this block is encoded as hexadecimal.
  • extradata - The “extra data” field of this block.
  • size - The size of this block in bytes as an Integer value encoded as hexadecimal.
  • gaslimit - The maximum gas allowed in this block is encoded as hexadecimal.
  • gasused - The total used gas by all transactions in this block is encoded as hexadecimal.
  • timestamp - The UNIX timestamp for when the block was collated.
  • transactions - Array of transaction objects, or 32 Bytes transaction hashes depending on the second Boolean parameter in the request.
  • uncles - Array of uncle hashes.

9. eth_getBlockTransactionCountByHash

Image without caption
Parameters:
  • hash - Hash of the block.
Return values:
  • result - Integer number of transactions in the block.

10. eth_getBlockTransactionCountByNumber

Image without caption
Parameters:
  • Block-number - Block number in hexadecimal format with 0x prefix.
Return values:
  • result - Integer number of transactions in the block.

11. eth_getCode

Image without caption
Parameters:
  • address - The address to check for code.
Return values:
  • result - String value of the compiled bytecode.

12. eth_mining

Parameters:
  • none
Return values:
  • result - Boolean true if the node is mining, otherwise false.

13. eth_getLogs

Image without caption
Parameters:
  • address - Contract address or a list of addresses from which logs should originate.
Return values:
  • removed - Boolean true if the log was removed, due to a chain reorganization. false if it's a valid log.
  • logindex - Integer of log index position in the block encoded as hexadecimal. null if pending.
  • transactionindex - Integer of transactions index position log was created from. null if pending.
  • transactionhash - Hash of the transactions this log was created from. null if pending.
  • blockhash - Hash of the block where this log was in. null when it's pending. null if pending.
  • blocknumber - The block number where this log was, encoded as hexadecimal. null if pending.
  • address - The address from which this log originated.
  • data - Contains one or more 32 Bytes non-indexed arguments of the log.
  • topics - Array of 0 to 4 32 Bytes of indexed log arguments.

14. eth_protocolVersion

Parameters:
  • none
Return values:
  • result - Current Ethereum protocol version in string format.

15. net_listening

Parameters:
  • none
Return values:
  • result - (Boolean) true when listening, otherwise false.

16. net_peerCount

Parameters:
  • none
Return values:
  • result - Integer of the number of connected peers encoded as hexadecimal.

17. net_version

Parameters:
  • none
Return values: 
result - String value of current network id. Typical values are as follows:
  • 1 - ethereum mainnet
  • 2 - morden testnet (deprecated)
  • 3 - ropsten testnet
  • 4 - rinkeby testnet
  • 5 - goerli testnet
  • 10 - optimism mainnet
  • 69 - optimism kovan testnet
  • 42 - kovan testnet
  • 137 - matic/polygon mainnet
  • 80001 - matic/polygon mumbai testnet
  • 250 - fantom mainnet
  • 100 - xdai mainnet
  • 56 - bsc mainnet

18. eth_syncing

Parameters:
  • none
Return values:
result - Boolean (false) when not syncing:
  • startingblock - The block at which the import started encoded as a hexadecimal.
  • currentblock - The current block, same as eth_blockNumber encoded as a hexadecimal.
  • highestblock - The estimated highest block encoded as a hexadecimal.

19. eth_newBlockFilter

Parameters:
  • none
Return values:

20. eth_newFilter

Image without caption
Parameters:
  • fromBlock - Integer block number encoded as a hexadecimal, "latest","pending", or "earliest" tags.
  • toBlock - Integer block number encoded as a hexadecimal, "latest","pending", or "earliest" tags.
  • address - Contract address or a list of addresses from which logs should originate.
Return values:

21. eth_getStorageAt

Image without caption
Parameters:
  • address - The address to check for storage.
  • quantity - Integer of the position in storage.
  • tag - (optional) Integer block number, or the string 'latest, 'earliest' or 'pending.
Return values:
  • result - the value at this storage position.

22. eth_getFilterChanges

Image without caption
Parameters:
Return values:
array - Array of one of the following, depending on the filter type, or empty if no changes since last poll:
  • blockHash - The 32 byte hash of a block that meets your filter requirements.
  • transactionhash - The 32 byte hash of a transaction that meets your filter requirements.
  • removed - Boolean true if log was removed, due to a chain reorganization. false if it's a valid log.
  • logindex - Integer of log index position in the block encoded as hexadecimal. null if pending.
  • transactionindex - Integer of transactions index position log was created from. null if pending.
  • transactionhash - Hash of the transactions this log was created from. null if pending.
  • blockhash - Hash of the block where this log was in. null when it's pending. null if pending.
  • blocknumber - The block number where this log was, encoded as hexadecimal. null if pending.
  • address - The address from which this log originated.
  • data - Contains one or more 32 Bytes non-indexed arguments of the log.
  • topics - Array of 0 to 4 32 Bytes of indexed log arguments.

23. eth_getTransactionByBlockNumberAndIndex

Image without caption
Parameters:
  • qunatity | tag - Integer block number encoded as hexadecimal, or the string 'latest', 'earliest' or 'pending', see the default block parameter.
  • quantity - A hex of the integer representing the position in the block.
Return values:
object - Transaction Response Object , or null if no transaction is found:
  • hash - The hash of the transaction
  • nonce - The number of transactions made by the sender prior to this one encoded as hexadecimal.
  • blockHash - The hash of the block where this transaction was in. null if pending.
  • blockNumber - The block number where this transaction was in. null if pending.
  • transactionIndex - Integer of the transactions index position in the block. null if pending.
  • from - Address of the sender.
  • to - Address of the receiver. Null when its a contract creation transaction.
  • value - The value transferred in Wei, encoded as hexadecimal.
  • gasPrice - The gas price provided by the sender in Wei, encoded ashexadecimal.
  • gas - The gas provided by the sender, encoded as a hexadecimal.
  • input - The data sent along with the transaction.
  • v - The standardized V field of the signature.
  • standardV - The standardized V field of the signature (0 or 1).
  • r The R field of the signature.
  • raw - The raw transaction data.
  • publickey - The public key of the signer.
  • chainid - The chain id of the transaction, if any.

24. eth_getTransactionByBlockHashAndIndex

Image without caption
Parameters:
  • hash - A blocks hash.
  • Index - An integer of the transaction index position encoded as hexadecimal.
Return values:
object - Transaction Response Object, or null if no transaction is found:
  • hash - The hash of the transaction
  • nonce - The number of transactions made by the sender prior to this one encoded as hexadecimal.
  • blockHash - The hash of the block where this transaction was in. null if pending.
  • blockNumber - The block number where this transaction was in. null if pending.
  • transactionIndex - Integer of the transactions index position in the block. null if pending.
  • from - Address of the sender.
  • to - Address of the receiver. Null when its a contract creation transaction.
  • value - The value transferred in Wei, encoded as hexadecimal.
  • gasPrice - The gas price provided by the sender in Wei, encoded as hexadecimal.
  • gas - The gas provided by the sender, encoded as hexadecimal.
  • input - The data sent along with the transaction.
  • v - The standardized V field of the signature.
  • standardV - The standardized V field of the signature (0 or 1).
  • r The R field of the signature.
  • raw - The raw transaction data.
  • publickey - The public key of the signer.
  • chainid - The chain id of the transaction, if any.

25. eth_getTransactionCount

Image without caption
Parameters:
  • address - The address you want a transaction count from.
  • Block - (optional) Integer block number encoded as hexadecimal, or the string 'latest', 'earliest' or 'pending', see the default block parameter.
Return values:
result - Integer number of transactions sent from an address encoded as hexadecimal.

26. eth_getTransactionReceipt

Image without caption
Parameters:
hash - The hash of a transaction.
Return values:
27object - A transaction receipt object, or null when no receipt was found:
  • transactionHash - Hash of the transaction.
  • transactionIndex - Integer of the transactions index position in the block encoded as a hexadecimal.
  • from - Address of the sender.
  • to - Address of the receiver. null when it's a contract creation transaction.
  • blockHash - Hash of the block where this transaction was in.
  • blockNumber - Block number where this transaction was added encoded as a hexadecimal.
  • cumulativeGasUsed - The total gas used when this transaction was executed in the block.
  • gasUsed - The amount of gas used by this specific transaction alone.
  • contractAddress - The contract address created for contract creation, otherwise null.
  • logs - Array of log objects, which this transaction generated.
  • logsBloom - Bloom filter for light clients to quickly retrieve related logs.
  • value - Value transferred in Wei encoded as hexadecimal.
  • v - ECDSA recovery id encoded as hexadecimal.
  • r - ECDSA signature r
  • s - ECDSA signature s
It also returns:
  • root - 32 bytes of post-transaction stateroot (pre-Byzantium).
  • status - Either 1 (success) or 0 (failure) encoded as hexadecimal.

27. eth_getUncleCountByBlockHash

Image without caption
Parameters:
hash - The Hash of the block to get uncles for.
Return values:
uncles - Integer value of the number of uncles in the block encoded as hexadecimal.

28. eth_getUncleCountByBlockNumber

Image without caption
Parameters:
Block - Integer of a block number in hexadecimal format starting with 0x.
Return values:
Uncles - Integer value of the number of uncles in the block encoded as hexadecimal.

29. eth_newPendingTransactionFilter

Parameters:
  • none
Return values:
result - A filter id - to be used when calling eth_getFilterChanges.

30. eth_sendRawTransaction

Image without caption
Parameters:
Data - The signed transaction (typically signed with a library, using your private key)
Return value values:
Result - The transaction hash, or the zero hash if the transaction is not yet available.

31. eth_call

Image without caption
Parameters:
  • To - String of the address, the transaction is directed to.
  • Data - (optional) String of the hash of the method signature and encoded parameters, see the Ethereum Contract ABI.
Return values:
data - the return value of the executed contract.

32. qn_verifyNFTsOwner

Image without caption
Currently supports both ERC-721 and ERC-1155 compliant contracts.
Parameters:
  • Wallet - The wallet address to check for NFTs.
  • List - List of ERC-721 and/or ERC-1155 NFT contract addresses, suffixed with
:tokenId to specify a specific ID. For example, providing the value 
0x2106c...7aeaa:1234 will verify ownership of Loopy Donuts' NFT token with ID 
1234. You may include up to 20 contract addresses per request.
Return values:
object - Custom Response Object:
  • owner - The wallet address we checked for NFTs.
  • assets - An array of owned NFTs for the provided wallet, in the same format as the inputted array. If an inputted array isn't returned, then it does not belong to the wallet.

33. qn_fetchNFTs

Image without caption
Currently supports ERC-721 compliant contracts.
The method qn_verifyNFTsOwner provides token ownership verification for both ERC-721 and ERC-1155 contracts.
Parameters:
  • Wallet - The wallet address to check for NFTs.
  • List - List of NFT contract addresses (must support methods balanceOf, tokenURI, and tokenOfOwnerByIndex) you'd like to get ownership data from. Contract addresses may be optionally suffixed with :tokenId to specify a specific NFT id to filter on. For example, 0x2106c...7aeaa:1234 will filter Loopy Donuts on the NFT token with id 1234 only. You may include up to 20 contract addresses per request.
Return values:
object - Custom Response Object, or null if no NFTs are found:
  • owner - The wallet address we checked for NFTs.
  • assets - An array of objects representing NFTs with the following shape:
  • name - the name of this specific NFT.
  • collectionTokenId - the token id of this NFT in its collection.
  • collectionName - the name of this NFT's collection.
  • imageUrl - the URL where the image for this NFT can be seen.
  • collectionAddress - the contract address that this NFT lives in.
  • traits - an array of traits that this NFT has.
  • chain - what chain this aggregation happened on.
  • network - what network this aggregation happened on.
  • provenance - an array of transfers from previous owners for this NFT. It's important to note that this only has owners from recent blocks, for full ownership history, you'll need to enable the archive add on. This is only available for select customers at this time.

34. trace_call

Image without caption
Parameters:
  • to - String of the address the transaction is directed to.gas - (optional) Integer of the gas provided for the transaction execution.
Return values:
array - Block traces, which have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):
  • Output - String.
  • TransactionHash - String of the transaction hash.
  • vmtrace - ParityVmTrace Object, which has the following fields:
  • code - String.
  • operations - array of ParityVmOperationTrace objects.
  • action - ParityTrace Object, which has the following fields:
  • traceaddress - Array.
  • calltype - String.
  • includeintrace - Boolean.
  • isprecomplied - Boolean.
  • type - String.
  • creationmethod - String.
  • from - Address.
  • to - Address.
  • gas - Quantity.
  • value - Quantity.
  • input - Data.
  • result - ParityTraceResult object which has the following fields:
  • gasused - Quantity
  • output - Data
  • address - Address
  • code - Data
  • subtraces - Array.
  • author - Address.
  • rewardtype - String.
  • error - String.
  • statechanges - Array.

35. trace_transaction

Image without caption
Parameters:
hash - The hash of a transaction.
Return values:
array - Block traces, which have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):
  • action - ParityTrace Object, which has the following fields:
  • traceaddress - Array.
  • calltype - String.
  • includeintrace - Boolean.
  • isprecomplied - Boolean.
  • type - String.
  • creationmethod - String.
  • from - Address.
  • to - Address.
  • gas - Quantity.
  • value - Quantity.
  • input - Data.
  • result - ParityTraceResult object which has the following fields:
  • gasused - Quantity
  • output - Data
  • address - Address
  • code - Data
  • subtraces - Array.
  • author - Address.
  • rewardtype - String.
  • error - String.
  • blockhash - String of the block hash.
  • blocknumber - Quantity.
  • result - ParityTraceResult object which has the following fields:
  • gasused - Quantity
  • output - Data
  • address - Address
  • code - Data
  • subtraces - Quantity.
  • traceaddress - Array.
  • transactionhash - Hash.
  • transactionposition - Quantity.
  • type - String.
  • error - String

36. trace_replayTransaction

Image without caption
Parameters:
  • hash - The hash of a transaction.
  • trace - To get the basic trace of the given transaction.
Return values:
array - Block traces, which have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):
  • Output - String.
  • TransactionHash - String of the transaction hash.
  • vmtrace - ParityVmTrace Object, which has the following fields:
  • code - String.
  • operations - array of ParityVmOperationTrace objects.
  • action - ParityTrace Object, which has the following fields:
  • traceaddress - Array.
  • calltype - String.
  • includeintrace - Boolean.
  • isprecomplied - Boolean.
  • type - String.
  • creationmethod - String.
  • from - Address.
  • to - Address.
  • gas - Quantity.
  • value - Quantity.
  • input - Data.
  • result - ParityTraceResult object which has the following fields:
  • gasused - Quantity
  • output - Data
  • address - Address
  • code - Data
  • subtraces - Array.
  • author - Address.
  • rewardtype - String.
  • error - String.
  • statechanges - Array.

37. trace_callMany

Image without caption
Parameters:
array - Type of trace, one or more of:
  • vmTrace - To get a full trace of the virtual machine's state during the execution of the given of given transaction, including for any subcells.
  • trace - To get the basic trace of the given transaction.
  • statediff - To get information on altered Ethereum state due to execution of the given transaction.
  • quantity or tag - Integer block number, or the string 'latest', 'earliest' or 'pending', see the default block parameter.
Return values:
array - Block traces, which have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):
  • Output - String.
  • TransactionHash - String of the transaction hash.
  • vmtrace - ParityVmTrace Object, which has the following fields:
  • code - String.
  • operations - array of ParityVmOperationTrace objects.
  • action - ParityTrace Object, which has the following fields:
  • traceaddress - Array.
  • calltype - String.
  • includeintrace - Boolean.
  • isprecomplied - Boolean.
  • type - String.
  • creationmethod - String.
  • from - Address.
  • to - Address.
  • gas - Quantity.
  • value - Quantity.
  • input - Data.
  • result - ParityTraceResult object which has the following fields:
  • gasused - Quantity
  • output - Data
  • address - Address
  • code - Data
  • subtraces - Array.
  • author - Address.
  • rewardtype - String.
  • error - String.
  • statechanges - Array.

38. trace_filter

Image without caption
Parameters:
  • fromBlock - (optional) Quantity or Tag From this block.
  • toBlock - (optional) Quantity or Tag To this block.
  • fromaddress - (optional) Array Addresses of the Senders.
Return values:
array - Block traces, which have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):
  • action - ParityTrace Object, which has the following fields:
  • traceaddress - Array.
  • calltype - String.
  • includeintrace - Boolean.
  • isprecomplied - Boolean.
  • type - String.
  • creationmethod - String.
  • from - Address.
  • to - Address.
  • gas - Quantity.
  • value - Quantity.
  • input - Data.
  • result - ParityTraceResult object which has the following fields:
  • gasused - Quantity
  • output - Data
  • address - Address
  • code - Data
  • subtraces - Array.
  • author - Address.
  • rewardtype - String.
  • error - String.
  • blockhash - String of the block hash.
  • blocknumber - Quantity.
  • result - ParityTraceResult object which has the following fields:
  • gasused - Quantity
  • output - Data
  • address - Address
  • code - Data
  • subtraces - Quantity.
  • traceaddress - Array.
  • transactionhash - Hash.
  • transactionposition - Quantity.
  • type - String.
  • error - String.

39. trace_rawTransaction

Image without caption
Parameters:
  • data - Raw transaction data/string.
Return values:
array - Block traces, which have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):
  • Output - String.
  • TransactionHash - String of the transaction hash.
  • vmtrace - ParityVmTrace Object, which has the following fields:
  • code - String.
  • operations - array of ParityVmOperationTrace objects.
  • action - ParityTrace Object, which has the following fields:
  • traceaddress - Array.
  • calltype - String.
  • includeintrace - Boolean.
  • isprecomplied - Boolean.
  • type - String.
  • creationmethod - String.
  • from - Address.
  • to - Address.
  • gas - Quantity.
  • value - Quantity.
  • input - Data.
  • result - ParityTraceResult object which has the following fields:
  • gasused - Quantity
  • output - Data
  • address - Address
  • code - Data
  • subtraces - Array.
  • author - Address.
  • rewardtype - String.
  • error - String.
  • statechanges - Array.

40. trace_replayBlockTransactions

Image without caption
Parameters:
Block - Integer block number, or the string 'latest', 'earliest' or 'pending'
Return values:
array - Block traces, which have the following object shape (all return types are hexadecimal representations of their data type unless otherwise stated):
  • Output - String.
  • TransactionHash - String of the transaction hash.
  • vmtrace - ParityVmTrace Object, which has the following fields:
  • code - String.
  • operations - array of ParityVmOperationTrace objects.
  • action - ParityTrace Object, which has the following fields:
  • traceaddress - Array.
  • calltype - String.
  • includeintrace - Boolean.
  • isprecomplied - Boolean.
  • type - String.
  • creationmethod - String.
  • from - Address.
  • to - Address.
  • gas - Quantity.
  • value - Quantity.
  • input - Data.
  • result - ParityTraceResult object which has the following fields:
  • gasused - Quantity
  • output - Data
  • address - Address
  • code - Data
  • subtraces - Array.
  • author - Address.
  • rewardtype - String.
  • error - String.
  • statechanges - Array.

Solana API Call

QuickNode Solana RPC Overview
At QuickNode, we run Solana RPC endpoints. In aggregate, we serve more than 50 billion requests every month. To make it easier for developers to integrate with QuickNode, we've created this document that shows how to call RPC methods using libraries in Python, Ruby, JavaScript, cURL.With QuickNode, you either have a dedicated endpoint that is always serving traffic from the same location as designated when you booted the endpoint or you get access to our global network which always routes to the nearest available endpoint.

1. getAccountInfo

Image without caption
Parameters:
  • Pubkey - Pubkey of account to query, as base-58 encoded string.
  • encoding - encoding for Account data, either "base58" (slow), "base64", "base64+zstd", or "jsonParsed".
Retur values:
  • null - if the req2uested account doesn't exist.
  • object - otherwise, a JSON object containing:
  • lamports - number of lamports assigned to this account, as a u64 (64-bit unsigned integer).
  • owner - base-58 encoded Pubkey of the program this account has been assigned to.
  • data - data associated with the account, either as encoded binary data or JSON format
  • {'program': 'state'}, depending on encoding parameter.
  • executable - boolean indicating if the account contains a program (and is strictly read-only).
  • rentepoch - the epoch at which this account will next owe rent, as u64 (64-bit unsigned integer).

2. getBalance

Image without caption
Parameters:
  • Pubkey - Pubkey of account to query, as base-58 encoded string.
Return values:
  • result - RpcResponse JSON object with value field set to the balance.

3. getBlockCommitment

Image without caption
Parameters:
  • block - block, identified by Slot.
Return values:
  • commitment - if the requested account doesn't exist.
  • null - Unknown block.
  • array - commitment, array of u64 integers logging the amount of cluster stake in lamports that has voted on the block at each depth from 0 to max_lockout_history + 1.
  • totalstake - total active stake, in lamports, of the current epoch.

4. getBlockHeight

Parameters:
  • none
Return values:
  • 64-bit unsigned integer - Current block height.

5. getBlockProduction

Parameters:
  • none
Return values:
  • object -
  • byidentity - a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced.
  • range - Block production slot range.
  • firstslot - first slot of the block production information (inclusive).
  • lastslot - last slot of block production information (inclusive).

6. getBlockTime

Image without caption
Parameters:
  • block - block, identified by Slot
Return values:
  • result - either of the following values.
  • 64-bit signed integer - estimated production time, as Unix timestamp (seconds since the Unix epoch).
  • null - if timestamp is not available for the block.

7. getBlocks

Image without caption
Parameters:
  • slot - Start slot, as an u64 integer.
Return values:
  • array - An array of numbers listing confirmed blocks between the start_slot and either end_slot, if provided, or the latest confirmed block, inclusive. Max range allowed is 500,000 slots.

8. getBlocksWithLimit

Image without caption
Parameters:
  • start_slot - Start slot, as an u64 integer.
  • limit - limit, as u64 integer.
Return values:
  • array - An array of numbers listing confirmed blocks starting at start_slot for up to limit blocks, inclusive.

9. getClusterNodes

Parameters:
  • none
Return values:
  • pubkey - Node public key, as base-58 encoded string.
  • gossip - Gossip network address for the node.
  • tpu - TPU network address for the node.
  • rpc - JSON RPC network address for the node, or null if the JSON RPC service is not enabled.
  • version - The software version of the node, or null if the version information is not available.
  • featureset - The unique identifier of the node's feature set.
  • shredversion - The shred version the node has been configured to use.

10. getEpochInfo

Parameters:
  • none
Return values:
  • absoluteslot - the current slot.
  • blockheight - the current block height.
  • epoch - the current epoch.
  • slotindex - the current slot relative to the start of the current epoch.
  • slotsinepoch - the number of slots in this epoch.

11. getEpochSchedule

Parameters:
  • none
Returns values
  • result - The result field will be an object with the following fields:
  • slotsperepoch - the maximum number of slots in each epoch.
  • leaderscheduleslotoffset - the number of slots before beginning of an epoch to calculate a leader schedule for that epoch.
  • warmup - whether epochs start short and grow.
  • firstnormalepoch - first normal-length epoch, log2(slotsPerEpoch) - log2(MINIMUM_SLOTS_PER_EPOCH).
  • firstnormalslot - MINIMUM_SLOTS_PER_EPOCH * (2.pow(firstNormalEpoch) - 1).

12. getGenesisHash

Parameters:
  • none
Return values:
  • result - string - a Hash as base-58 encoded string.

13. getHealth

Parameters:
  • none
Return values:
  • result - If the node is healthy: "ok" If the node is unhealthy, a JSON RPC error response is returned. The specifics of the error response are UNSTABLE and may change in the future.

14. getIdentity

Parameters:
  • none
Return values:
  • identity - the identity pubkey of the current node (as a base-58 encoded string).

15. getInflationGovernor

Parameters:
  • none
Return values:
  • initial - the initial inflation percentage from time 0.
  • terminal - terminal inflation percentage.
  • taper - rate per year at which inflation is lowered. Rate reduction is derived using the target slot time in genesis config.
  • foundation - percentage of total inflation allocated to the foundation.
  • foundationterm - duration of foundation pool inflation in years.

16. getInflationRate

Parameters: 1
  • none
Return values:
  • total - total inflation.
  • validator - inflation allocated to validators.
  • foundation - inflation allocated to the foundation.
  • epoch - epoch for which these values are valid.
getLargestAccounts

17. getLeaderSchedule

Parameters:
  • none
Return values:
  • null - if requested epoch is not found.
  • object - otherwise, the result field will be a dictionary of validator identities, as base-58 encoded strings, and their corresponding leader slot indices as values (indices are relative to the first slot in the requested epoch)

18. getMaxRetransmitSlot

Parameters:
  • none
Return values:
  • Result - 64-bit unsigned integer - Slot.

19. getMaxShredInsertSlot

Parameters:
  • none
Return values:
  • Result - 64-bit unsigned integer - Slot.

20. getMinimumBalanceForRentExemption

Image without caption
Parameters:
  • usize - account data length
Return values:
  • Result - 64-bit unsigned integer - minimum lamports required in the account.

21. getMultipleAccounts

Image without caption
Parameters:
  • array - An array of Pubkeys to query, as base-58 encoded strings.
  • dataslice - (optional) limit the returned account data using the provided offset: 'usize' and length: 'usize' fields; only available for "base58", "base64" or "base64+zstd" encodings.
Return values:
  • null - if the requested account doesn't exist.
  • object - otherwise, a JSON object containing:
  • lamports - number of lamports assigned to this account, as a u64.
  • owner - base-58 encoded Pubkey of the program this account has been assigned to.
  • data - data associated with the account, either as encoded binary data or JSON format {'program': 'state'}, depending on encoding parameter.
  • executable - boolean indicating if the account contains a program (and is strictly read-only).
  • rentepoch - the epoch at which this account will next owe rent, as u64.

22. getRecentPerformanceSamples

Image without caption
Parameters:
  • limit - (optional) number of samples to return (maximum 720).
Return values:
  • slot - Slot in which sample was taken at.
  • numtransactions - Number of transactions in sample.
  • numslots - Number of slots in sample.
  • sampleperiodsecs - Number of seconds in a sample window.

23. getSignatureStatuses

Image without caption
Parameters:
  • array - An array of transaction signatures to confirm, as base-58 encoded strings.
Return values:
  • null - Unkown transaction.
  • object
  • slot - The slot the transaction was processed.
  • confirmations - Number of blocks since signature confirmation, null if rooted, as well as finalized by a supermajority of the cluster.
  • err - Error if transaction failed, null if transaction succeeded.
  • confirmationstatus - The transaction's cluster confirmation status; either processed, confirmed, or finalized.

24. getSignaturesForAddress

Image without caption
Parameters:
  • account_address - The account address as base-58 encoded string.
  • limit - (optional) Maximum number of transaction signatures to return (between 1 and 1,000, default: 1,000).
Return values:
  • signature - Transaction signature as a base-58 encoded string.
  • slot - The slot that contains the block with the transaction as an u64 integer.
  • err - Error if transaction failed, null if transaction succeeded.
  • memo - Memo associated with the transaction, null if no memo is present.
  • blocktime - Estimated production time, as Unix timestamp (seconds since the Unix epoch) of when transaction was processed. null if not available.

25. getSlot

Parameters:
  • none
Return values:
  • 64-bit unsigned integer - Current slot number.

26. getSlotLeader

Parameters:
  • none
Return values:
  • string - Node identity Pubkey as base-58 encoded string.

27. getSlotLeaders

Image without caption
Parameters:
  • start slot - Start slot, as 64-bit unsigned integer.
  • limit - Limit, as 64-bit unsigned integer.
Return values:
  • array - Node identity public keys as base-58 encoded strings.

28. getStakeActivation

Image without caption
Parameters:
  • Pubkey - Pubkey of stake account to query, as base-58 encoded string.
Return values:
  • state - the stake account's activation state, one of: active, inactive, activating, deactivating.
  • active - stake active during the epoch.
  • inactive - stake inactive during the epoch.

29. getSupply

Parameters:
  • none
Return values:
  • total - Total supply in lamports represented by a u64 integer.
  • circulating - Circulating supply in lamports represented by a u64 integer.
  • noncirculating - Non-circulating supply in lamports represented by a u64 integer.
  • noncirculatingaccounts - an array of account addresses of non-circulating accounts, as strings.

30. getTokenAccountBalance

Image without caption
Parameters:
  • Pubkey - Pubkey of account delegate to query, as base-58 encoded string.
Return values:
  • amount - The raw balance without decimals, a string representation of u64 integer.
  • decimals - Number of base 10 digits to the right of the decimal place.
  • uiamount - The balance, using mint-prescribed decimals. -- DEPRECATED
  • uiamountstring - The balance as a string, using mint-prescribed decimals.

31. getTokenAccountsByDelegate

Image without caption
Parameters:
  • string - Pubkey of account delegate to query, as base-58 encoded string.
  • programid - Pubkey of the Token program ID that owns the accounts, as base-58 encoded string.
  • encoding - (encoding for Account data, either "base58" (slow), "base64", "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a valid mint cannot be found for a particular account, that account will be filtered out from results.
Return values:
  • pubkey - The account Pubkey as base-58 encoded string.
  • account - Number of base 10 digitals to the right of the decimal place, a u8 integer.
  • lamports - Number of lamports assigned to this account, as a u64.
  • owner - Base-58 encoded Pubkey of the program this account has been assigned to.
  • data - Token state data associated with the account, either as encoded binary data or in JSON format.
  • executable - Boolean indicating if the account contains a program (and is strictly read-only).
  • rentepoch - The epoch at which this account will next owe rent, as u64.

32. getTokenAccountsByOwner

Image without caption
Parameters:
  • Pubkey - Pubkey of the account owner, as base-58 encoded string.
  • mint - Pubkey of the specific token Mint to limit accounts to, as base-58 encoded string.
  • encoding - (encoding for Account data, either "base58" (slow), "base64", "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a valid mint cannot be found for a particular account, that account will be filtered out from results.
Return values:
  • pubkey - The account Pubkey as base-58 encoded string.
  • account - Number of base 10 digitals to the right of the decimal place, a u8 integer.
  • lamports - Number of lamports assigned to this account, as a u64.
  • owner - Base-58 encoded Pubkey of the program this account has been assigned to.
  • data - Token state data associated with the account, either as encoded binary data or in JSON format.
  • executable - Boolean indicating if the account contains a program (and is strictly read-only).
  • rentepoch - The epoch at which this account will next owe rent, as u64.

33. getTokenLargestAccounts

Image without caption
Parameters:
  • Mint - Pubkey of token Mint to query, as base-58 encoded string
Return values:
  • address - the address of the token account.
  • amount - The raw token account balance without decimals, a string representation of a u64 integer.
  • decimals - Number of base 10 digitals to the right of the decimal place, a u8 integer.
  • uiamount - The token account balance as a number, using mint-prescribed decimals. - DEPRECATED
  • uiamountstring - The token account balance as a string, using mint-prescribed decimals.

34. getTokenSupply

Image without caption
Parameters:
  • Mint - Pubkey of token Mint to query, as base-58 encoded string
Return values:
  • amount - The raw total token supply without decimals, a string representation of a u64 integer.
  • decimals - Number of base 10 digitals to the right of the decimal place, a u8 integer.
  • uiamount - The total token supply, using mint-prescribed decimals. - DEPRECATED
  • uiamountstring - The total token supply as a string, using mint-prescribed decimals.

35. getTransactionCount

Parameters:
  • None
Return values:
  • result - u64 integer of how many transaction counts were returned from the ledger.

36. getVersion

Parameters:
  • None
Return values:
  • solana-core - Software version of solana-core.
  • feature-set - Unique identifier of the current software's feature set.

37. getVoteAccounts

Parameters:
  • None
Return values:
  • votepubkey - The vote account address as a base-58 encoded string.
  • nodepubkey - Validator identity, as base-58 encoded string.
  • activaedstake - The stake, in lamports, delegated to this vote account and active in this epoch. Represented as an u64 integer.
  • epochvoteaccount - Boolean, whether the vote account is staked for this epoch.
  • lastvote - u64 integer represntation of the most recent slot voted on by this vote account.
  • epochcredits - History of how many credits earned by the end of each epoch, as an array of arrays containing: [epoch, credits, previousCreidts].

38. minimumLedgerSlot

Parameters:
  • None
Return values:
  • integer - The lowest slot that the node has information of. This number may increase over time if the node is purging older ledger data.

39. qn_fetchNFTs

Image without caption
Parameters:
  • Wallet-address - The wallet address to check for NFTs.
Return values:
  • object - Custom Response Object, or null if no NFTs are found:
  • owner - The wallet address we checked for NFTs.
  • assets - An array of objects representing NFTs with the following shape:
  • name - the name of this specific NFT.
  • tokenAddress - the token address of this NFT in its collection.
  • collectionName - the name of this NFT's collection.
  • imageUrl - the URL where the image for this NFT can be seen.
  • collectionAddress - the contract address that this NFT lives in.
  • traits - an array of traits that this NFT has.
  • creators - an array of creator addresses for this NFT token.
  • chain - what chain this aggregation happened on.
  • network - what network this aggregation happened on.
  • provenance - an array of transfers from previous owners for this NFT. It's important to note that this only has owners from recent blocks, for full ownership history, you'll need to enable the archive add-on. This is only available for select customers at this time.

40. qn_fetchNFTsByCreator

Image without caption
Parameters:
  • creator — (String) — The NFT creator's wallet address to check for.
  • page — (Integer - optional) The page number you would like returned. Page numbers start at 1 and end at "totalPages". If omitted, defaults to the first page (page 1). If the page number requested is less than 1 or higher than "totalPages", an empty assets array will be returned.
  • perPage — (Integer - optional) — The maximum amount of NFT assets to return on each page. You can request up to 100 items per page. If omitted, defaults to 10 items per page.
Return values:
  • object - Custom response object:
  • owner - The creator's wallet address we checked for NFTs.
  • assets - An array of assets with the following object shape or an empty array if no NFTs are found:
  • name - Name of the individual NFT.
  • collectionName - The NFT project's collection name.
  • tokenAddress - The token address of the NFT.
  • collectionAddress - The address that all of the individal tokenAddresses are related to.
  • imageUrl - URL pointing to the asset. Usually a .png image.
  • traits - An array of objects with the following shape.
  • trait_type - The name of the trait.
  • value - The kind of trait under this specific type.
  • chain - The blockchain the NFT belongs to.
  • creators - An array of addresses that created the collection.
  • network - The name of the network the NFT is on.
  • description - Description of the NFT project.
  • provenance - History of the NFT's transaction data. It is an array of objects with the following shape:
  • txHash - The hash of the transaction.
  • blockNumber - The block number the transaction happened on.
  • date - When the transaction occured.
  • totalPages - Total number of pages of assets available for this creator address, according to requested number of items per page (perPage parameter).
  • pageNumber - The current page number returned with this response.
  • totalItems - How many assets in total are available for this creator address.
Share
Content