get_gas_prices
Retrieve real-time gas prices and USD cost estimates across multiple blockchain networks to optimize transaction timing and costs.
Instructions
Get real-time gas prices across multiple blockchain networks.
Args: chains: List of chains to query. Options: ethereum, base, polygon, bsc, arbitrum, optimism. Defaults to all supported chains.
Returns: Gas prices in gwei with USD cost estimates for each chain.
Price: $0.10 (FIRST CALL FREE for new users!)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chains | No |
Implementation Reference
- coinrailz_mcp/__init__.py:220-236 (handler)The `get_gas_prices` tool handler implementation. It uses `call_coinrailz_service` to query the 'gas-price-oracle' endpoint.
@mcp.tool() async def get_gas_prices(chains: List[str] = None) -> str: """ Get real-time gas prices across multiple blockchain networks. Args: chains: List of chains to query. Options: ethereum, base, polygon, bsc, arbitrum, optimism. Defaults to all supported chains. Returns: Gas prices in gwei with USD cost estimates for each chain. Price: $0.10 (FIRST CALL FREE for new users!) """ payload = {"chains": chains or ["ethereum", "base", "polygon", "arbitrum", "optimism"]} result = await call_coinrailz_service("gas-price-oracle", payload) return json.dumps(result, indent=2)