{"slug":"1gateway-dev-v1-onchain-gas-f36cad","title":"Use when an agent must price, time or route a transaction","host":"1gateway.dev","method":"GET","resource":"https://1gateway.dev/v1/onchain/gas","category":"market","description":"Use when an agent must price, time or route a transaction. Input: optional chain (base default, ethereum, arbitrum, monad, all). Output: JSON base fee, priority tiers (last 20 blocks), suggested maxFeePerGas, block fullness, typical cost of transfer, approve, DEX swap, mint, deploy in gas token (ETH","price_listed":0.002,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":3,"reported_payers_30d":1,"networks":["eip155:137","eip155:143","eip155:42161","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"chain":"all"},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"method":{"enum":["GET"],"type":"string"},"queryParams":{"additionalProperties":false,"properties":{"chain":{"description":"Chain (default base); all = the four compared. Bad value → 400 before payment (not charged)","enum":["base","ethereum","arbitrum","monad","all"],"type":"string"}},"required":[],"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":true,"properties":{"baseFeeGwei":{"type":"number"},"block":{"additionalProperties":true,"properties":{"gasUsedPct":{"type":["number","null"]},"number":{"type":"integer"},"timestamp":{"type":["string","null"]}},"type":"object"},"chain":{"type":"string"},"chainId":{"type":"integer"},"nativeSymbol":{"type":"string"},"nextBaseFeeGwei":{"type":"number"},"priorityFeeGwei":{"additionalProperties":true,"properties":{"fast":{"type":"number"},"node":{"type":"number"},"slow":{"type":"number"},"standard":{"type":"number"}},"type":"object"},"suggested":{"additionalProperties":true,"properties":{"fast":{"additionalProperties":true,"type":"object"},"slow":{"additionalProperties":true,"type":"object"},"standard":{"additionalProperties":true,"type":"object"}},"type":"object"}},"required":["chain"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"Use when an agent must price, time or route a transaction. Input: optional chain (base default, ethereum, arbitrum, monad, all). Output: JSON base fee, priority tiers (last 20 blocks), suggested maxFeePerGas, block fullness, typical cost of transfer, approve, DEX swap, mint, deploy in gas token (ETH, MON) and USD (Base adds L1 data fee); chain=all adds a compare table and the cheapest chain per action by USD. Example: ?chain=all","last_updated":"2026-11-23T00:51:31.294Z","schemes":["exact"]}