{"uid":"cap_Wvd26gI_QO330N0u50jl2","slug":"op-stack-l1-fee-estimator-9b3fdc05","name":"OP-Stack L1 Fee Estimator","description":"Machine-payable data APIs for AI agents across web search, on-chain reads, trading data, market judgment, and AI visibility. The canonical x402 catalog currently exposes 85 paid routes. Pay per call in USDC via x402 on Base. No API keys, no signup.","url":"https://store.agentexchange.work/chain/l1-fee","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"data":{"type":"string","description":"0x-prefixed calldata of your actual transaction — priced exactly, which is what you want if you are budgeting a real send"},"bytes":{"type":"number","description":"Transaction size in bytes, 1-200000 (default 1200 — roughly a plain ERC-20 transfer). Ignored when data is supplied."},"chain":{"type":"string","description":"base|optimism (OP-stack only)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"l1_fee_eth":{"type":"number"},"l1_fee_usd":{"type":"number"},"l1_fee_wei":{"type":"string"},"l1_fee_usd_per_1000_tx":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"basis":"a representative incompressible 1200-byte payload — pass data=0x... to price your actual transaction instead","chain":"base","method":"GasPriceOracle.getL1Fee(bytes)","l1_fee_eth":3.99187e-9,"l1_fee_usd":0.00000747,"l1_fee_wei":"3991865524","tx_size_bytes":1200,"base_fee_scalar":2269,"l1_base_fee_gwei":0.032894326,"l1_fee_usd_per_1000_tx":0.00747}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.09","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.09/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NKKPtoeiDymhwkaxhGpvh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.09","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the L1 data fee (in ETH, USD, and wei) for a transaction on Base or Optimism, using the on-chain GasPriceOracle contract","exampleAgentPrompt":"What's the current L1 data fee on Base for a standard ERC-20 transfer — give me the answer in both ETH and USD?","exampleUseCases":[{"title":"Pre-flight transaction cost check","prompt":"Before I send this token transfer on Base, can you tell me what the L1 fee will be in USD? Here's the calldata: 0xa9059cbb000000000000000000000000abcdef1234567890abcdef1234567890abcdef12000000000000000000000000000000000000000000000000016345785d8a0000"},{"title":"Batch cost projection for dApp","prompt":"I'm planning to submit 1000 transactions on Optimism — each is about 800 bytes. What would the total L1 data fees come to in USD so I can budget the rollup costs?"},{"title":"L1 fee comparison between Base and Optimism","prompt":"Can you look up the current L1 data fee for a typical 1200-byte transaction on both Base and Optimism and tell me which one is cheaper right now?"}],"resultDescription":"A JSON object containing the L1 fee expressed in wei (as a string), ETH (as a float), and USD (as a float), along with supporting data: the transaction size in bytes, the L1 base fee in gwei, the base fee scalar, the fee per 1000 transactions in USD, and metadata about the pricing method and chain used.","failureModes":["Invalid or missing chain parameter returns an error — only 'base' and 'optimism' are supported","Malformed or non-hex calldata in the 'data' parameter causes a parsing error","Transaction size in bytes outside the 1–200000 range returns a validation error","Network or RPC issues may cause transient failures fetching live L1 base fee","Missing required 'type' or 'method' fields in the input object returns a schema validation error"],"whenToPreferThis":"Use this endpoint when you need a precise, live L1 data fee estimate for an OP-stack chain (Base or Optimism) — especially when you have actual calldata and want an exact price rather than an approximation. It calls the canonical GasPriceOracle contract on-chain, so it reflects the real current L1 base fee scalar. Prefer this over generic gas estimators when you need the L1 fee component specifically (not L2 execution gas), and when you want the result denominated in USD for budgeting or display purposes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:54:05.572Z","isFirstParty":false}