Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: lueo on October 16, 2011, 03:00:43 PM



Title: [Help] A bitcoin balance checker by day
Post by: lueo on October 16, 2011, 03:00:43 PM
Dear all,

I'd like to write a tool in python that can collect the balance of an BTC addr by day. So that I can display the progress in a line graph.

I would like to ask help for:

1. How do I collect day-by-day balance from blockexplore? For example, I need a function that can return the following information to me:

(Original information from http://blockexplorer.com/address/1HEmzeuVEKxBQkEenysV1yM8oAddQ4o2TX)

Date, Time, balance
2010-10-9, 09:10, 34.9
2010-10-10, 09:15, 36.9

2. How do I convert them into a rrd file?

I've searched on the net and I found a tool called pyrrd, have you tried to use it to convert data into a rrd file?


Title: Re: [Help] A bitcoin balance checker by day
Post by: dogisland on October 17, 2011, 10:41:50 AM
I think you'd be better off using http://blockexplorer.com/q/getreceivedbyaddress/1HEmzeuVEKxBQkEenysV1yM8oAddQ4o2TX

So wget http://blockexplorer.com/q/getreceivedbyaddress/1HEmzeuVEKxBQkEenysV1yM8oAddQ4o2TX each day (cron job ?) and append to a file.



Title: Re: [Help] A bitcoin balance checker by day
Post by: lueo on October 18, 2011, 12:14:44 PM
Dear dogisland,

Thanks for your advice, but what I need to do is to make a chart from the transaction history in the same time, not to record the balance day by day.

I think you'd be better off using http://blockexplorer.com/q/getreceivedbyaddress/1HEmzeuVEKxBQkEenysV1yM8oAddQ4o2TX

So wget http://blockexplorer.com/q/getreceivedbyaddress/1HEmzeuVEKxBQkEenysV1yM8oAddQ4o2TX each day (cron job ?) and append to a file.




Title: Re: [Help] A bitcoin balance checker by day
Post by: ThomasV on October 18, 2011, 01:02:24 PM
Dear dogisland,

Thanks for your advice, but what I need to do is to make a chart from the transaction history in the same time, not to record the balance day by day.


here is a function that you can use:
http://ecdsa.org/q/getaddresshistory/1EUqkFmL9HNpBRvbWRAqCiUjepaR7Vbryp

I can add a callback function if you need to do it in javascript