Alchemy Documentation
Website
Roadmap
Dashboard
Search…
👋
Welcome to Alchemy
🚀
Introduction
Why Use Alchemy?
Getting Started
Core Products
Contributing to these Docs
Referral Program
Web3 University
✨
Enhanced APIs
NFT API
Transfers API (Tx History)
Transaction Receipts API
Token API
Parity API
Notify API
Debug API
Trace API
Subscription API (Websockets)
Unstoppable Domains APIs
⛓
Chain APIs
Ethereum API
Polygon API
Arbitrum API
Optimism API
eth_blockNumber - Optimism
eth_getBlockByHash - Optimism
eth_getBlockByNumber - Optimism
eth_getTransactionByHash - Optimism
eth_getTransactionCount - Optimism
eth_getTransactionReceipt - Optimism
eth_getBlockTransactionCountByHash - Optimism
eth_getBlockTransactionCountByNumber - Optimism
eth_getTransactionByBlockHashAndIndex - Optimism
eth_getTransactionByBlockNumberAndIndex - Optimism
eth_sendRawTransaction - Optimism
eth_getBalance - Optimism
eth_getCode - Optimism
eth_getStorageAt - Optimism
eth_accounts - Optimism
eth_getProof - Optimism
eth_call - Optimism
eth_getLogs - Optimism
eth_protocolVersion - Optimism
eth_gasPrice - Optimism
eth_estimateGas - Optimism
eth_chainId - Optimism
net_version - Optimism
net_listening - Optimism
eth_getUncleByBlockNumberAndIndex - Optimism
eth_getUncleByBlockHashAndIndex - Optimism
eth_getUncleCountByBlockHash - Optimism
eth_getUncleCountByBlockNumber - Optimism
eth_getFilterChanges - Optimism
eth_getFilterLogs - Optimism
eth_newBlockFilter - Optimism
eth_newFilter - Optimism
eth_newPendingTransactionFilter - Optimism
eth_uninstallFilter - Optimism
web3_clientVersion - Optimism
web3_sha3 - Optimism
eth_syncing - Optimism
eth_unsubscribe - Optimism
Flow Docs
Crypto.org Docs
Feature Support By Chain
📖
Documentation
Changelog
Alchemy Web3.js
Error Reference
Compute Units (CUs)
Throughput (Rate Limits)
Gas Limits for eth_call and eth_estimateGas
🎓
Road to Web3
🎉
Welcome
‼
Important Info
🛠
Weekly Hackathons
🧠
Weekly Learning Challenges
💻
Tutorials
Hello World Smart Contract
How to Code and Deploy a Polygon Smart Contract
How to Create an NFT Tutorial
NFT Minter Tutorial: How to Create a Full Stack DApp
How to Deploy Your Own ERC-20 Token
Integrating Historical Transaction Data into your dApp
Adding notifications for Pending Transactions and Mined Transactions to your dApp
Building a dApp with Real-Time Transaction Notifications
📜
Guides
EIP-1559 Resource and Tutorial Hub
Using WebSockets
Dashboard Walkthrough
Deep Dive into eth_getLogs
How to Speed Up MetaMask Transactions
Alchemy Set-up for Macs
Choosing a Web3 Network
Running an Eth2.0 Staking Node or Validator with Alchemy
Internal Playbook: Upgrading Ethereum Nodes
Debugging CORS problems for end-users
📚
Resources
FAQ
Support
Blockchain 101
Web3 Glossary
Powered By
GitBook
eth_gasPrice - Optimism
Returns the current price per gas in wei.
If you are curious about the difference in gas price between this method and the
eth gas station
, check out this
GitHub issue
.
Parameters
none
Returns
QUANTITY
- integer of the current gas price in wei.
Example
Request
Curl
Postman
1
curl
https://opt-mainnet.g.alchemy.com/v2/your-api-key
\
2
-X POST
\
3
-H
"Content-Type: application/json"
\
4
-d
'{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":0}'
Copied!
1
URL
:
https://opt-mainnet.g.alchemy.com/v2/your-api-key
2
RequestType
:
POST
3
Body
:
4
{
5
"jsonrpc":"2.0",
6
"method":"eth_gasPrice",
7
"params":[],
8
"id":0
9
}
Copied!
Result
1
{
2
"jsonrpc"
:
"2.0"
,
3
"id"
:
0
,
4
"result"
:
"0xe4e1c0"
5
}
Copied!
Optimism API
Alchemy Documentation
Previous
eth_protocolVersion - Optimism
Next
eth_estimateGas - Optimism
Last modified
18d ago
Copy link
Contents