Skip to content
Fourohtwo

Use when an agent must price, time or route a transaction

1gateway.dev/v1/onchain/gas

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 ac

BaseMonadPolygonArbitrumSolanaAnswering
GEThttps://1gateway.dev/v1/onchain/gas

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://1gateway.dev/v1/onchain/gas?chain=all");
console.log(await res.json());

Example input

{
  "chain": "all"
}

More from 1gateway