Blocknative Gas API → GFP Field Mapping
BN shuts down June 19, 2026Every field in Blocknative's /gasprices/blockprices response, mapped to its Gas Fee Predictor equivalent (or marked “not provided” with a workaround). Use this as the lookup reference while migrating. For step-by-step instructions and code samples, see the migration guide. For the high-level pitch, see the Blocknative alternative landing page.
Top-level response fields
Blocknative's /gasprices/blockprices endpoint returned these top-level fields. Equivalents from our /api/gas-predictions endpoint:
| Blocknative field | GFP equivalent | Notes |
|---|---|---|
system | meta.source (implicit — always Ethereum mainnet) | We are Ethereum-mainnet-only at this endpoint; L2 networks have their own /api/l2-gas endpoint. |
network | meta.source (RPC provider name, not "main"/"goerli") | We report which RPC provider served the data (e.g., "rpc-publicnode") — different concept than Blocknative's network field, which was always "main" in production. |
unit | implicit (always gwei) | All gas-price fields are in gwei. Not echoed in the response. |
maxPrice | Not provided | Not provided. Blocknative used this as an upper-bound cap; we don't enforce one. |
currentBlockNumber | Not provided | Not provided. If you need it, query an RPC directly: eth_blockNumber on any public node. |
msSinceLastBlock | Not provided | Not provided. If you need block-timing data, query an RPC directly. |
blockPrices[] | current (single object) + predictions[] (hourly forecast) | Blocknative returned an array per upcoming block. We collapse current to a single object and forecast hourly via predictions[]. |
estimatedBaseFees[] | predictions[] (different shape — see below) | Blocknative forecast per-block base fees. We forecast hourly with confidence + isLowFeeWindow flags. |
blockPrices[0] inner fields
Most callers focused on the first element of blockPrices[] (the next block). Field-by-field:
| Blocknative field | GFP equivalent | Notes |
|---|---|---|
blockPrices[0].blockNumber | Not provided | Not provided. Same as currentBlockNumber above — query an RPC. |
blockPrices[0].estimatedTransactionCount | Not provided | Not provided. Mempool-derived data not in scope. |
blockPrices[0].baseFeePerGas | current.low (approximate) | Base fee + minimum priority fee ≈ what we report as current.low. Not an exact 1:1 because we always include some priority fee in low; pure base fee requires an RPC eth_feeHistory call. |
blockPrices[0].estimatedPrices[] | current.{low, average, high} | Blocknative returned 5 confidence percentiles; we collapse to 3 tiers. Mapping below. |
Confidence percentile → tier mapping
Blocknative returned 5 confidence percentiles (99 / 95 / 90 / 80 / 70). We collapse to 3 tiers (low / average / high). This is the most common transition point in real migrations.
| Blocknative field | GFP equivalent | Notes |
|---|---|---|
estimatedPrices[c=99].price | current.high | "Will-include" tier — fast inclusion expected within 1 block. |
estimatedPrices[c=95].price | current.high | Approximately same as 99% in practice. |
estimatedPrices[c=90].price | current.average | Typical wallet default tier. |
estimatedPrices[c=80].price | current.average | Standard tier — most wallets use this as the default Send button price. |
estimatedPrices[c=70].price | current.low | Slow inclusion — may take multiple blocks. Use for non-urgent transactions. |
estimatedPrices[c=*].maxPriorityFeePerGas | Not provided | We don't break out priority fee from base fee. Set a reasonable static default (1-2 gwei) for EIP-1559 transactions, or query an RPC eth_feeHistory. |
estimatedPrices[c=*].maxFeePerGas | current.high (use as upper-bound) | For EIP-1559 maxFeePerGas, current.high is a safe over-estimate. Add a 10-20% buffer if your wallet does padding. |
Bonus: GFP fields without a Blocknative equivalent
Fields we expose that Blocknative didn't. Adopt these if your migration window is also a refactoring window:
| Blocknative field | GFP equivalent | Notes |
|---|---|---|
(no equivalent — bonus) | nextBestTime | Pattern-based "when is the next cheap window" forecast. Useful for scheduling non-urgent transactions. |
(no equivalent — bonus) | decision.recommendation | Quick "wait" or "send_now" hint based on current vs predicted gas. Synthesizes nextBestTime + savings estimate. |
(no equivalent — bonus) | predictions[].isLowFeeWindow | Boolean flag per hour marking predicted low-fee windows. Useful for cron-based dispatch. |
(no equivalent — bonus) | citation | Stable copy-paste attribution string for AI agents and integrators. Drop directly into LLM answers. |
(no equivalent — bonus) | /api/l2-gas | Live gas for Arbitrum, Optimism, Base, Polygon. Blocknative's gas API was L1-only. Includes full wallet-fee estimate with L1 data fee for OP Stack chains. |
What we don't replace
Blocknative offered several products beyond the gas-price API. If you used these, you'll need a different provider for them:
| Blocknative product | Typical use | Suggested alternative |
|---|---|---|
| Mempool data stream | Live pending-tx feed via WebSocket | Alchemy (eth_subscribe newPendingTransactions), Tenderly, Bloxroute |
| Transaction simulation | Pre-execution outcome prediction | Tenderly simulation API, Alchemy debug_traceCall |
| Transaction management | Submit, watch, re-submit (cancel/speed-up) | Alchemy, your own RPC node, Foundry forge scripts |
| Gas Network (decentralized oracle) | On-chain gas oracle for smart contracts | Chainlink fast gas oracle (where deployed), or read base-fee history from the chain directly |
| Per-block predictions | Next 1-5 block base-fee forecast | Compute from RPC eth_feeHistory directly, or use our hourly predictions[] for longer-horizon scheduling |
| WebSocket streaming | Push updates without polling | Poll our endpoints every 30-60s (edge-cached, no rate-limit cost). No WebSocket support on our side. |
Side-by-side response shape
For visual reference — what your code is parsing before and after migration:
Blocknative /gasprices/blockprices
{
"system": "ethereum",
"network": "main",
"unit": "gwei",
"maxPrice": 50,
"currentBlockNumber": 18000000,
"msSinceLastBlock": 5000,
"blockPrices": [
{
"blockNumber": 18000001,
"estimatedTransactionCount": 200,
"baseFeePerGas": 30.5,
"estimatedPrices": [
{ "confidence": 99, "price": 35.5, "maxPriorityFeePerGas": 2, "maxFeePerGas": 67 },
{ "confidence": 95, "price": 33.2, "maxPriorityFeePerGas": 1.5, "maxFeePerGas": 65 },
{ "confidence": 90, "price": 32, "maxPriorityFeePerGas": 1, "maxFeePerGas": 64 },
{ "confidence": 80, "price": 30.5, "maxPriorityFeePerGas": 0.5, "maxFeePerGas": 62 },
{ "confidence": 70, "price": 30, "maxPriorityFeePerGas": 0.1, "maxFeePerGas": 61 }
]
}
],
"estimatedBaseFees": [ /* per-block forecast */ ]
}Gas Fee Predictor /api/gas-predictions
{
"current": { "low": 0.39, "average": 0.50, "high": 0.62, "source": "rpc-publicnode" },
"historical": [ /* recent samples */ ],
"predictions": [
{ "timestamp": "...", "low": 0.30, "average": 0.40, "high": 0.55, "isLowFeeWindow": true, "confidence": 0.85 }
/* … 24 hourly points */
],
"nextBestTime": { "timestamp": "...", "gasPrices": {...}, "confidence": 0.82 },
"decision": { "recommendation": "wait", "expectedSavingsPct": 35, ... },
"timeframe": "24h",
"lastUpdated": "...",
"meta": { ... },
"citation": "Gas data from Gas Fee Predictor, gasfeepredictor.com, updated ...",
"tier": "free"
}Ready to write the migration code?
Step-by-step walkthrough with before/after code in curl, JavaScript, Python, and Go.