Airdrop Hunter
Quick Start
Current gas price:
cast gas-price --rpc-url https://eth.llamarpc.com | xargs -I {} cast --to-unit {} gwei
API Reference
| Endpoint | Description |
|---|---|
/gas/current |
Get current gas price in gwei |
/gas/history |
Get historical gas data |
/gas/estimate |
Estimate transaction cost |
Configuration
{{
"rpc_url": "https://eth.llamarpc.com",
"refresh_interval": 15,
"alert_threshold_gwei": 50
}}
Usage Examples
import requests
def get_gas_price():
"""Get current Ethereum gas price."""
resp = requests.get("https://api.etherscan.io/api",
params={{"module": "gastracker", "action": "gasoracle"}})
data = resp.json()["result"]
return {{
"low": int(data["SafeGasPrice"]),
"standard": int(data["ProposeGasPrice"]),
"fast": int(data["FastGasPrice"]),
}}