Bitcoin Forum
October 15, 2019, 07:49:08 AM *
News: Latest Bitcoin Core release: 0.18.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Robust Testnet3 API  (Read 76 times)
Anzelm
Newbie
*
Offline Offline

Activity: 10
Merit: 7


View Profile
September 24, 2019, 12:36:13 PM
Merited by LoyceV (2), ETFbitcoin (1)
 #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.
1571125748
Hero Member
*
Offline Offline

Posts: 1571125748

View Profile Personal Message (Offline)

Ignore
1571125748
Reply with quote  #2

1571125748
Report to moderator
1571125748
Hero Member
*
Offline Offline

Posts: 1571125748

View Profile Personal Message (Offline)

Ignore
1571125748
Reply with quote  #2

1571125748
Report to moderator
1571125748
Hero Member
*
Offline Offline

Posts: 1571125748

View Profile Personal Message (Offline)

Ignore
1571125748
Reply with quote  #2

1571125748
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1571125748
Hero Member
*
Offline Offline

Posts: 1571125748

View Profile Personal Message (Offline)

Ignore
1571125748
Reply with quote  #2

1571125748
Report to moderator
1571125748
Hero Member
*
Offline Offline

Posts: 1571125748

View Profile Personal Message (Offline)

Ignore
1571125748
Reply with quote  #2

1571125748
Report to moderator
1571125748
Hero Member
*
Offline Offline

Posts: 1571125748

View Profile Personal Message (Offline)

Ignore
1571125748
Reply with quote  #2

1571125748
Report to moderator
mocacinno
Legendary
*
Offline Offline

Activity: 1736
Merit: 1781


https://unblur.ninja =>lightning network testsite


View Profile WWW
September 24, 2019, 12:39:40 PM
Last edit: September 24, 2019, 12:50:15 PM by mocacinno
 #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)

lightningmelo
Copper Member
Member
**
Offline Offline

Activity: 70
Merit: 20


View Profile WWW
September 24, 2019, 01:56:22 PM
 #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.


pooya87
Legendary
*
Offline Offline

Activity: 1792
Merit: 1968


Remember tonight for it's the beginning of forever


View Profile
September 24, 2019, 02:49:27 PM
 #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

ETFbitcoin
Legendary
*
Offline Offline

Activity: 1792
Merit: 2051

Use SegWit and enjoy lower fees.


View Profile WWW
September 24, 2019, 06:01:30 PM
 #5

If you insist using API rather than run your own testnet full node, you could try https://blockchair.com

While their home page don't mention Bitcoin testnet, but they definitely support Bitcoin Testnet API according to :
https://github.com/Blockchair/Blockchair.Support/blob/master/API_DOCUMENTATION_EN.md
https://github.com/Blockchair/Blockchair.Support/issues/144#issuecomment-511502588

Anzelm
Newbie
*
Offline Offline

Activity: 10
Merit: 7


View Profile
September 26, 2019, 10:05:56 AM
Merited by suchmoon (4)
 #6

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.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!