Make Your First Alchemy Request
Learn how to send a blockchain request using Alchemy.
👋 New to Alchemy? Get access to Alchemy for free here.
You can interact with Alchemy’s infrastructure provider using JSON-RPC and your command line.
For manual requests, we recommend interacting with the JSON-RPC
via POST
requests. Simply pass in the Content-Type: application/json
header and your query as the POST
body with the following fields:
jsonrpc
: The JSON-RPC version—currently, only2.0
is supported.method
: The ETH API method. See API reference.params
: A list of parameters to pass to the method.id
: The ID of your request. Will be returned by the response so you can keep track of which request a response belongs to.
Here is an example you can run from the Terminal/Windows/LINUX command line to retrieve the current gas price:
shell
Please remember to replace “demo” in the request URL with your actual Alchemy API key you created in the last step!
Results:
Result