I was wondering if anyone know a testnet version of Insight API for Bitcoin Cash?
For mainnet there are those:
But I cannot find one for testnet.
Thank you very much.
I was wondering if anyone know a testnet version of Insight API for Bitcoin Cash?
For mainnet there are those:
But I cannot find one for testnet.
Thank you very much.
With a trial & error procedure I've found this one :-)
Prefix for APIs is https://test-bch-insight.bitpay.com/api
Bitpay did a large refactor of Insight/Bitcore so both BTC and BCH run off the same backend. The new URLs are:
mainnet/testnet
and BTC/BCH
slugs as requiredExample: get UTXOs for some random address I grabbed out of a recent block:
$ 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
}
]