# AgentPay sBTC Peg

> AgentPay sBTC Peg is a paid API for AI agents from agentpay.tools, paid per call via x402, $0.01/call, status unknown (last checked 2026-12-02).

Returns live sBTC supply, peg-in/out flows (24h and 7d), in-flight bridge requests, signer set/threshold, and withdrawal headroom from Stacks on-chain data.

## Facts

- Endpoint: POST https://agentpay.tools/tools/sbtc_peg/call?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentpay-sbtc-peg-09a18b20
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wWiAUtGLH_gfmyVJsUOPq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentpay-sbtc-peg-09a18b20 -d '<json body>'
```

Example prompt: What's the current sBTC supply versus the peg cap, and how much BTC has flowed in and out over the last 24 hours and 7 days? Also flag any stuck or failed bridge deposits.

## When to prefer this

Use this endpoint when you need Stacks-native sBTC bridge data that is unavailable from EVM sources — specifically live supply vs cap, real-time peg flow volumes, in-flight and failed bridge requests, signer set details, and withdrawal headroom. Prefer this over generic blockchain explorers or EVM DeFi data APIs when the question specifically concerns sBTC on Stacks mainnet.

## Known failure modes

- Stacks node or bridge API unavailable — stale or missing data returned
- On-chain data lag during high-throughput periods may cause slight staleness
- No schema parameters required so malformed input is not a risk, but the endpoint may return an error if the upstream contract is unreachable
- Rate limiting or payment failure (x402) if USDC balance is insufficient

## How this service works

The sBTC peg as an agent-readable feed: live supply vs cap, peg-in and peg-out flows for 24h and 7d (sats, counts, unique recipients, net), in-flight and failed bridge requests, the last peg events with Bitcoin txids, the signer set and threshold, and the rolling withdrawal headroom. Stacks-native data no EVM source has, read straight from the sBTC contracts and the bridge API.

## Output

A structured snapshot including: total sBTC supply in BTC and sats, peg cap and utilization percentage, 24h and 7d peg-in/peg-out volumes (sats, counts, unique recipients, net), in-flight deposit and withdrawal counts, failed bridge requests, age of oldest pending deposit, signer count and 8-of-11 threshold, withdrawal headroom percentage, last peg events with Bitcoin txids, and current Stacks and Bitcoin block heights.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "parameters": {
   "type": "object",
   "properties": {}
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "read": "sBTC supply 2484.02 BTC; 24h net +1.7655 BTC (870 in / 15 out); 7d net +3.0240 BTC (5324 in / 110 out); 10 deposits pending (oldest 50.0h); 8-of-11 signers; withdrawal headroom 97.9%",
 "as_of": {
  "time": "2026-11-05T13:16:06+00:00",
  "stacks_height": 9418770,
  "bitcoin_height": 974675
 },
 "asset": "sBTC",
 "flows": {
  "7d": {
   "complete": true,
   "net_sats": 302398836,
   "peg_in_sats": 1093108934,
   "peg_in_count": 5324,
   "peg_out_sats": 790710098,
   "peg_out_count": 110,
   "from_stacks_height": 9359229,
   "peg_in_unique_recipients": 39
  },
  "24h": {
   "complete": true,
   "net_sats": 176548948,
   "peg_in_sats": 349000521,
   "peg_in_count": 870,
   "peg_out_sats": 172451573,
   "peg_out_count": 15,
   "from_stacks_height": 9411041,
   "peg_in_unique_recipients": 11
  }
 },
 "notes": [],
 "supply": {
  "btc": 2484.02294199,
  "sats": 248402294199,
  "pct_of_cap": 0.0118,
  "peg_cap_sats": 2100000000000000
 },
 "network": "stacks-mainnet",
 "signers": {
  "note": "signer liveness is not published; the observable proxies are pending/accepted deposit ages and the rolling withdrawal headroom",
  "count": 11,
  "limits": {
   "peg_cap_sats": 2100000000000000,
   "throttle_mode": null,
   "rolling_window_blocks": 150,
   "per_withdrawal_cap_sats": 5100000000,
   "withdrawal_headroom_pct": 97.9,
   "per_deposit_minimum_sats": 10000,
   "available_to_withdraw_sats": 14786411900,
   "rolling_withdrawal_cap_sats": 15100000000
  },
  "liveness": null,
  "aggregate_pubkey": "0x02d99ad0f0111a7e9aaa2ed22940efec98db0ece9b9475e61e1eec65a6e7f3af69",
  "signature_threshold": 8
 },
 "contract": "SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token",
 "in_flight": {
  "deposits_pending": 10,
  "deposits_accepted": 16,
  "deposits_failed_24h": 0,
  "withdrawals_pending": 0,
  "withdrawals_accepted": 3,
  "withdrawals_failed_24h": 1,
  "oldest_pending_deposit_age_hours": 50
 },
 "last_events": [
  {
   "sats": 85000,
   "type": "peg_in",
   "recipient": "SP000000000000000000002Q6VF78.pox-5",
   "bitcoin_txid": "62acd3f2cee3b1bb0ba547de0d1fc32253bf69e79b63cf19f9e055dc97f741db",
   "stacks_height": 9418744
  }
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentpay-sbtc-peg-09a18b20/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentpay.tools](https://www.zero.xyz/host/agentpay.tools/llms.txt)
