Chain
Gas-price history percentiles API
Read eth_feeHistory over the last N blocks from a free public RPC and derive the base-fee distribution: p10/p50/p90 percentiles in gwei, min/max, the current level, and a send-or-wait recommendation based on where the current fee sits in the recent range. The value-add is the percentile derivation — chain/gas gives only the spot fee; this tells you whether now is cheap or expensive. Answers 'is gas cheap right now', 'gas price percentiles', 'should I wait to send', 'recent base-fee range'.
Price$0.01per request
MethodPOST
Route/v1/chain/gas-history
StatusLive
MIME typeapplication/json
Rate limit60/minute
Cache3600s public
chaingasfeepercentilefeehistoryevmbasefeegwei
API URL
Integration docshttps://x402.hexl.dev/v1/chain/gas-historyExample request
{
"chain": "ethereum",
"blocks": 100
}Example response
{
"chain": "ethereum",
"blocks": 100,
"currentBaseFeeGwei": 12.4,
"minGwei": 8.1,
"p10Gwei": 9.3,
"medianGwei": 14.7,
"p90Gwei": 22.6,
"maxGwei": 31.2,
"level": "below-median",
"recommendation": "Below the recent median — reasonable time to send."
}Input schema
{
"type": "object",
"required": [],
"properties": {
"chain": {
"type": "string",
"enum": [
"base",
"ethereum"
],
"default": "base",
"examples": [
"ethereum"
]
},
"blocks": {
"type": "number",
"default": 50,
"examples": [
100
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}