跳到正文
Testnet5.com
stratum+tcp://stratum.testnet5.com:3334· 用户名: 你的 tb1 地址 · 密码: x挖矿设置指南 →
免费币
Tor 镜像e3qifz7yaqfxkoz7pqy24sggrhokf5gccusmjwv4r77zcicapozpteid.onion
Testnet5.com › 浏览器 API

Testnet5 区块浏览器 API

面向 Testnet5 区块链和 Testnet5.com 矿池的免费公开 JSON API。无需密钥,也无需注册。它提供的正是驱动 Testnet5 区块浏览器 和矿池统计页的同一套数据。

Testnet5 目前仍是提案(Bitcoin Core PR #35861),尚未合并进 Bitcoin Core。这条链可能会被重置,也可能永远不会正式上线。 [BIP 95, Draft]

基本说明

  • 浏览器基础 URL: https://api.testnet5.com/explorer/v1
  • 矿池基础 URL: https://api.testnet5.com/api/pools/testnet5
  • 只读。 每个接口都是返回 JSON 的普通 HTTPS GET。
  • 可从网页调用。 响应允许来自任意源的请求,因此浏览器应用可以直接调用该 API。
  • 单位。 浏览器中的金额以聪(satoshis)计(1 tBTC5 = 100,000,000 sats),时间为 Unix 秒。矿池金额以完整的 tBTC5 计,矿池时间为 UTC 的 ISO 8601。
  • 仅限测试币。 Testnet5 的币没有价值。矿池 API 将币种标记为 “BTC”,其信息链接指向主网浏览器,因此请忽略那些链接,改在本站查询。

合理使用与速率限制

该 API 对人、脚本和机器人免费开放。为了让大家都能快速使用,请求会按 IP 地址限速。具体限额可能不经通知而调整。

  • 持续轮询时,请大约保持每秒一次请求。新区块平均每隔几分钟才会出现,因此每 10 到 30 秒轮询一次 /stats 就足够了。
  • 响应带有较短的 Cache-Control 有效期。请在自己这边缓存并复用响应,而不要立刻再请求一次。
  • 如果收到 HTTP 429(请求过多)或 503(繁忙),请退避并在几秒后再试,每次把等待时间加长。
  • 若需要完整拷贝整条链,请运行自己的节点,而不是抓取每一个区块。参见 运行 Testnet5 节点。

损害服务的流量可能被封禁。该 API 不保证可用性,而且 Testnet5 链本身可能被重置。

错误

浏览器错误以带 HTTP 状态码的 JSON 返回:格式错误的请求(例如无效地址)为 400,没有匹配结果时为 404。

{"error": "not a valid Testnet5 address"}

浏览器接口

以下路径均相对于 https://api.testnet5.com/explorer/v1。

GET /stats

链摘要:高度、最佳区块哈希、难度、估算全网算力、平均出块时间、下一次难度调整、已发行币量、内存池摘要,以及最新区块和交易。

无参数。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/stats'
响应示例(实时数据,已精简)
{
  "chain": "testnet5",
  "height": 5125,
  "best_hash": "00000000000000956b5ba02850c549024c87093f4b4aae9539660ea9668c7abf",
  "difficulty": 16777216.0,
  "bits": "1a00ffff",
  "chainwork": "000000000000000000000000000000000000000000000006bc04cbe466024de0",
  "median_time": 1794932504,
  "time": 1794932585,
  "size_on_disk": 3395094,
  "hashrate": 1111730936996655.0,
  "hashrate_144": 1004788600130917.0,
  "avg_block_time": 71.71527777777777,
  "next_retarget_height": 6048,
  "blocks_to_retarget": 923,
  "halving_height": 210000,
  "subsidy": 5000000000,
  "indexed_height": 5125,
  "index_synced": true,
  "tx_count": 5248,
  "total_fees": 354697,
  "circulating": 25630000000000,
  "mempool": {
    "count": 0,
    "vbytes": 0,
    "total_fee": 0,
    "min_fee_rate": 0.09999999999999999
  },
  "latest_blocks": [
    {
      "height": 5125,
      "hash": "00000000000000956b5ba02850c549024c87093f4b4aae9539660ea9668c7abf",
      "time": 1794932585,
      "tx_count": 1,
      "size": 284,
      "weight": 1028,
      "total_out": 5000000000,
      "fees": 0,
      "subsidy": 5000000000,
      "coinbase_tag": "Testnet5.com Pool",
      "coinbase_address": "tb1qt6vrvd992zcprxdc2qc89283aay4440gcajapa",
      "confirmations": 1
    }
  ],
  "latest_txs": [
    {
      "txid": "c86ea5d056cc2c47fef865bb078229f19093f4d2be6c939a0329331b2e0420ac",
      "height": 5117,
      "time": 1794932344,
      "fee": 369,
      "vsize": 369,
      "inputs": 3,
      "outputs": 5,
      "total_out": 15000009433
    }
  ],
  "mempool_txs": []
}

GET /network

网络状况:多个窗口的算力(12、144 和 1,008 个区块,以及自上次难度调整以来)、内存池手续费数据,以及按 coinbase 标签统计近期区块由哪些矿池找到。

无参数。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/network'
响应示例(实时数据,已精简)
{
  "chain": "testnet5",
  "height": 5125,
  "time": 1794932585,
  "difficulty": 16777216.0,
  "bits": "1a00ffff",
  "next_retarget_height": 6048,
  "blocks_to_retarget": 923,
  "subsidy": 5000000000,
  "hashrate": {
    "12": 1879792006078257.0,
    "144": 1004788600130917.0,
    "1008": 349382206078346.2,
    "since_retarget": 370678566612914.4
  },
  "mempool": {
    "count": 0,
    "vbytes": 0,
    "total_fee": 0,
    "min_fee_rate": 0.09999999999999999,
    "fee_rates": null
  },
  "windows": {
    "144": {
      "blocks": 144,
      "avg_interval": 77.90225563909775,
      "avg_fullness": 0.03608298611111111,
      "avg_tx_count": 1.0972222222222223,
      "pools": [
        {
          "name": "ckpool",
          "blocks": 82,
          "share": 0.5694444444444444
        },
        {
          "name": "plebhash",
          "blocks": 28,
          "share": 0.19444444444444445
        }
      ]
    }
  }
}

GET /blocks

近期区块,最新的在前。

参数位置作用
limitquery返回多少个区块,范围为 1 到 50。默认 25。
beforequery只返回低于该高度的区块。用于向后翻页浏览整条链。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/blocks?limit=2'
响应示例(实时数据,已精简)
{
  "tip": 5125,
  "blocks": [
    {
      "height": 5125,
      "hash": "00000000000000956b5ba02850c549024c87093f4b4aae9539660ea9668c7abf",
      "time": 1794932585,
      "tx_count": 1,
      "size": 284,
      "weight": 1028,
      "total_out": 5000000000,
      "fees": 0,
      "subsidy": 5000000000,
      "coinbase_tag": "Testnet5.com Pool",
      "coinbase_address": "tb1qt6vrvd992zcprxdc2qc89283aay4440gcajapa",
      "confirmations": 1
    },
    {
      "height": 5124,
      "hash": "00000000000000153617e01622fbbf3d0620338ff0e2177989b88f627736cd48",
      "time": 1794932602,
      "tx_count": 1,
      "size": 336,
      "weight": 1236,
      "total_out": 5000000000,
      "fees": 0,
      "subsidy": 5000000000,
      "coinbase_tag": "",
      "coinbase_address": "tb1qsff602kddke6mc0yfg7u2265xtks9x2crnefx8",
      "confirmations": 2
    }
  ]
}

GET /block/{height or hash}

按高度或 64 字符哈希查询一个区块:包含区块头字段、coinbase 详情(含 BIP 34 高度和 BIP 54 检查)及其交易,每页 25 笔。

参数位置作用
height or hashpath区块高度,例如 5117,或区块哈希。
pagequery交易页码,从 0 开始。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/block/5117'
响应示例(实时数据,已精简)
{
  "height": 5117,
  "hash": "00000000000000b7c44302f1acbe13ab9a8e2ef06f9e25e42b0c3e8277cbd2e3",
  "time": 1794932344,
  "tx_count": 2,
  "size": 887,
  "weight": 2471,
  "total_out": 20000009802,
  "fees": 369,
  "subsidy": 5000000000,
  "coinbase_tag": "ckpool",
  "coinbase_address": "tb1q6pt2vtrfx4d7g7rkqzm3ca9xvcedfp99ax955r",
  "confirmations": 9,
  "version": 564043776,
  "version_hex": "219ea000",
  "merkle_root": "e939cc773f334d824bdf66078e0e88c3fe16e94490fed173522280164d0cdd75",
  "bits": "1a00ffff",
  "nonce": 1805387147,
  "difficulty": 16777216.0,
  "chainwork": "000000000000000000000000000000000000000000000006b404c3e45e0245e0",
  "median_time": 1794932066,
  "previous_hash": "000000000000003a2528a45dd5c1aed42daacfd517d244697c680ad184fd71de",
  "next_hash": "000000000000002dd1f138ab9757f1c530f56d4391e7aef6db3fdba9265a64fe",
  "stripped_size": null,
  "txs": [
    {
      "txid": "fc21f67d10bd9418aa3249e8491d1565971cb14d86d77c09496f152784034f97",
      "index": 0,
      "fee": 0,
      "vsize": 168,
      "inputs": 1,
      "outputs": 2,
      "total_out": 5000000369,
      "coinbase": true
    }
  ],
  "page": 0,
  "page_size": 25,
  "coinbase": {
    "txid": "fc21f67d10bd9418aa3249e8491d1565971cb14d86d77c09496f152784034f97",
    "script_hex": "02fd130004787efc6a04c85ad2180885f0f76a9b1400000a636b706f6f6c",
    "script_ascii": "ckpool",
    "bip34_height": 5117,
    "bip54": {
      "locktime": 5116,
      "expected_locktime": 5116,
      "locktime_ok": true,
      "sequence": 4278190079,
      "sequence_hex": "0xfeffffff",
      "sequence_ok": true,
      "compliant": true
    },
    "witness_commitment": true
  },
  "messages": []
}

GET /tx/{txid}

一笔已确认或仍在内存池中的交易:含带前序输出的输入、带花费状态的输出、手续费、费率以及确认状态。

参数位置作用
txidpath64 字符的交易 ID。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/tx/fc21f67d10bd9418aa3249e8491d1565971cb14d86d77c09496f152784034f97'
响应示例(实时数据,已精简)
{
  "txid": "fc21f67d10bd9418aa3249e8491d1565971cb14d86d77c09496f152784034f97",
  "wtxid": "38399ae66b5b65f5c72f6536f53d0ec7e9bb73024cb965501dc9b45ff725dd49",
  "version": 1,
  "locktime": 5116,
  "size": 195,
  "vsize": 168,
  "weight": 672,
  "fee": 0,
  "fee_rate": 0.0,
  "coinbase": true,
  "total_in": 0,
  "total_out": 5000000369,
  "status": {
    "confirmed": true,
    "height": 5117,
    "block_hash": "00000000000000b7c44302f1acbe13ab9a8e2ef06f9e25e42b0c3e8277cbd2e3",
    "time": 1794932344,
    "index": 0,
    "confirmations": 9
  },
  "vin": [
    {
      "coinbase": true,
      "script_hex": "02fd130004787efc6a04c85ad2180885f0f76a9b1400000a636b706f6f6c",
      "script_ascii": "ckpool",
      "sequence": 4278190079
    }
  ],
  "vout": [
    {
      "n": 0,
      "address": "tb1q6pt2vtrfx4d7g7rkqzm3ca9xvcedfp99ax955r",
      "value": 5000000369,
      "script_type": "witness_v0_keyhash",
      "script_asm": "0 d056a62c69355be4787600b71c74a66632d484a5",
      "script_hex": "0014d056a62c69355be4787600b71c74a66632d484a5",
      "op_return": null,
      "spent": false,
      "spent_txid": null,
      "spent_vin": null,
      "spent_height": null
    }
  ],
  "rbf": false,
  "bip54": {
    "locktime": 5116,
    "expected_locktime": 5116,
    "locktime_ok": true,
    "sequence": 4278190079,
    "sequence_hex": "0xfeffffff",
    "sequence_ok": true,
    "compliant": true
  },
  "bip34_height": 5117
}

GET /address/{address}

某个 Testnet5 地址的余额与历史:已确认余额、累计收入与支出、未确认变动,以及交易记录(最新的在前,每页 25 笔)。

参数位置作用
addresspathTestnet5 地址(tb1q...、tb1p... 或旧式地址)。
pagequery历史页码,从 0 开始。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/address/tb1qs6qdr9p7actxvr74ygjgrkrsymg373ynca32v9'
响应示例(实时数据,已精简)
{
  "address": "tb1qs6qdr9p7actxvr74ygjgrkrsymg373ynca32v9",
  "script_type": "witness_v0",
  "script_pubkey": "00148680d1943eee16660fd5222481d87026d11f4493",
  "balance": 0,
  "received": 5000000000,
  "sent": 5000000000,
  "tx_count": 2,
  "utxo_count": 0,
  "output_count": 1,
  "coinbase_count": 0,
  "first_seen_height": 5036,
  "unconfirmed_balance": 0,
  "unconfirmed": [],
  "page": 0,
  "page_size": 25,
  "tip": 5125,
  "txs": [
    {
      "txid": "7194ca0680af250459dc6e43be86234b0563356fda8fd29912117a0462514e37",
      "height": 5039,
      "time": 1794927194,
      "delta": -5000000000,
      "coinbase": false,
      "confirmations": 87
    }
  ]
}

GET /address/{address}/utxo

某个地址的未花费已确认输出,最新的在前,最多 200 条。

参数位置作用
addresspath一个 Testnet5 地址。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/address/tb1q6pt2vtrfx4d7g7rkqzm3ca9xvcedfp99ax955r/utxo'
响应示例(实时数据,已精简)
{
  "address": "tb1q6pt2vtrfx4d7g7rkqzm3ca9xvcedfp99ax955r",
  "utxos": [
    {
      "txid": "8187c413c5634fde15cb714420a055afb8e14650cc6a97bd2fb13ca3024329c2",
      "n": 0,
      "value": 5000000000,
      "height": 5123
    },
    {
      "txid": "e68ffefb9aa84e816a2158b0f78b2cf940180e47a6484e9e5a5c9c0ecb74959d",
      "n": 0,
      "value": 5000000000,
      "height": 5122
    }
  ]
}

GET /mempool

内存池摘要,外加最多 50 笔最新的未确认交易。

无参数。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/mempool'
响应示例(实时数据,已精简)
{
  "info": {
    "count": 0,
    "vbytes": 0,
    "total_fee": 0,
    "min_fee_rate": 0.09999999999999999
  },
  "txs": []
}

GET /richlist

已确认未花费余额最大的 50 个地址。大约每分钟更新一次。

无参数。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/richlist'
响应示例(实时数据,已精简)
{
  "addresses": [
    {
      "address": "tb1qrg00se0gauwh5cra3gmvsxcufvldwzj8hnztm5",
      "balance": 6413762317833,
      "utxos": 1791
    },
    {
      "address": "tb1pcmxl8ac44rpu8rknffkuszczl5lfnt55ju74jqeygjyz0jw094asxv49ez",
      "balance": 4619286658360,
      "utxos": 1041
    }
  ]
}

GET /faucet

Testnet5 水龙头的只读状态:余额、每次领取金额、限额、冷却时间和最近支付。领取只能在水龙头页面进行。

无参数。

请求示例

curl -s 'https://api.testnet5.com/explorer/v1/faucet'
响应示例(实时数据,已精简)
{
  "address": "tb1qs6qdr9p7actxvr74ygjgrkrsymg373ynca32v9",
  "balance": 4998999718,
  "pending": 0,
  "amount": 1000000,
  "available": true,
  "empty": false,
  "daily_cap": 200000000,
  "paid_24h": 1000000,
  "claims_24h": 1,
  "address_hours": 24,
  "ip_hours": 24,
  "address_max_claims": 6,
  "ip_max_claims": 6,
  "cooldown_seconds": 600,
  "fee_rate": 2,
  "total_claims": 1,
  "total_paid": 1000000,
  "recent": [
    {
      "time": 1794927119,
      "address": "tb1qgn0m…8xvwv0",
      "amount": 1000000,
      "txid": "7194ca0680af250459dc6e43be86234b0563356fda8fd29912117a0462514e37"
    }
  ]
}

矿池接口

这些接口对应 Testnet5.com 矿池。路径相对于 https://api.testnet5.com/api/pools/testnet5。想挖矿?参见 开始挖矿。

GET /api/pools/testnet5

矿池摘要:手续费、结算方式、最低支付额、stratum 端口难度、矿池与全网算力、区块数、累计已付,以及当前领先矿工。该接口就是基础 URL 本身,调用时不要再追加路径。

无参数。

请求示例

curl -s 'https://api.testnet5.com/api/pools/testnet5'
响应示例(实时数据,已精简)
{
  "pool": {
    "id": "testnet5",
    "coin": {
      "symbol": "BTC",
      "name": "Bitcoin"
    },
    "ports": {
      "3333": {
        "name": "Standard (vardiff)",
        "difficulty": 4096
      },
      "3334": {
        "name": "High diff (rentals)",
        "difficulty": 262144
      }
    },
    "paymentProcessing": {
      "minimumPayment": 0.0001,
      "payoutScheme": "PROP"
    },
    "poolFeePercent": 10,
    "address": "tb1qt6vrvd992zcprxdc2qc89283aay4440gcajapa",
    "poolStats": {
      "connectedMiners": 2,
      "poolHashrate": 86327566480033.16
    },
    "networkStats": {
      "blockHeight": 5236,
      "networkDifficulty": 16777216,
      "networkHashrate": 1589237865826132,
      "lastNetworkBlockTime": "2026-11-17T17:48:04.4314108Z"
    },
    "topMiners": [
      {
        "miner": "tb1q7e3cusesz3t9z7k8flvknwe2qdh9duam2nskve",
        "hashrate": 334802191325056.7,
        "sharesPerSecond": 0.068
      }
    ],
    "totalPaid": 5579.9998,
    "totalBlocks": 127,
    "totalConfirmedBlocks": 124,
    "totalPendingBlocks": 3,
    "blockReward": 50,
    "lastPoolBlockTime": "2026-11-17T17:27:03.440484Z",
    "poolEffort": 1.662005753111382
  }
}

GET /blocks

Testnet5.com 矿池找到的区块,最新的在前,含状态(待确认、已确认或孤块)、确认进度,以及发现该区块的地址。

参数位置作用
pagequery页码,从 0 开始。
pageSizequery每页条目数。

请求示例

curl -s 'https://api.testnet5.com/api/pools/testnet5/blocks?pageSize=1'
响应示例(实时数据,已精简)
[
  {
    "poolId": "testnet5",
    "blockHeight": 5125,
    "networkDifficulty": 16777216,
    "status": "pending",
    "confirmationProgress": 0,
    "transactionConfirmationData": "93fe6549929db3b7292629222be6995def6647141e693020e95dd1367ffa86e9",
    "reward": 0.0,
    "infoLink": "https://www.blockchain.com/btc/block/00000000000000956b5ba02850c549024c87093f4b4aae9539660ea9668c7abf",
    "hash": "00000000000000956b5ba02850c549024c87093f4b4aae9539660ea9668c7abf",
    "miner": "tb1q8rxrlkfzmy8qec6d8p40mzt6sapken7yws5fjn",
    "source": "testnet5",
    "created": "2026-11-17T16:23:03.177597Z",
    "directRecipientOutputs": []
  }
]

GET /payments

矿池发出的支付,最新的在前。

参数位置作用
pagequery页码,从 0 开始。
pageSizequery每页条目数。

请求示例

curl -s 'https://api.testnet5.com/api/pools/testnet5/payments?pageSize=1'
响应示例(实时数据,已精简)
[
  {
    "coin": "BTC",
    "address": "tb1q8rxrlkfzmy8qec6d8p40mzt6sapken7yws5fjn",
    "addressInfoLink": "https://www.blockchain.com/btc/address/tb1q8rxrlkfzmy8qec6d8p40mzt6sapken7yws5fjn",
    "amount": 52.3921,
    "transactionConfirmationData": "c86ea5d056cc2c47fef865bb078229f19093f4d2be6c939a0329331b2e0420ac",
    "transactionInfoLink": "https://www.blockchain.com/btc/tx/c86ea5d056cc2c47fef865bb078229f19093f4d2be6c939a0329331b2e0420ac",
    "created": "2026-11-17T16:17:53.04924Z"
  }
]

GET /miners

当前在矿池上活跃的矿工及其当前算力。

参数位置作用
pagequery页码,从 0 开始。
pageSizequery每页条目数。

请求示例

curl -s 'https://api.testnet5.com/api/pools/testnet5/miners?pageSize=2'
响应示例(实时数据,已精简)
[
  {
    "miner": "tb1q7e3cusesz3t9z7k8flvknwe2qdh9duam2nskve",
    "hashrate": 334802191325056.7,
    "sharesPerSecond": 0.068
  },
  {
    "miner": "tb1qakc7jq9qxu2tyep3sd5m5ya75gym5269pn7cq6",
    "hashrate": 268424128573518.66,
    "sharesPerSecond": 0.177
  }
]

GET /miners/{address}

单个矿工的统计:待结算余额、累计已付、最近一次支付,以及每个矿工的每小时算力样本。

参数位置作用
addresspath该矿工挖向的 tb1 地址。

请求示例

curl -s 'https://api.testnet5.com/api/pools/testnet5/miners/tb1q7e3cusesz3t9z7k8flvknwe2qdh9duam2nskve'
响应示例(实时数据,已精简)
{
  "pendingShares": 0,
  "pendingBalance": 1.9567696e-05,
  "totalPaid": 2653.5928,
  "todayPaid": 2653.5928,
  "bestSessionShare": 0,
  "bestShare": 0,
  "minerEffort": 0,
  "lastPayment": "2026-11-17T14:17:52.950996Z",
  "lastPaymentLink": "https://www.blockchain.com/btc/tx/3d3709f764efb3dbeb22e177e6b5542c809b6e4721fc9bedb8476d5b9656d76b",
  "performanceSamples": [
    {
      "created": "2026-11-17T04:00:00Z",
      "workers": {
        "": {
          "hashrate": 181456217470982.28,
          "sharesPerSecond": 0.0795294117647059,
          "bestSessionShare": 0,
          "bestShare": 0
        }
      }
    }
  ],
  "totalConfirmedBlocks": 55,
  "totalPendingBlocks": 0
}

GET /performance

大约最近一天的每小时矿池算力、已连接矿工数和全网难度。

无参数。

请求示例

curl -s 'https://api.testnet5.com/api/pools/testnet5/performance'
响应示例(实时数据,已精简)
{
  "stats": [
    {
      "poolHashrate": 97378756469736.14,
      "connectedMiners": 2,
      "validSharesPerSecond": 0,
      "networkHashrate": 960180178855915.6,
      "networkDifficulty": 16777216,
      "created": "2026-11-17T16:00:00Z"
    }
  ]
}

快速示例

在命令行打印当前的 Testnet5 高度和难度:

curl -s https://api.testnet5.com/explorer/v1/stats | jq '{height, difficulty}'

或者从网页调用:

const r = await fetch('https://api.testnet5.com/explorer/v1/stats');
const s = await r.json();
console.log(s.height, s.difficulty);

对 API 有疑问,或发现故障?请查看 常见问题。