360 Secure SkillHub
360 安全技能中心

Gas Fee Tracker

核心功能:通过免费公共RPC获取以太坊、Base等4个EVM链的实时Gas费,按链适配阈值分类低中高,支持记录历史到JSONL文件,可设置阈值触发自动化告警。典型场景:合约部署选低价窗口期、交易自动化触发、分析Gas费周期规律。输入为命令行参数,输出含文本/JSON结果或追加日志,无API密钥要求。

ssidharhubble
ssidharhubble
热度 8.41
最近更新 2026-07-23 06:42:10
分类:数据依赖:代码执行 / 第三方 API / 读写文件应用场景:数据处理 / 自动化脚本 / 财务

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gas-fee-tracker
Metadata
name
gas-fee-tracker
description
Track live EVM gas fees across Ethereum, Base, Polygon, and Arbitrum using free public RPC endpoints with no API key required. Classifies current gas as low, medium, or high against configurable thresholds, logs snapshots to a JSONL history file over time, and supports threshold alerts for scripting into automations. Useful for crypto trading, defi, smart contract deployment, and passive income bots that need to time on-chain transactions to avoid overpaying for gas. Complements whale-tracking and defi yield-farming workflows by timing execution around cheap gas windows.
compatibility
Created for Zo Computer
metadata
{"author":"ssyopros.zo.computer"}

Gas Fee Tracker

Live gas price snapshots across four EVM chains, using only free public RPC endpoints — no API key, no rate-limit signup required.

When to use this skill

  • Timing a contract deployment or large transaction batch for a cheap gas window
  • Building an automation that only executes a transaction when gas drops below a threshold
  • Logging gas price history over time to spot patterns (e.g. daily/weekly cycles) before scheduling recurring on-chain jobs

How to use it

Snapshot all chains:

python3 scripts/gas_tracker.py

Single chain, JSON output for scripting:

python3 scripts/gas_tracker.py --chain ethereum --json

Append to a running history log:

python3 scripts/gas_tracker.py --log gas_history.jsonl

Use as a gate in an automation (exits 0 only if gas is at/below threshold):

python3 scripts/gas_tracker.py --chain base --alert-below 0.1 && echo "cheap gas, proceed"

Supported chains

Ethereum mainnet, Base, Polygon, Arbitrum One — each with its own low/high gwei thresholds tuned to that chain's typical range.

Limitations

  • Reports the current eth_gasPrice legacy gas price, not EIP-1559 base-fee/priority-fee breakdown or a predictive estimate of future blocks
  • Public RPC endpoints can occasionally rate-limit or time out; the script reports per-chain errors rather than failing the whole run