Pages:
Author

Topic: www.btcbalance.net - View your balance easily online. - page 5. (Read 18006 times)

hero member
Activity: 530
Merit: 500
UPDATE v1.1 -> v1.2

Added
  • Total balance viewer converted into USD (based on Tradehill)

Fixed
  • Some IE bugs

I hope you guys like it.
hero member
Activity: 530
Merit: 500
Got my first donation.
Thank you very much to the person who donated!
sr. member
Activity: 434
Merit: 250
100%
cool site!

unfortunately with bitcoin sending amounts back to invisible addresses in your wallet it won't show the accurate sum of btc in my wallet. just tested it and of approx. 1btc total it showed only a total of 0.1btc even with all addresses entered (the ones known to me and listed in my client).

had to do some research on block explorer to find out about hidden addresses. it summed up nicely when I had entered those.

I wish the Bitcoin client would make all of your addresses visible to you, even the ones you havent (knowingly) used yet. there's work to do.

other than that your site seems to work nicely :)


hero member
Activity: 530
Merit: 500
And we are at 55 accounts now. Cool

Working on a total balance exchange converter.
Stay tuned.
hero member
Activity: 530
Merit: 500
Will's reply

Thanks for your reply.
I will take your advise into record.
Gonna research this a bit if this is an option to replace the current system.

Currently..... we are already at 45 accounts, whooo!
hero member
Activity: 767
Merit: 500
Interesting tool.

You should consider using the http://blockexplorer.com/q/mytransactions api instead of querying each address individually - this will reduce the load on blockexplorer.  With the limited number of addresses you support you should be able to query the balance in one HTTP request - I am doing 50 addresses at a time using this API with my Android wallet balance app (see my signature) - which is doing I believe the same thing as yours but running on an android phone rather than someone else's server.

Also - how are you expecting people to export their hidden change/pool addresses?  I had to write a tool for my users to do this until the mainline client gets the import/export key patch hopefully coming in 0.4

Will
Thanks for your reply.

I am actually using this command to get the last received ammount.
But to actually get the send and received amounts of an address using this command you need to add two addresses to check what transactions happend between those two given, right?
So currently I am using the: getsendbyaddress and the: getrecceivedbyaddress command and I simply subtract them of each other to get the current balance of an address.
At the first I was trying to dig into the technique wich blockexplorer uses, since I don't like to be dependent of there speed and uptime.
They use a patch on there Bitcoin client to parse info about addreses out of the network.
To bad it didn't work out for me to get this patch working correctly.
I also asked theymos if it was okay to use there API for stuff like this.
Luckly he kindly agreed. Cool

Not sure what your trying to say with your last sentence.

okay cool - you can parse all the info required using just the mytransactions API - you need to cache the transactions you get back from the GET request then do two passes (in memory, only one GET required)- the first pass you go through all the out blocks and look for payments to any of your addresses while storing the transactions, for each in block you see you remember the prev_out since you need to know how much was paid from the previous out transaction (otherwise you end up with inconsistent values due to transaction fees). The second pass you just loop through all your prev_outs you've previously cached, and find the out transactions that you cached on your first pass through of the in parts - and subtract these from the balance...  You can check how I did it for my app here if you find reading code easier than my rather wordy explanation Smiley

Because the mytransactions API allows you to ask for transactions related to multiple bitcoin addresses (separate with a dot) it's the most efficient way I found of doing it, especially for large keyrings (e.g. 1000+ public keys).

My last comment was referring to the fact that 'change' transactions (e.g. I have 2 BTC, I send you 1 BTC, so it's 1 BTC to your address, and 1 BTC to a new hidden address that bitcoin client generates) go to addresses so I was wondering how you export these from the bitcoin client.

Will
hero member
Activity: 530
Merit: 500
Interesting tool.

You should consider using the http://blockexplorer.com/q/mytransactions api instead of querying each address individually - this will reduce the load on blockexplorer.  With the limited number of addresses you support you should be able to query the balance in one HTTP request - I am doing 50 addresses at a time using this API with my Android wallet balance app (see my signature) - which is doing I believe the same thing as yours but running on an android phone rather than someone else's server.

Also - how are you expecting people to export their hidden change/pool addresses?  I had to write a tool for my users to do this until the mainline client gets the import/export key patch hopefully coming in 0.4

Will
Thanks for your reply.

I am actually using this command to get the last received ammount.
But to actually get the send and received amounts of an address using this command you need to add two addresses to check what transactions happend between those two given, right?
So currently I am using the: getsendbyaddress and the: getrecceivedbyaddress command and I simply subtract them of each other to get the current balance of an address.
At the first I was trying to dig into the technique wich blockexplorer uses, since I don't like to be dependent of there speed and uptime.
They use a patch on there Bitcoin client to parse info about addreses out of the network.
To bad it didn't work out for me to get this patch working correctly.
I also asked theymos if it was okay to use there API for stuff like this.
Luckly he kindly agreed. Cool

Not sure what your trying to say with your last sentence.
hero member
Activity: 767
Merit: 500
Interesting tool.

You should consider using the http://blockexplorer.com/q/mytransactions api instead of querying each address individually - this will reduce the load on blockexplorer.  With the limited number of addresses you support you should be able to query the balance in one HTTP request - I am doing 50 addresses at a time using this API with my Android wallet balance app (see my signature) - which is doing I believe the same thing as yours but running on an android phone rather than someone else's server.

Also - how are you expecting people to export their hidden change/pool addresses?  I had to write a tool for my users to do this until the mainline client gets the import/export key patch hopefully coming in 0.4

Will
hero member
Activity: 530
Merit: 500
UPDATE v1.0 -> v1.1

Added
  • Total balance viewer
  • Address labeling

Fixed
  • Some minor grammar mistakes

I hope you guys like it.
hero member
Activity: 530
Merit: 500
It would be nice to be able to add optional labels for accounts.
This one is already planned in.
Working on it.
jr. member
Activity: 38
Merit: 1
It would be nice to be able to add optional labels for accounts.
full member
Activity: 134
Merit: 102
One feature I'd like to see is the ability to be notified by email if your balance changes.
hero member
Activity: 868
Merit: 1008
Here's a nodejs script I use to check my balance.  Could be useful for those that are concerned about the having wallet info online.  Install nodejs (nodejs.org) and run:
Code:
$ node walletmon.js

The script (just substitute your wallet's address...these are just a few random ones):
Code:
var http = require('http');
var currency = 'USD';
var addresses = [
    '17xxoEVft19Rg2V4vqop92Az7Hp7vbtttV',
    '13kEG7RopYCSqgG1T1YsULpTQx5sW1PLTy',
    '1MWYjCaMunK2rERswXxiNTV641y23k38BS',
    '1GaLzoNQbuJB4hDgY4YBgvjxzPqHkCebgj',
];

function getReceived(address, callback) {
    getData(address, 'received', callback);
}

function getSent(address, callback) {
    getData(address, 'sent', callback);
}

function getData(address, method, callback) {
    var options = {
      host: 'blockexplorer.com',
      port: 80,
      path: '/q/get'+method+'byaddress/'+address,
    };
    http.get(options, function(res) {
        var answer = '';
        res.on('data', function (chunk) {
            answer += chunk;
        });
        res.on('end', function (chunk) {
            if(chunk) answer += chunk;
            callback(answer);
        });
    });
}

function getWeightedPrices(callback) {
    var options = {
      host: 'bitcoincharts.com',
      port: 80,
      path: '/t/weighted_prices.json',
    };

    http.get(options, function(res) {
    var answer = '';
            res.on('data', function (chunk) {
            answer += chunk;
        });
        res.on('end', function (chunk) {
            if(chunk) answer += chunk;
            callback(JSON.parse(answer));
        });
    });
}

function fetch(index, callback) {
    getReceived(addresses[index], function(received) {
        var bal = Math.round(received * 1e8);
        getSent(addresses[index], function(sent) {
            bal -= Math.round(sent * 1e8);
            console.log(addresses[index]+' received: '+received+', sent: '+sent+', bal: '+(bal/1e8));
            callback(bal);
        });
    });
}

function main() {
    var total=0;
    var count=addresses.length;
    for(i=0; i        (function(index) {
            fetch(index, function(bal) {
                total += bal;
                count--;
                if(count == 0) {
                    getWeightedPrices(function(prices) {
                        var p24h = Math.round(total * prices[currency]['24h'] / 1e6) / 1e2;
                        var p7d = Math.round(total * prices[currency]['7d'] / 1e6) / 1e2;
                        var p30d = Math.round(total * prices[currency]['30d'] / 1e6) /1e2;
                        console.log('');
                        console.log('Total: '+ (total / 1e8) + ' BTC ('+addresses.length+' addresses)');
                        console.log('USD: '+p24h+'(24h), '+p7d+'(7d) '+p30d+'(30d)');
                    })
                }
            });
        })(i);
    }
}

main();
legendary
Activity: 1400
Merit: 1005
Clicking Sign In does nothing, running Chrome here.
Make sure your having Javascript turned on in your browser.
Cause in the Chrome browser at my end its working flawlessly.

Javascript is turned on, no errors in the console Sad

EDIT: In privacy mode is does work so I'm guessing one of my Chrome add-ons is messing up your site and it looks like LastPass is causing it.
The sign-in pops up for me just fine, using Chrome.

What extensions do you have?  Ad-Block or anything?  It's got to be an extension that is blocking the javascript.
XIU
member
Activity: 84
Merit: 10
Clicking Sign In does nothing, running Chrome here.
Make sure your having Javascript turned on in your browser.
Cause in the Chrome browser at my end its working flawlessly.

Javascript is turned on, no errors in the console Sad

EDIT: In privacy mode is does work so I'm guessing one of my Chrome add-ons is messing up your site and it looks like LastPass is causing it.
hero member
Activity: 530
Merit: 500
Huuge LOL at people worrying about their IP address. Man people are sure stupid. Stop posting and spreading your ignorance please.
I understand that people are worrying since all the hacking happening these days.
But yeah, there is not much to worry about since hackers cannot use hashed ip's wich aren't connected to anything.
I mean this forum also registers your IP FYI.
newbie
Activity: 14
Merit: 0
Huuge LOL at people worrying about their IP address. Man people are sure stupid. Stop posting and spreading your ignorance please.
hero member
Activity: 530
Merit: 500
Clicking Sign In does nothing, running Chrome here.
Make sure your having Javascript turned on in your browser.
Cause in the Chrome browser at my end its working flawlessly.
XIU
member
Activity: 84
Merit: 10
Clicking Sign In does nothing, running Chrome here.
hero member
Activity: 530
Merit: 500
"recceive" is spelled receive
Yes thank you.
I am aware the whole website is not grammar correct yet.
Maybe this sentence above isn't correct either.
Excuse me for being Dutch.  Cool
Pages:
Jump to: