Api

比特幣現金測試網版本的洞察 API

  • April 10, 2019

我想知道是否有人知道比特幣現金的 Insight API 的測試網版本?

對於主網,有這些:

  • <https://bch-insight.bitpay.com/api/>
  • <https://bch-bitcore2.trezor.io/api/>

但我找不到一個用於測試網的。

非常感謝。

通過試錯程序,我找到了這個:-)

API 的前綴是<https://test-bch-insight.bitpay.com/api>

例如: https ://test-bch-insight.bitpay.com/api/addrs/2MzrMhMEPN9KYsZHgijMqekPa8kmvwsuEVm,2N1w811DgtWzjHdwtP1zzbXqJdh9vNK3sk9,2N3rs2KJBYxZQifg5TY6Bjb8CGcvmYTppsG/utxo

Bitpay 對 Insight/Bitcore 進行了大規模重構,因此 BTC 和 BCH 都執行在同一個後端。新的網址是:

範例:獲取我從最近一個區塊中抓取的某個隨機地址的 UTXO:

$ curl -s https://api.bitcore.io/api/BCH/mainnet/address/qz09ljd3fthvuuasw3tchnhm8a5z5ppm9vc4t6s5pe/?unspent=true | jq

[
 {
   "_id": "5cae0b7912025b0a3983bf75",
   "chain": "BCH",
   "network": "mainnet",
   "coinbase": false,
   "mintIndex": 2,
   "spentTxid": "",
   "mintTxid": "81d1e58956eb5ba269ad3ac6394382825bd9d9b4d3a22eca03133eef19446b72",
   "mintHeight": 577661,
   "spentHeight": -2,
   "address": "qz09ljd3fthvuuasw3tchnhm8a5z5ppm9vc4t6s5pe",
   "script": "76a9149e5fc9b14aeece73b074578bcefb3f682a043b2b88ac",
   "value": 7000000,
   "confirmations": -1
 },
 {
   "_id": "5cae0f6212025b0a3988a698",
   "chain": "BCH",
   "network": "mainnet",
   "coinbase": false,
   "mintIndex": 0,
   "spentTxid": "",
   "mintTxid": "b8b72fa7defb89824f9c31d6294e3764c4675ac085668604113f4b6394d8cdde",
   "mintHeight": 577664,
   "spentHeight": -2,
   "address": "qz09ljd3fthvuuasw3tchnhm8a5z5ppm9vc4t6s5pe",
   "script": "76a9149e5fc9b14aeece73b074578bcefb3f682a043b2b88ac",
   "value": 1111,
   "confirmations": -1
 }
]

引用自:https://bitcoin.stackexchange.com/questions/59844