https://github.com/Rblp/Rblpapi
R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
https://github.com/Rblp/Rblpapi
bloomberg bloomberg-api cran r r-package rcpp
Last synced: 5 months ago
JSON representation
R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
- Host: GitHub
- URL: https://github.com/Rblp/Rblpapi
- Owner: Rblp
- License: other
- Created: 2013-04-19T13:13:15.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-02-25T19:43:34.000Z (about 1 year ago)
- Last Synced: 2024-03-27T03:51:27.256Z (about 1 year ago)
- Topics: bloomberg, bloomberg-api, cran, r, r-package, rcpp
- Language: C++
- Homepage:
- Size: 12.7 MB
- Stars: 163
- Watchers: 32
- Forks: 77
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
- awesome-quant - Rblpapi - An R Interface to 'Bloomberg' is provided via the 'Blp API'. (R / Data Sources)
README
## Rblpapi: R Access to Bloomberg API
[](https://github.com/Rblp/Rblpapi/actions/workflows/ci.yaml)
[](http://www.gnu.org/licenses/gpl-3.0.html)
[](https://raw.githubusercontent.com/Rblp/Rblpapi/master/inst/License.txt)
[](https://cran.r-project.org/package=Rblpapi)
[](https://cran.r-project.org/package=Rblpapi)
[](https://www.r-pkg.org:443/pkg/Rblpapi)
[](https://github.com/Rblp/Rblpapi)### Background
Rblpapi provides R with access to data and calculations from Bloomberg
Finance L.P. via the [API libraries](https://www.bloomberg.com/professional/support/api-library/) provided by
Bloomberg.### Requirements
A valid and working Bloomberg installation.
### Examples
Here are a few simple examples.
```{.r}
library(Rblpapi)
con <- blpConnect() # automatic if option("blpAutoConnect") is TRUEspx <- bdh(securities = "SPX Index",
fields = "PX_LAST",
start.date = as.Date("2013-03-01"))spx_ndx <- bdh(securities = c("SPX Index","NDX Index"),
fields = "PX_LAST",
start.date = as.Date("2013-03-01"),
include.non.trading.days = TRUE)monthly.options <- structure(c("ACTUAL", "MONTHLY"),
names = c("periodicityAdjustment",
"periodicitySelection"))
spx_ndx_monthly <- bdh(securities = c("SPX Index","NDX Index"),
fields = "PX_LAST",
start.date = as.Date("2012-01-01"),
options = monthly.options)goog_ge_div <- bdh(securities = c("GOOG US Equity","GE US Equity"),
fields = c("PX_LAST","CF_DVD_PAID"),
start.date = as.Date("2012-11-01"))goog_ge_px <- bdp(securities = c("GOOG US Equity","GE US Equity"),
fields = c("PX_LAST","DS002"))
```### Status
Fully functional on Windows and Linux (both for x86_64), and macOS (for arm64).
### Installation
The package is on [CRAN](https://cran.r-project.org) and can be installed as
usual via```r
install.packages("Rblpapi")
```Builds are also available via [r-universe](https://rblp.r-universe.dev/Rblpapi) and can be installed
via```r
install.packages('Rblpapi', repos = c('https://rblp.r-universe.dev',
'https://cloud.r-project.org'))
```Interim (source or binary) releases _may_ be also be made available through the
[ghrr drat](https://ghrr.github.io/drat/) repository as well and can be accessed via```r
install.packages("drat") # easier repo access + creation
drat:::add("ghrr") # make it known
install.packages("Rblpapi") # install it
```### Authors
Whit Armstrong, Dirk Eddelbuettel and John Laing
### License
GPL-3 for our code
[License.txt](inst/License.txt) for the Bloomberg libraries and headers it relies upon