Simple Address check via API

0

So I have a wallet with thousands of addresses, I want to know how can I check the blockchain whether or not a transaction has been made to one(or another) of the addresses?

Romano Streel

Posted 2018-06-09T10:24:07.277

Reputation: 11

Answers

0

You have two options :

  1. Request on one of block explorer platforms which will let you query on blockchain on their server. Check : https://blockexplorer.com/api-ref

Example request :

$ curl https://blockexplorer.com/api/addr/19SokJG7fgk8iTjemJ2obfMj14FM16nqzj
{"addrStr":"19SokJG7fgk8iTjemJ2obfMj14FM16nqzj","balance":0,"balanceSat":0,"totalReceived":112.91089695,"totalReceivedSat":11291089695,"totalSent":112.91089695,"totalSentSat":11291089695,"unconfirmedBalance":0,"unconfirmedBalanceSat":0,"unconfirmedTxApperances":0,"txApperances":364,"transactions":["a2afb522edeba67ae593c683154da45b231d59ffccd18806cec38ecd21994a2d","28ccc7fe617451a4d15b8cea64a6ac222600e2877073ba543d83225a354975ac","950239654cd47d2b53f98bdf250cfbf516e1a9eaf87944ee8afac603a9cb61fc","4daa82997cb86b6f75089ad19eddf518b77a4d88a72920efbab6439914a2183b","27b6dc933a9eee548d5b40574c16e9e29a907e9a85a51c2545a60a0833a0f441","cacc6ded99959ff8310b18e1052e05a4aa9fe8c4c7f9651318fbbe3fcd5a16ab",...}
  1. If you dont want to rely on any 3rd party services; install bitcoind (or similar bitcoin client), import your addresses in watch-only mode and query using provided RPC calls. http://chainquery.com/bitcoin-api/listtransactions

First option is simpler as you dont need to download GBytes of chain data. Second option is better as you dont rely on some platform.

Kerem atam

Posted 2018-06-09T10:24:07.277

Reputation: 93

1: are block explorers free to use?

  1. Can you point me to one that meets my needs?
  2. < – Romano Streel 2018-06-09T12:34:26.457

yes. mosty such services charge you when you want to make transaction. i've updated my answer.Kerem atam 2018-06-09T14:54:30.590

0

There are several API services that allow bulk address queries.

For example smartbit's API takes up to 1,000 addresses with their v1/blockchain/addresses endpoint which will return details about each address sorting by the highest balance first.

Example GET request:
https://api.smartbit.com.au/v1/blockchain/addresses/1DuMuchPBGNoi5b9JmpreZ2L5EpuMiJdyc,1N75aWck3TFPorTvSgdzLUttY8uddqTAFZ,161UqtBktXJMzcg2zxBGMiHgnVrtH78Amx,19eK34996XoXPgpranrUVSPLmkxzowt8ox

Link to API docs: https://www.smartbit.com.au/api

m1xolyd1an

Posted 2018-06-09T10:24:07.277

Reputation: 3 356