Make your First RPC Request
Conduit RPC endpoints follow the Ethereum JSON-RPC spec. You send a POST request with a JSON body describing the method you want to call, and the node returns the result.
Anatomy of a request
Every request body has four fields:
To call a different method, replace the method value with any supported JSON-RPC method and update params accordingly. See the examples below.
Steps
Write a request
The example below fetches the latest block number. It takes no arguments, so params is an empty array.
You’ll need your network’s RPC URL and API key from the Conduit App. Append them to the request URL as shown above.
The result is the block number in hex. 0x430905 = block 4,394,245.
More examples
Different methods require different params. Here are a few common ones:
Get the ETH balance of an address
params takes an address and a block tag ("latest", "earliest", or a hex block number).
Get the current gas price
Get the number of transactions sent from an address
For the full list of supported methods, refer to the Ethereum JSON-RPC spec.