{"uid":"cap_j_pjT4t59ag44-58rxHwR","slug":"chainquery-gettxspendingprevout-fcdc168a","name":"chainquery gettxspendingprevout","description":"chainquery Bitcoin RPC: pay-per-call Bitcoin Core over x402, no API key. Whether given outputs are being spent by any mempool transaction, from chainquery's independent full node. Bitcoin Core gettxspendingprevout.","url":"https://x402.chainquery.com/v1/rpc/gettxspendingprevout?utm_source=zero.xyz","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"params":{"type":"string","description":"optional: JSON-encoded array of positional RPC params"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"result":{"description":"gettxspendingprevout result"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_saZW2UGsAdMlI7TjnEzHa","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks whether given Bitcoin transaction outputs (UTXOs) are currently being spent by any unconfirmed mempool transaction","exampleAgentPrompt":"Check whether the output at index 0 of Bitcoin transaction a1b2c3d4e5f6... is currently being spent by any unconfirmed mempool transaction using chainquery's independent full node.","exampleUseCases":[{"title":"Detect double-spend on exchange deposit","prompt":"I just received a Bitcoin deposit to our exchange with txid 7f3a9c1e2b4d... at output index 0 — can you check whether any unconfirmed mempool transaction is already spending that same output, so I can flag it as a potential double-spend before crediting the account?"},{"title":"Monitor Lightning channel funding UTXO","prompt":"We have a Lightning channel funded by transaction 3d8e1f2a6b9c... at output index 1 — please check chainquery's mempool right now to see if anything is trying to spend that output, since that could mean someone is attempting a force-close or theft."},{"title":"Verify wallet UTXO before sending","prompt":"Before I broadcast my next Bitcoin transaction, can you confirm that the output I'm planning to use — txid c9f4a2e7d1b8... at index 2 — isn't already being spent by some pending mempool transaction, so I don't accidentally create a conflicting spend?"}],"resultDescription":"Returns the result of Bitcoin Core's gettxspendingprevout RPC call — for each queried prevout, indicates whether a mempool transaction is currently spending it and, if so, provides the spending transaction ID.","failureModes":["Invalid or malformed transaction ID returns an RPC error","Output index out of range for the given transaction","Payment of $0.01 USDC not provided or rejected — returns HTTP 402","Mempool data may differ from other nodes due to network propagation lag","UTXO not found if transaction is unconfirmed or pruned"],"whenToPreferThis":"Use this endpoint when you need to detect double-spend attempts or check real-time mempool spend status for specific UTXOs without managing your own Bitcoin full node or obtaining an API key. Ideal for wallet software, exchange custody checks, and Lightning channel monitoring that need trustless, independent node data on a pay-per-call basis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:39:31.545Z","isFirstParty":false,"canonicalSlug":"chainquery-gettxspendingprevout-fcdc168a"}