agentsvc.io

services / btc-fees

financeoperational · 13 ms

Bitcoin Fee Estimate

Bitcoin fees right now: recommended sat/vB for the next block, 30 minutes, 1 hour and economy, what a typical payment costs in USD, mempool size, tip height, next difficulty adjustment and the BTC price in USD and EUR. Call before sending a Bitcoin transaction.

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-fees", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
const { data, payment } = await res.json();  // payment.status "settling"; header X-Payment-Settle: sync returns payment.transaction

Input

FieldTypeDescription

Output

FieldTypeDescription
fees_sat_vbobject
typical_payment_usdobject
mempoolobject
btc_usdnumber