{"uid":"cap_C6T116D0bil26WLnZqPVQ","slug":"confirmations-needed-d51b13be","name":"Confirmations Needed","description":"Compute confirmations remaining from head and inclusion block. Call when progress bars and readiness gates for deposit/finality logic. Returns confirmations observed vs needed as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.","url":"https://api.delx.ai/api/v1/x402/confirmations-needed","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"target":{"type":"integer","description":"Input field: target."},"tx_block":{"type":"integer","description":"Input field: tx block."},"head_block":{"type":"integer","description":"Input field: head block."}}},"responseSchema":{"type":"json","example":{"done":false,"schema":"delx/util-confirmations-needed/v1","target":12,"remaining":6,"confirmations":6}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rZm1hSmgrFAyvwvw7wQTo","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes blockchain confirmations observed vs. required given a transaction block, current head block, and target confirmation count.","exampleAgentPrompt":"My transaction was included at block 21500000, the chain head is at block 21500012, and I need 15 confirmations — how many more do I still need before I can proceed?","exampleUseCases":[{"title":"Deposit readiness gate for exchange","prompt":"The user deposited ETH and the tx landed at block 20800000. The chain head is now at 20800010 and we require 30 confirmations before crediting funds. How many confirmations are still needed?"},{"title":"Progress bar for DeFi bridge UI","prompt":"Show me a confirmation progress bar: the bridge transaction was mined at block 19000000, the current head block is 19000008, and the bridge requires 20 confirmations to release tokens."},{"title":"Finality check before NFT mint unlock","prompt":"The NFT payment tx was included at block 21200000 and the head is at 21200005. We need 12 confirmations to unlock the mint — are we there yet, and if not, how many are left?"}],"resultDescription":"Returns a deterministic JSON object indicating the number of confirmations observed (head_block minus tx_block) and the number still needed to reach the target, computed locally with no external RPC calls or live data.","failureModes":["Missing required fields (target, tx_block, or head_block) result in a validation error","head_block less than tx_block produces a negative or zero observed confirmations value","Non-integer inputs cause schema validation failure","Payment failure via x402 prevents execution"],"whenToPreferThis":"Use this endpoint when you need a lightweight, deterministic, no-RPC calculation of block confirmations remaining — ideal for progress bars, deposit readiness gates, or finality checks where you already know the tx block, head block, and confirmation threshold and simply need the arithmetic resolved reliably in a structured JSON response.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:51:30.697Z","isFirstParty":false}