Bitcoin Forum
July 30, 2024, 04:24:52 AM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: API for looking at transactions  (Read 801 times)
donking (OP)
Jr. Member
*
Offline Offline

Activity: 38
Merit: 2



View Profile
April 22, 2012, 04:04:11 AM
 #1

Hi,

I am just wondering about if there is an API to get the balance for a specific bitcoin address.

I know there are some sites that allows this http://blockchain.info, http://blockexplorer.com/ and other
sites that lets you get notified if you get money transfered to you.

Those sites are great and a lot of work has gone into those, but are there some API in Java, PHP that lets you hook up the block chain in some way so you can do this on your own.

The regular bitcoin client only allows you to list addresses you own right?

I assume the way those sites work are by processing the block chain and look at each new block. Then insert
all the information into a database so that one can search per bitcoin address.

All that seems like a lot of work to do for some small project. So I am looking for something ready made.

My boss is really strict and wants things done very quickly and cheap. So there is no way of making something from
scratch that takes many months to do.

BTW:
I am posting this in this in newbies since this is the question I wanted to ask when joining this forum. And this is the
only place I am allowed to post at the moment.

Thank you for any inputs.
arby
Donator
Member
*
Offline Offline

Activity: 112
Merit: 10


keybase.io/arblarg


View Profile
April 22, 2012, 05:02:30 AM
 #2

Hello,

You could look into this:

http://www.nostate.com/3962/bitcoin-php-a-php-library-for-bitcoin/

And this:

https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)


I am trying to figure that task also, and I do not think bitcoind will allows this.

But yes, I think thats how they work (they made up a database from blocks)

But here's an idea:

https://blockchain.info/api

https://blockchain.info/q       ------> addressbalance

they even give an example there:
https://blockchain.info/q/addressbalance/1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj

It seems blockchain.info is offering an API themselves, normally it is a reliable source, so why do the work, if they already did it and you can just use it I guess.

Jabber/XMPP: arby@darkness.su
donking (OP)
Jr. Member
*
Offline Offline

Activity: 38
Merit: 2



View Profile
April 22, 2012, 05:18:11 AM
 #3

Yes, I am aware of those web services. And those are great. But I am not sure they want to be mined.

The PHP library and JSON-RPC you pointed to seems to only allow you to do the
regular things you can do with the bitcoin client. And I don't think you can do stuff such as
inspect all transactions and make a ledger of all bitcoin addresses.

arby
Donator
Member
*
Offline Offline

Activity: 112
Merit: 10


keybase.io/arblarg


View Profile
April 22, 2012, 05:22:45 AM
 #4

Hello,

If you do find something, please post it here if you can, it would help others also.

About the mining issue, why would they provide the API if they dont want it to be used? Just to show they can code?

Jabber/XMPP: arby@darkness.su
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
April 22, 2012, 07:34:18 AM
Last edit: April 22, 2012, 09:20:00 PM by Stephen Gornick
 #5

All that seems like a lot of work to do for some small project. So I am looking for something ready made.

Does this help?

It displays the amount recieved by the address
To display the balance, just add the parameter &type=balance
like this:
Code:
http://bitcoinbox.ru/display/graph.php?btcaddress=1NgLdhjHfLbcVawMk4DNEv8yf9ZzzNJV6U&type=balance

See this thread:
 - http://bitcointalk.org/index.php?topic=75807.0

Or this:
 - http://www.BTCBalance.net
 - http://bitcointalk.org/index.php?topic=27669.0

Or this:
 - http://bitcointalk.org/index.php?topic=74559.0


Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


donking (OP)
Jr. Member
*
Offline Offline

Activity: 38
Merit: 2



View Profile
April 22, 2012, 08:38:20 AM
 #6

Naa, I looked at your links, but they only talk about other websites or web services.

I am looking for a programming library that lets you do what block blockexplorer.com does.

I want to run it on my own computer and not make thousands of http requests to other websites.

I found Bitcointools. And reading the description seems like something useful and in the right direction.

Anything else similar to bitcointools out there?
weex
Legendary
*
Offline Offline

Activity: 1102
Merit: 1014



View Profile
April 22, 2012, 09:06:41 AM
 #7

https://github.com/jtobey/bitcoin-abe will dump the blockchain into mysql or another database. Not sure about keeping it updated but it claims the initial loading will take several hours.
arby
Donator
Member
*
Offline Offline

Activity: 112
Merit: 10


keybase.io/arblarg


View Profile
April 22, 2012, 07:46:29 PM
 #8

thank you, i will check that out

https://github.com/jtobey/bitcoin-abe will dump the blockchain into mysql or another database. Not sure about keeping it updated but it claims the initial loading will take several hours.

Jabber/XMPP: arby@darkness.su
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
April 22, 2012, 09:23:48 PM
 #9

I am looking for a programming library that lets you do what block blockexplorer.com does.

Libbitcoin?
 - http://bitcoinmedia.com/libbitcoin-overview
 - http://bitcoinmedia.com/libbitcoin-first-steps
 - http://bitcoinmedia.com/libbitcoin-first-500-blocks

 - https://gitorious.org/libbitcoin/libbitcoin

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!