Package 'EikonDownloader'

Title: Eikon API Downloader
Description: This package aims to give the user the ability to download the data they require from the Eikon API.
Authors: Oliver Collargol Frisvoll [aut, cre]
Maintainer: Oliver Collargol Frisvoll <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1.1108
Built: 2024-10-21 21:16:59 UTC
Source: https://github.com/OliverFrisvoll/EikonDownloader

Help Index


Fetches Eikon port from file

Description

Fetches Eikon port from file

Usage

ek_fetch_port(debug = FALSE)

Arguments

debug
  • If TRUE, prints debug messages


Fetches the Eikon API_KEY

Description

Fetches the Eikon API_KEY

Usage

ek_get_APIKEY()

Getting the port that is set

Description

Getting the port that is set

Usage

ek_get_port()

Check status

Description

Check status

Usage

ek_get_status(port)

Arguments

port
  • The port to check status on


Function to set api_key

Description

This function is used to set the app_key to be used in the package. To get an app_key you need to have the Eikon desktop app or the newer Refinitiv terminal installed. You can then get an app_key from the app by typing in appkey in the search field and then creating a new app_key.

Usage

ek_set_APIKEY(api_key = NULL, debug = FALSE)

Arguments

api_key
  • The api_key to be used

debug
  • If TRUE, prints debug messages


Function to set api_port

Description

Just needed to incase it doesn't work on the automatically detected port, this can sometimes be the case after the system hibernates with Eikon or the Refintiv terminal running.

Usage

ek_set_port(port = NULL)

Arguments

port
  • The new port to use, (default NULL)


Fetch datagrid information from the Eikon API

Description

Before this function words you need to run the function ek_app_key() with a working app_key from the Eikon/Refinitiv desktop

Usage

get_datagrid(instrument, fields, ..., settings = list(raw = FALSE))

Arguments

instrument
  • Vector of Char, can be CUSIP, PERMID, rics any identifer that the Eikon can handle

fields
  • Vector of Char, fields to request from the datagrid

...
  • List of named parameters, could be 'SDate' = '2021-07-01', 'EDate' = '2021-09-28', 'Frq' = 'D' for daily data (Frq) with a given start (SDate) and end date (EDate). If no EDate is supplied, the function will use todays date. You can pass other arguments like for instance curn = 'USD' to get the data in USD, change out USD to any other currency to get the fields in that currency.

settings
  • List of bool settings, possibilities list(raw = false, field_name = false): raw : If the function should return the raw json (default false) field_name : if the function should return the field names (default false)

Details

This package downloads information from the Eikon datagrid. The function is a wrapper around the Rust function that does the actual work. To use this function you simply need to have an Eikon APP key, which you get from the Eikon desktop app or the newer Refinitiv terminal. The function will then fetch the information from the Eikon datagrid and return it as a dataframe. The desktop app needs to be running for this to work.

Error messages are passed from Rust (unless of course the issue is R type releated, then it is catched directly in this function), if the error message displayed is along the line of "... panicked" this means you have gotten an error I did not expect at all and you should file an issue with reproducible code and the error message at github.com/OliverFrisvoll/EikonDownloader/issues

Value

dataframe or a list of raw data. At the moment i do not parse any column to a specific type, so all columns are of type character. This is something I might change in the future, but only if i find a robust way of doing this.


Get timeseries data from Eikon using RIC as identifier

Description

Returns a timeseries of data for the given rics for the given timeperiod and interval. The fields can be specified, by default it returns all the fields

Usage

get_timeseries(
  rics,
  fields = "*",
  startdate,
  enddate = NULL,
  interval = "daily"
)

Arguments

rics
  • Char vector of rics for the information requested

fields
  • Fields to return, by default all fields are returned these field are different from the datagrid fields

startdate
  • Date, start date of the query as a date object (required)

enddate
  • Date, end date of the query as a date object (optional, if not supplied, todays date is used)

interval
  • char, interval of data: (minute / hour / daily / weekly / monthly / quarterly / yearly) not all data is available for all intervals. For instance minute and hour data is only available one year back

Value

A dataframe with the data requested