82trust / 100
Gas
by Onchain Query API in Onchain & crypto
x402 APIPassing, checked 4 h ago
Live gas market on any major EVM chain: current gas price, base fee and priority-fee percentiles (p25/p50/p75) in gwei, plus the estimated cost in native token and USD for a plain transfer (21k gas) and a typical DEX swap (200k gas). Lets an agent decide whether a transaction is worth sending right now or should wait for cheaper gas, and budget the fee before signing.
GET https://chain.cyberwarex.com/gas
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 173 ms typical, 173 ms slowest 5%
- Last check
- 4 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://chain.cyberwarex.com/gas?chain=base"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fchain.cyberwarex.com%2Fgas
const res = await pay("https://chain.cyberwarex.com/gas?chain=base");
console.log(await res.json());Example input
{
"chain": "base"
}Example output
{
"base_fee_gwei": 0.004119,
"chain": "base",
"est_cost": {
"swap_200k": {
"native": 0.000001127,
"usd": 0.003599
},
"transfer_21k": {
"native": 1.18e-7,
"usd": 0.000377
}
},
"gas_price_gwei": 0.008312,
"native": "ETH",
"native_usd": 3194.51,
"priority_fee_gwei": {
"p25": 0.001,
"p50": 0.0015,
"p75": 0.0031
}
}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 |
|---|---|---|---|---|
| 4 h ago | Passed | 402 | 173 ms | $0.002 |