GetWeightedPrices: This function returns the weighted prices.

Description Usage Value Examples

Description

Bitcoincharts offers weighted prices for several currencies that can be used, for example, to price goods and services in Bitcoins – this will yield much lower fluctuations than using a single market's latest price.

Usage

1

Value

Weighted prices are calculated for the last 24 hours, 7 days and 30 days; if there are no trades during an interval, such as no trade within 24 hours, then no value will be returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
tryCatch(
     weightedPrices <- GetWeightedPrices (),
     error =
         function (e) {
             print (
                 paste (
                     "An exception was thrown -- details follow: ",
                     e,
                     sep=""
                 )
             )
         }
     )

Example output

Loading required package: RJSONIO
Loading required package: RCurl
Loading required package: bitops
[1] "An exception was thrown -- details follow: Error in function (type, msg, asError = TRUE) : Could not resolve host: api.bitcoincharts.com\n"

rbitcoinchartsapi documentation built on May 2, 2019, 4:02 a.m.