Title: API for looking at transactions Post by: donking on April 22, 2012, 04:04:11 AM 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. Title: Re: API for looking at transactions Post by: arby on April 22, 2012, 05:02:30 AM 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. Title: Re: API for looking at transactions Post by: donking on April 22, 2012, 05:18:11 AM 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. Title: Re: API for looking at transactions Post by: arby on April 22, 2012, 05:22:45 AM 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? Title: Re: API for looking at transactions Post by: Stephen Gornick on April 22, 2012, 07:34:18 AM 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 Title: Re: API for looking at transactions Post by: donking on April 22, 2012, 08:38:20 AM 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? Title: Re: API for looking at transactions Post by: weex on April 22, 2012, 09:06:41 AM 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.
Title: Re: API for looking at transactions Post by: arby on April 22, 2012, 07:46:29 PM 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. Title: Re: API for looking at transactions Post by: Stephen Gornick on April 22, 2012, 09:23:48 PM 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 |