Base Gas
by Base gas price in Onchain & crypto
Base gas price: base fee, priority fee p25/p50/p90 over the last 20 blocks, ready-to-sign maxFeePerGas and maxPriorityFeePerGas for slow, normal and fast inclusion, an L1 data-fee upper bound, and the estimated total cost in wei of an ETH transfer and an ERC-20 transfer, live from Base mainnet RPC with the block number. Required: none; optional blocks (5 to 50). $0.0015 USDC on Base. Failed read, no charge. No account, no API key. Estimates, not inclusion guarantees.
https://ontarioprotocol.com/api/x402/base/gas- Price
- $0.0015
- per call in USDC
- Uptime
- 98.0%
- last 30 days
- Response time
- 278 ms
- 602 ms slowest 5%
- Last check
- Passed
- 5 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
GET https://ontarioprotocol.com/api/x402/base/gas
Each call costs $0.0015 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
GET https://ontarioprotocol.com/api/x402/base/gas?blocks=20Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
blocks | integer | No | Optional number of recent blocks the fee percentiles cover, 5 to 50. Default 20. Default: 20. |
Example response
The provider's example. We can't check it without paying.
Example response, 48 lines
{
"assumptions": {
"base_fee": "base fee of the next block",
"blocks_sampled": 20,
"erc20_transfer_gas": 65000,
"erc20_transfer_unsigned_tx_bytes": 175,
"estimate_formula": "gas * (base_fee + p50 tip) + L1 data-fee upper bound",
"eth_transfer_gas": 21000,
"eth_transfer_unsigned_tx_bytes": 110,
"max_fee_formula": "2 * base_fee + priority_fee",
"priority_fee_method": "median across the sampled blocks of each block's gas-weighted 25th, 50th and 90th percentile tip (eth_feeHistory)"
},
"base_fee_wei": "5000000",
"block": 53049909,
"estimate_includes_l1_fee": true,
"estimated_total_wei": {
"erc20_transfer": "390565949161",
"eth_transfer": "126389167165"
},
"l1_fee_upper_bound_wei": {
"erc20_transfer": "565949161",
"eth_transfer": "389167165"
},
"network": "eip155:8453",
"note": "Estimates, not inclusion guarantees. Wei amounts are decimal strings.",
"priority_fee_wei": {
"p25": "1000000",
"p50": "1000000",
"p90": "5800000"
},
"read_at": "2026-10-25T00:46:05Z",
"schema": "ontario.base_gas.v1",
"source": "Base RPC",
"suggested": {
"fast": {
"max_fee_per_gas": "15800000",
"max_priority_fee_per_gas": "5800000"
},
"normal": {
"max_fee_per_gas": "11000000",
"max_priority_fee_per_gas": "1000000"
},
"slow": {
"max_fee_per_gas": "11000000",
"max_priority_fee_per_gas": "1000000"
}
}
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.0015.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://ontarioprotocol.com/api/x402/base/gas?blocks=20'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - 'https://ontarioprotocol.com/api/x402/base/gas?blocks=20' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.0015 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.0015" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.0015 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fontarioprotocol.com%2Fapi%2Fx402%2Fbase%2Fgas
const res = await pay("https://ontarioprotocol.com/api/x402/base/gas?blocks=20");
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.0015 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.0015"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.get("https://ontarioprotocol.com/api/x402/base/gas?blocks=20")
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 5 h ago | Passed | 402 | 258 ms | $0.0015 |
| 15 h ago | Passed | 402 | 271 ms | $0.0015 |
| 25 h ago | Passed | 402 | 326 ms | $0.0015 |
| 35 h ago | Passed | 402 | 306 ms | $0.0015 |
| 2 days ago | Timed out | - | - | - |
Show 10 older checks
| 4 days ago | Timed out | - | - | - |
| 5 days ago | Passed | 402 | 731 ms | $0.0015 |
| 6 days ago | Passed | 402 | 241 ms | $0.0015 |
| 6 days ago | Passed | 402 | 260 ms | $0.0015 |
| 7 days ago | Passed | 402 | 243 ms | $0.0015 |
| 7 days ago | Passed | 402 | 251 ms | $0.0015 |
| 7 days ago | Passed | 402 | 258 ms | $0.0015 |
| 8 days ago | Passed | 402 | 254 ms | $0.0015 |
| 8 days ago | Passed | 402 | 1.5 s | $0.0015 |
| 8 days ago | Passed | 402 | 254 ms | $0.0015 |