The goal of this vignette is to demonstrate how eur and eurusds functions can be applied by using them in Bitocoin report generation.

Load all packages

library(EurUsd)
library(binancer)
library(data.table)
library(ggplot2)
library(scales)
library(pander)

1. Fetch the Daily Volume of Bitcoins

The daily volume and close prices of Bitcoins sold for “USDT” on Binance for the last 45 days can be fetched with the help of binance_klines from the binancer package:

2. Get EUR/USD exchange rates

The exchange rates can be fetched with the help of eurusds function for specified dates:

3. Put all information together

Merge the tables by date. Note that the Foreign Exchange market is closed on holidays and weekends, therefore for the days with the missing exchange rate the latest rate available would be used.

date eurusd btcusd volume value_eur
2019-04-15 0.8839 5025 29057 129064735
2019-04-16 0.8846 5174 24242 110944279
2019-04-17 0.8849 5203 23308 107304588
2019-04-18 0.8889 5258 22619 105726143
2019-04-19 0.8889 5259 24611 1.15e+08
2019-04-20 0.8889 5292 19169 90165944