ABC
1
Example use of the Bitcoin Utilties google scripts libraryvalues update when spreadsheet is opened
2
3
Market prices (actual use in column B)Actual Output
4
=bitcoinchartsMarketPrice("mtgoxAUD","ask") 146.43629bitcoincharts 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 askerrdirect from mtgox
9
=btcePrice("USD", "ask") errdirect from btc-e
10
=bitstampPrice("ask") <- no currency option31043direct from bitstamp
11
=coinbasePrice("bid") <- no currency optionerrdirect from coinbase
12
=localbitcoinsPrice("DE", "Berlin", "100", "EUR", "bid") <- 100=distance in km#ERROR!direct from localbitcoins
13
.=btcchinaPrice()errdirect 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.