Title: | R Interface to OpenFIGI |
---|---|
Description: | Provide a simple interface to Bloomberg's OpenFIGI API. Please see <https://openfigi.com> for API details and registration. You may be eligible to have an API key to accelerate your loading process. |
Authors: | Ruokun Huang <[email protected]> |
Maintainer: | Ruokun Huang <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.2.8 |
Built: | 2025-03-05 03:16:27 UTC |
Source: | https://github.com/huangricky/ropenfigi |
OpenFIGI main function
OpenFIGI(input, apikey = NULL, openfigiurl = "https://api.openfigi.com/v1/mapping", preferdf = F)
OpenFIGI(input, apikey = NULL, openfigiurl = "https://api.openfigi.com/v1/mapping", preferdf = F)
input |
input data.frame or json, and others that can be feed into toJSON |
apikey |
your API key |
openfigiurl |
Bloomberg's OpenFIGI URL, please see https://openfigi.com/api |
preferdf |
if only supply 1 input, do you prefer to see the data.frame directly |
you may need to setInternet2() or set up proxy if needed
a list of data.frame, of a data.frame if preferdf=T and only 1 request
## Not run: setInternet2() figirst = OpenFIGI(sampleOpenFIGIdf()) ## End(Not run)
## Not run: setInternet2() figirst = OpenFIGI(sampleOpenFIGIdf()) ## End(Not run)
Assign addition cols
OpenFIGI_assignadditionalcols(rst1, additioncols)
OpenFIGI_assignadditionalcols(rst1, additioncols)
rst1 |
a result list |
additioncols |
additional columns you would like to include in the data.frame |
internal function
a data.frame with new columns
Create mapping table out of OpenFIGI
OpenFIGI_MappingCreator(input, apikey = NULL, openfigiurl = "https://api.openfigi.com/v1/mapping", additioncols = c("ID_ISIN", "ID_BB_UNIQUE", "ID_SEDOL", "ID_COMMON", "ID_WERTPAPIER", "ID_CUSIP", "ID_BB", "ID_ITALY", "ID_EXCH_SYMBOL", "ID_FULL_EXCHANGE_SYMBOL", "COMPOSITE_ID_BB_GLOBAL", "ID_BB_GLOBAL_SHARE_CLASS_LEVEL", "ID_BB_SEC_NUM_DES", "ID_BB_GLOBAL", "TICKER", "ID_CUSIP_8_CHR", "OCC_SYMBOL", "UNIQUE_ID_FUT_OPT", "OPRA_SYMBOL", "TRADING_SYSTEM_IDENTIFIER"))
OpenFIGI_MappingCreator(input, apikey = NULL, openfigiurl = "https://api.openfigi.com/v1/mapping", additioncols = c("ID_ISIN", "ID_BB_UNIQUE", "ID_SEDOL", "ID_COMMON", "ID_WERTPAPIER", "ID_CUSIP", "ID_BB", "ID_ITALY", "ID_EXCH_SYMBOL", "ID_FULL_EXCHANGE_SYMBOL", "COMPOSITE_ID_BB_GLOBAL", "ID_BB_GLOBAL_SHARE_CLASS_LEVEL", "ID_BB_SEC_NUM_DES", "ID_BB_GLOBAL", "TICKER", "ID_CUSIP_8_CHR", "OCC_SYMBOL", "UNIQUE_ID_FUT_OPT", "OPRA_SYMBOL", "TRADING_SYSTEM_IDENTIFIER"))
input |
input data.frame or json, and others that can be feed into toJSON |
apikey |
your API key |
openfigiurl |
Bloomberg's OpenFIGI URL, please see https://openfigi.com/api |
additioncols |
additional columns you would like to include in the data.frame |
assiging ISIN, CUSIP and other columns needed. Requires dplyr package to bind rows.
a data.frame
## Not run: setInternet2() figirst = OpenFIGI_MappingCreator(sampleOpenFIGIdf()) ## End(Not run)
## Not run: setInternet2() figirst = OpenFIGI_MappingCreator(sampleOpenFIGIdf()) ## End(Not run)
ROpenFIGI
Provide a simple interface to OpenFIGI by Bloomberg. parse data into data.frame
Ruokun Huang [email protected]
Maintainer: Ruokun Huang [email protected]
Generate a Sample data.frame for FIGI request
sampleOpenFIGIdf()
sampleOpenFIGIdf()
a data.frame of sample request
Generate FIGI Supported Identifiers
showFIGIIDType()
showFIGIIDType()
a char vector