What fee should I use?
Get urgent, normal, and cheap sat/vB targets with live mempool context.
FastPath lets bots and apps use familiar Web3 patterns for block height, balances, transactions, mempool pressure, fee ladders, RBF plans, and Core v31 package signals. Customer access is x402 pay-per-request.
npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [
{ network: "eip155:*", client: new ExactEvmScheme(account) }
]
});
const res = await fetchWithPayment("https://api.nativebtc.org/v1/rpc", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "fastpath_feeLadder",
params: [{ targetBlocks: 6 }]
})
});
console.log(await res.json());
One Node script called POST /v1/rpc, received an x402 quote, paid on Base, retried automatically, and got transaction insight from a live mempool transaction.
These are not raw node dumps. They are decision-oriented Bitcoin answers shaped for agents, wallets, payment processors, and cross-chain apps.
Get urgent, normal, and cheap sat/vB targets with live mempool context.
Check a transaction against Core v31 package data and template estimates.
See whether RBF is available, how many sats to add, or whether CPFP is the path.
Read spendability, pending activity, and optional full UTXO inventory.
Call Bitcoin through Ethereum-style methods such as block number and balance.
It can plan and relay a user-signed replacement. It never signs or holds funds.
Open the hosted dashboard to watch Bitcoin transactions arrive, flag low-fee RBF candidates, track fee distribution, and estimate the opportunity created by paid insight calls. No desktop setup required.
https://api.nativebtc.org/dashboard
Read-only live view:
- total seen
- low-fee candidates
- fee distribution
- trend windows
- projected opportunity
Paid x402 calls stay in your bot or wallet.
The hosted dashboard is read-only telemetry. Bots still use x402 endpoints for paid insight and signed broadcasts.
Use these with provider.send(method, params). They live on the same POST /v1/rpc endpoint as the Ethereum-style Bitcoin translator.
{
"verdict": "healthy_for_target",
"summary": "Effective fee rate 40 sat/vB is above target.",
"templateCheck": {
"mode": "live_cached",
"source": "core_v31_optimizer_cache",
"inOptimizedTemplate": true,
"effectiveFeeRate": 40,
"targetFeeRate": 1
},
"bump": {
"available": true,
"method": "rbf_signed_replacement",
"additionalFeeSats": 141,
"signsOrCustodiesFunds": false
}
}
Start by seeing the payment quote, then let an x402-aware bot pay and retry automatically. The API returns Bitcoin answers; your client still sends familiar HTTP or JSON-RPC.
curl -i https://api.nativebtc.org/v1/block-height
# The 402 response includes:
# Payment-Required: eyJ4NDAy...
#
# Decode it:
node -e "const h=process.argv[1]; console.log(JSON.parse(Buffer.from(h,'base64').toString('utf8')))" "PASTE_PAYMENT_REQUIRED"
Shows price, supported networks, USDC token, and pay-to address before a bot spends.
npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [
{ network: "eip155:*", client: new ExactEvmScheme(account) }
]
});
const res = await fetchWithPayment("https://api.nativebtc.org/v1/rpc", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "fastpath_feeLadder",
params: [{ targetBlocks: 6 }]
})
});
console.log(await res.json());
Works with Base, Polygon, Arbitrum, or World USDC if the wallet has funds.
const res = await fetchWithPayment(
"https://api.nativebtc.org/v1/bitcoin/insight",
{
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
txid: "PASTE_TXID",
address: "bc1q...",
targetBlocks: 6,
action: "analyze"
})
}
);
const answer = await res.json();
console.log(answer.verdict);
console.log(answer.summary);
console.log(answer.bump);
Use this when the bot wants a decision, not a raw mempool dump.
const res = await fetchWithPayment(
"https://api.nativebtc.org/v1/template/fee-ladder",
{
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ targetBlocks: 6 })
}
);
console.log(await res.json());
// Public capability docs:
// curl https://api.nativebtc.org/v1/template/capabilities
Use REST when your bot wants one focused answer instead of JSON-RPC.
const analysis = await fetchWithPayment(
"https://api.nativebtc.org/v1/bitcoin/insight",
{
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
txid: "PASTE_ORIGINAL_TXID",
targetBlocks: 1,
action: "analyze"
})
}
).then((r) => r.json());
if (analysis.bump?.available) {
// Build and sign the replacement in your own wallet.
const signedReplacementHex = "02000000...";
const relayed = await fetchWithPayment(
"https://api.nativebtc.org/v1/bitcoin/insight",
{
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
txid: "PASTE_ORIGINAL_TXID",
action: "broadcast_signed_replacement",
signedReplacementHex
})
}
).then((r) => r.json());
console.log(relayed.broadcast);
}
FastPath plans and relays only. Your wallet signs; the API never holds keys.
Every paid route returns an x402 quote before a bot spends. Batch calls are priced for agent workflows, so checking ten transactions costs less than ten individual checks.
| Use case | Routes | Typical price | Best for |
|---|---|---|---|
| Discovery | /v1/template/health, /v1/template/capabilities | Free | Status, docs, supported methods, examples. |
| Basic Bitcoin reads | /v1/rpc, block height, fees, balance, tx, mempool reads | 0.001 USDC | High-volume bots, dashboards, monitors. |
| UTXO inventory | GET /v1/utxos/:address | 0.002 USDC | Wallet spend checks and coin selection prep. |
| Core v31 intelligence | template check, fee ladder, bump plan, bitcoin insight | 0.01 USDC | Decision answers: pay, wait, bump, or monitor. |
| Batch template checks | POST /v1/template/batch-check, POST /v1/template/optimized-txids | 0.05 USDC | Batch checks or block-weight-limited optimized template txid export. |
| Live stream ticket | GET /v1/mempool/stream-ticket | 0.005 USDC | Short-lived WebSocket access for live mempool events. |
REST endpoints are available for clients that do not want JSON-RPC. Customer paid routes use x402. Public routes are limited to status and capability discovery.
| Method | Path | What it answers | Access |
|---|---|---|---|
| GET | /v1/template/health | Is the template intelligence service alive? | Public |
| GET | /v1/template/capabilities | What methods are available and what is intentionally not exposed? | Public |
| POST | /v1/rpc | Ethereum-style Bitcoin RPC plus FastPath intelligence methods. | x402 |
| POST | /v1/bitcoin/insight | Unified tx, fee, address, template, RBF, and bump decision. | x402 |
| POST | /v1/template/check | Will this transaction likely make the current optimized template? | x402 |
| POST | /v1/template/batch-check | Check up to 10 txids at once. | x402 |
| POST | /v1/template/optimized-txids | Full optimized template txid list for Stratum V2 Job Declaration workflows, up to 4,000 txids and block-weight limited. | x402 $0.05 |
| POST | /v1/template/fee-ladder | Urgent, normal, and cheap fee bands. | x402 |
| POST | /v1/template/bump-plan | RBF or CPFP plan from Core v31 package data. | x402 |
| GET | /v1/mempool/stream-ticket | Pay once, receive a short-lived WebSocket ticket. | x402 |
Customer routes do not accept API keys. A bot receives a payment challenge, pays, retries the request, and receives the Bitcoin answer.
Pay with USDC on
Also speaks Web3 RPC to
POST /v1/template/check
Response:
402 Payment Required
Payment-Required: eyJ4NDAy...
Agent pays through x402.
Agent retries the same request.
Response:
{
"success": true,
"mode": "live_cached",
"source": "core_v31_optimizer_cache",
"inOptimizedTemplate": true
}
Point your Web3 bot at https://api.nativebtc.org/v1/rpc and ask Bitcoin questions.