A | B | C | |
---|---|---|---|
1 | Example use of the Bitcoin Utilties google scripts library | values update when spreadsheet is opened | |
2 | |||
3 | Market prices (actual use in column B) | Actual Output | |
4 | =bitcoinchartsMarketPrice("mtgoxAUD","ask") | 146.43629 | bitcoincharts pulled from bitcoincharts.com |
5 | =bitcoinchartsMarketPrice("bitstampUSD","bid") | 31068 | |
6 | .=bitcoinchartsWeightedPrice("CNY", "24h") | currency argument not one of: AUD, KRW, ILS, JPY, EUR, USD, CAD, timestamp | |
7 | =bitcoinchartsWeightedPrice("EUR", "7d") | 28002.42 | |
8 | =mtgoxPrice("USD", "ask") <- lowest ask | err | direct from mtgox |
9 | =btcePrice("USD", "ask") | err | direct from btc-e |
10 | =bitstampPrice("ask") <- no currency option | 31043 | direct from bitstamp |
11 | =coinbasePrice("bid") <- no currency option | err | direct from coinbase |
12 | =localbitcoinsPrice("DE", "Berlin", "100", "EUR", "bid") <- 100=distance in km | #ERROR! | direct from localbitcoins |
13 | .=btcchinaPrice() | err | direct from btcchina |
14 | |||
15 | Orderbooks | ||
16 | See mtgox_orderbook sheet for one example of the following functions: | ||
17 | =mtgoxOrderbook("USD", "asks") <- note: 'asks' not 'ask' | direct from mtgox | |
18 | =bitcoincentralOrderbook("EUR", "bids") | direct from bitcoincentral | |
19 | =bitcoin24Orderbook("EUR", "asks") | direct from bitcoin4 | |
20 | =btceOrderbook("USD", "bids") | direct from btc-e | |
21 | =bitstampOrderbook("asks") | direct from bitstamp | |
22 | coinbase does not provide an orderbook api yet | ||
23 | |||
24 | |||
25 | Further documentation: | ||
26 | https://script.google.com/macros/s/AKfycbxBLJGpX9Is2ZF5YfjR4XjqjEClHz_rogK-8wEup5N5LuuIGtMb/exec | ||
27 | |||
28 | For example if the value in cell B28 is the number of BTC I have and I want to know what they are worth if I sell them at MTGox USD right now (lowest ask price), the formula would be: | ฿ 100.00 | |
29 | B28*mtgoxPrice("USD", "ask"), result shown to the right: | #VALUE! | |
30 | These values will update every time you open your spreadsheet again. Unless you write your own scripts to have them update more often. |