Author

Topic: Robust Testnet3 API (Read 170 times)

newbie
Activity: 10
Merit: 7
September 26, 2019, 05:05:56 AM
#5
Smartbit is back after a few days of downtime (weird but ok). BlockCypher appears to behave well. An online instance of Blockstream Esplora is also nice.
Blockchair looks promising, but haven't tested it yet. For now I'll stick to the listed ones and switch between them in case of problems. If that approach fails, I'll go for deploying full node and communicating through json-rpc (or for node + own instance of esplora, idk yet)
Thanks for all advices.
legendary
Activity: 3472
Merit: 10611
September 24, 2019, 09:49:27 AM
#4
(pushing txs, browsing utxos, etc).

how about using Electrum wallet?
it is a lightweight (SPV) client, it is up to date (meaning it supports SegWit) and works with TestNet. you can run it on any OS by adding the "--testnet" command at the end. on Windows open the properties window of the shortcut on your desktop, go to the Shortcut tab and add that command at the end of Target:
Code:
"C:\Program Files (x86)\Electrum\electrum-3.3.6.exe" --testnet

now you can create wallets, import keys, sign transactions, get your UTXO history, broadcast them,...

you can also always only contact the Electrum servers and use their communication protocol to fetch the necessary data you want (basically what Electrum does under the hood). although that would be harder and more time consuming. here is the protocol documentation: https://electrumx.readthedocs.io/en/latest/protocol.html
copper member
Activity: 70
Merit: 22
September 24, 2019, 08:56:22 AM
#3
I guess installing Blockstream's Esplora in your own node would be a possibility, although bear in mind that Esplora is resource intensive, especially when it comes to RAM.

legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
September 24, 2019, 07:39:40 AM
#2
You were on the right track tough... I guess your best bet would be to run your own testnet node... I don't think there are actual tutorials on how to use the json-rpc api on a testnet node, but there's documentation for mainnet, and there is no difference between the calls on the main net and the testnet, so you can use this documentation with minimal adaptation.

Running a node on the testnet is as simple adding testnet=1 to your bitcoin.conf

Then, just look at this page for code examples: https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)
The default port for testnet is 18332 instead of 8332 (but this default behaviour can also be changed in your bitcoin.conf)

EDIT:
Depending on your needs, you might need to run an alternative bitcoin node that allows you to keep address indexes... For example https://github.com/bitpay/bitcore/ (api documentation https://github.com/bitpay/bitcore/blob/master/packages/bitcore-node/docs/api-documentation.md and https://github.com/bitpay/bitcore/blob/master/packages/bitcore-node/docs/sockets-api.md)
newbie
Activity: 10
Merit: 7
September 24, 2019, 07:36:13 AM
#1
Hi!

I'm looking for a robust API allowing access to testnet3 (pushing txs, browsing utxos, etc).
I was using blockcypher, but it hasn't performed well. Chain.so API was good, but now it disappeared. Smartbit API was also pretty decent and recently it also disappeared.

Do you have anything else to recommend?
Or maybe a tutorial how to kick off own testnet node and hit it with jsonrpc calls? (Note that in my case regtest is not an option, I need a connection to testnet)
Or maybe I can find somewhere list of well-known testnet node urls with exposed json-rpc endpoint?

I don't generate heavy traffic, but still finding something that will last more than few months is difficult.
Please advice. I'm totally lost.

Cheers.
Jump to: