Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Balance Stats API #32

Open
tecnobrat opened this issue Jun 29, 2011 · 16 comments
Open

Balance Stats API #32

tecnobrat opened this issue Jun 29, 2011 · 16 comments
Assignees

Comments

@tecnobrat
Copy link

Many pools provide an API to view the balance of your account. Perhaps this can be integrated so you can view the balance of all of your pools from the pool overview page.

@ghost ghost assigned cdhowie Jun 29, 2011
@echiu64
Copy link

echiu64 commented Jul 6, 2011

This is present for a while now, use this URL: /admin/?format=Json

@cdhowie
Copy link
Owner

cdhowie commented Jul 6, 2011

@echiu64: That's a different feature entirely. @tecnobrat is requesting that the dashboard show the account balances of the various pools.

@echiu64
Copy link

echiu64 commented Jul 6, 2011

Ah, my mistake. In that case, not sure about account balance, but for pool balance, would be useful to shortlist a set a pools to start with, maybe deepbit, slush and btcguild?

@tecnobrat
Copy link
Author

Current order of % of total hashrate:

(Note: BTCGuild is down I believe)

  • Deepbit
  • Slush
  • BTCMine
  • BitcoinPool
  • Bitcoins.lc
  • MTRed

@cdhowie
Copy link
Owner

cdhowie commented Jul 7, 2011

I would like to implement this feature in such a way that I don't have to special-case each pool, but rather leave it open for extension by the user. This model will take a bit of work to design, so it probably won't be ready soon.

@echiu64
Copy link

echiu64 commented Jul 8, 2011

I've written some simple perl scrapers for collectd, there are 2 categories, JSON and scraped.
JSON is probably the easiest, simply put the URL (which would include any API key/username/password) and then the JSON object to capture. For data that doesn't contain the total explicitly, would need a way to express how to sum up an array.

I vote we start support (with a generic slant) for deepbit/slush/btcguild, they all have JSON APIs.

btcmind (no account) didn't see any reference to a JSON API.
bitcoins.lc has a JSON API, but doesn't return any user stats (worker or total hashrate)
bitcoinpool no user JSON data

@edgeman16
Copy link

I would like to request Eligius support as well, though I do not know the status of any API or similar.

@echiu64
Copy link

echiu64 commented Jul 13, 2011

I have a basic JSON only balance view, will push it to github in the next 24 hours. A better version would be to pull it into mysql and graph it.

@echiu64
Copy link

echiu64 commented Jul 13, 2011

I added support for pools supporting JSON, i put examples for deepbit, btcguild and slush. If anyone has other URLs, send me the JSON data and I'll try to help you configure it. See my tree (https://github.com/echiu64/Bitcoin-mining-proxy)

@tecnobrat
Copy link
Author

Here is config for mtred:

    'mtred' => array(
            'url' => 'https://mtred.com/api/user/key/123',
            'confirmed' => 'balance',
            'unconfirmed' => ''),

@tecnobrat
Copy link
Author

btcmine:

    'btcmine' => array(
            'url' => 'http://btcmine.com/api/getbalance/123/',
            'confirmed' => 'confirmed',
            'unconfirmed' => 'unconfirmed'),

@tecnobrat
Copy link
Author

bitcoinpool doesn't use API keys, they allow you to see the balances of any user. Put your USERNAME in the correct location.

    'bitcoinpool' => array(
            'url' => 'http://bitcoinpool.com/user.php?u=USERNAME&json=1',
            'confirmed' => 'User.unpaid',
            'unconfirmed' => 'User.unconfirmed'),

@edgeman16
Copy link

Eligius has data in a json:

http://eligius.st/~luke-jr/raw/5/balances.json

You'd have to know the bitcoin address you wanted to look for, no API keys required... I think?

@echiu64
Copy link

echiu64 commented Jul 13, 2011

Sent a pull request for initial balance chart implementation...

@echiu64
Copy link

echiu64 commented Jul 14, 2011

Committed the examples for BTCMine, the others are in there as well

@raetha
Copy link

raetha commented Jul 25, 2011

@edgeman16: I've added Eligius support in my fork based on the work @echiu64 completed for the other pools balance data. Unfortunately Eligius does require a separate script, but I've built it all in so that all you would need to do is update the config file and pull the getEligius.php script. Feel free to grab just the new script and the config entries, or to pull the entire fork.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants