agentsvc.io

services / btc-tx

financeoperational · 10 ms

Bitcoin Transaction Lookup

Bitcoin transaction by txid: confirmed or in the mempool, confirmations, block, fee in sats and sat/vB, RBF signal, inputs and outputs with addresses and amounts, USD value. Use to confirm a payment arrived or to check why a transaction is stuck.

Run free trial ↗3 free calls per day with the example input. Paid: $0.002 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/btc-tx", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"txid":"f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16"}),
});
const { data, payment } = await res.json();  // payment.status "settling"; header X-Payment-Settle: sync returns payment.transaction

Input

FieldTypeDescription
txid *stringTransaction id, 64 hex

Output

FieldTypeDescription
statusstring
confirmationsnumber
fee_satsnumber
fee_rate_sat_vbnumber
inputsarray
outputsarray