Quai RPC API
In addition to the custom RPC endpoints documented here, the Quaiscan Quai RPC API supports most used methods in the exact format specified for Quai Network nodes, see the Quai Network JSON-RPC Specification for more details.
These methods are provided for your convenience and are most suitable as a fallback option in your JSON RPC API providers. For other use cases, REST or custom RPC methods are recommended.
The following methods are supported:
quai_blockNumber
quai_getBalance
quai_getLogs
quai_gasPrice
quai_getTransactionByHash
quai_getTransactionReceipt
quai_chainId
quai_maxPriorityFeePerGas
quai_getTransactionCount
quai_getCode
quai_getStorageAt
quai_estimateGas
quai_getBlockByNumber
quai_getBlockByHash
quai_sendRawTransaction
quai_call
In the following examples we use the Quai Network mainnet with the base instance url https://quaiscan.io
. When sending a request add /api/eth-rpc
to the end of the base url.
quai_blockNumber
Returns the latest block number in the chain in hexidecimal format. No params are needed. Type: POST
Example
quai_getBalance
Returns the balance of a given address in its. Note the earliest
parameter does not work as expected because genesis block balances are not currently imported. Parameters are required.
Required Parameters
Type | POST |
Data (string) | 20 Byte address to check balance |
Quantity or Tag (string) | Integer value of a block number, or a tag "latest" for the most recent block. |
Example
More examples
Refer to the Quai Network JSON-RPC Specification for more examples and info on the remaining methods.
Last updated