MyBitcoins gadget

MyBitcoins gadget screenshot
WARNING! MtGox, which was the default exchange in the gadget, is no longer operational. Please download the new version of the gadget which has Bitstamp as default exchange (but of course you can choose to use any exchange with JSON API).

Do you ask yourself these questions?

MyBitcoins is a Windows gadget (Vista sidebar or Windows 7) which displays two values: the amount of bitcoins you have, and an estimated value of those bitcoins in your preferred currency.

Download now It's free!
(though donations are appreciated)

MyBitcoins gadget config screenshot

Features

You can specify any mining pool or exchange which has JSON API (most of them do). The only thing you need to know is URL and JSON keys.

Configuring exchanges and pools

By default, the gadget is configured to use Bitstamp API to obtain exchange data. If we wanted to use a different exchange, for example BTC-e, first we need to find out JSON API URL. Thankfully, this page contains exactly what we need under API question, that is, ticker URL: https://btc-e.com/api/2/btc_usd/ticker. The data returned looks like this:

{"ticker": {"high":650.63898, "low":616.00098, "avg":633.31998, "vol":5768483.85315, "vol_cur":9068.04345, "last":637, "buy":638, "sell":637.068, "updated":1392506464, "server_time":1392506465}}

The current rate we need is in the "buy" JSON value. So, to configure MyBitcoins to use BTC-e, we have to enter ticker URL for "primary exchange" and JSON key "buy" as exchange rate JSON key. Additionaly, we can use "buy", "last" and "sell" for fields 1 to 3 under secondary exchange section for expanded view. Configuring gadget to use pool APIs works in the same way. The only difference is that you can configure up to two JSON keys for pools, since you're probably interested in both paid and unpaid amounts.

For those more technically inclined, JSON key can be either JSON key name, regex, or Javascript reference to JSON object "json". A good example is LocalBitcoins for which this simple referencing JSON keys by name is not good enough. As LocalBitcoins response returns several "last" JSON keys, we need to specify full path to JSON key via Javascript:

Primary exchange URL: https://localbitcoins.com/bitcoinaverage/ticker-all-currencies/
Exchange rate JSON value: json.GBP.rates.last

As there is only one available rate, make sure that JSON keys for fields 1-3 are blank.

Changes

Like this gadget?

If you find this gadget useful, you can support it by sending any amount of BTC to the following Bitcoin address: 1CA1AL9X3VfZGYftnmRbQQeR7vdTwQyvhC