ahmedmohamedali / eikonapir Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Thanks Ahmed for this package. Great work! I noticed the count in 'get_news_headlines.Rd' doesn't work.
I get the following error: "get_news_headlines error: count must be an integer"
Hi,
Do you have a way to retrieve the field "open interest" of a time series RIC with the fonction "get_timeseries()" ?
Thank you.
Alban
There seems to be a change in the Eikon interface that breaks previously running script running with eikonapir. Wanted you to be aware of the following thread in the developers forum https://community.developers.thomsonreuters.com/questions/28988/eikon-api-errors-in-previously-working-scripts.html.
In addition when running the get_symbology command with debug on there's a strange message about the app id, seems like it's "forgetting" the app id that was set just earlier:
eikonapir::set_app_id("7ed51e7f947b428f9690bac0c1116b122cac54a5")
get_symbology("MSFT.O","RIC","ISIN",raw_ouput = FALSE,debug = TRUE)
[1] "Request *************************************"
{"Entity":{"E":["SymbologySearch"],"W":{"symbols":[["MSFT.O"]],"from":["RIC"],"to":[["ISIN"]],"bestMatchOnly":[true]}}}
[1] "Response *************************************"
[1] "{"ErrorCode":1401,"ErrorMessage":"Application id ED142B67FBF0B94BAC3AB is invalid"}"
[1] "Response status *************************************"
[1] 403
Error in print.default("HTTP Error, code= ", response$status_code, sep = "") :
invalid 'digits' argument
Hi,
I get an error retrieving some data. When I download ticker seperately everything is ok. But when I use a list I get an Error.
set_app_id('###########')
#No problem with this code
df = get_timeseries("AMb.CO",list(""),"2005-01-01T15:04:05","2016-01-10T15:04:05","monthly")
df = get_timeseries("AAK.ST",list(""),"2005-01-01T15:04:05","2016-01-10T15:04:05","monthly")
df = get_timeseries("AAB.CO",list("*"),"2005-01-01T15:04:05","2016-01-10T15:04:05","monthly")
This gives the error:
df = get_timeseries(list("AMb.CO","AAK.ST","AAB.CO"),list("*"),"2005-01-01T15:04:05","2016-01-10T15:04:05","monthly")
Error in rbind(deparse.level, ...) :
numbers of columns of arguments do not match
Hi,
I am getting the below error when I try Eikon api using R.
No encoding supplied: defaulting to UTF-8.
Error in print.default("HTTP Error, code= ", response$status_code, sep = "") :
invalid printing digits 503
Can you please help me to fix it?
Thanks,
In json_request.R, is missing a paste function in line 37.
Original:
print("HTTP Error, code= ", response$status_code, sep = "")
Must be:
print(paste("HTTP Error, code= ", response$status_code, sep = ""))
Thanks for the package, looks good so far.
Time field in the get_timeseries() command does not seem to work, see issue I opened in TR Eikon API forum for details. Let me know where do you prefer to see issues as we work with the package in this beta stage, here or in the user forum.
regards
Does this package work for downloading real time news? For example, if I am waiting for a news headlines that has not been published yet, like a company earnings, does this package support real time news headlines extraction?
And while on the topic of real time, does this package allow for real time prices and real time RIC updates?
Hi,
I´m trying to get a list of private companies that are listed on eikon using eikonapir.
The command lines are the following:
set_app_id("my_app_id")
type <- 'IN(Private(OrgType(COM, UNK, MKP)))/UNV:Private/)'
country <- 'IN(TR.HQCountryCode,"BR")'
companies <- paste0('SCREEN(U(',type,',',country,')')
columns <- list(TR_Field(field_name = 'TR.CommonName'))
list_companies <- get_data(companies,columns)
I was successful using this method for public companies, setting type as 'IN(Equity(active,public,primary))/UNV:Public/)'. But it´s not working for private companies.
Could you help me?
I get the following message when I try to install the package:
> install_github("ahmedmohamedali/eikonapir")
Installation failed: Timeout was reached: Connection timed out after 10000 milliseconds
Installing devtools worked fine.
I'd appreciate any help.
Hi - it all works great for me so far - you might want to change the document files as the eikon::set_app_id('your_app_id') function syntax is wrongly written as eikon.set_app_id('your_app_id') - threw me off for a second :)
awesome work - will take it for more of a spin this weekend.
thx Jason
It seems that get_data cannot correctly handle columns with NULL/missing values.
Consider this:
ticker <- "0388.HK"
req.fields <- list("TR.EPSEstValue(Period=FY2019)", "TR.EPSEstValue(Period=FY2019).date", "TR.EPSEstValue(Period=FY2019).origdate", "TR.EPSEstValue(Period=FY2019).confirmdate")
get_data(ticker, req.fields)
Instrument Earnings Per Share - Broker Estimate Date Activation Date Confirm Date
1 0388.HK 8.19 2018-03-01T15:00:00Z 2018-03-01T15:00:00Z 2018-03-02T00:00:00Z
2 0388.HK 6.94 2018-03-01T05:58:00Z 2018-03-01T05:58:00Z 2018-02-28T00:00:00Z
3 0388.HK 9.6 2018-04-12T12:00:00Z 2018-04-12T12:00:00Z 2018-04-13T00:00:00Z
4 0388.HK 12.038 2018-01-29T16:35:00Z 2018-01-29T16:35:00Z 2018-03-01T00:00:00Z
5 0388.HK 9.238 2018-04-12T08:27:00Z 2018-04-12T08:27:00Z 2018-03-20T00:00:00Z
6 0388.HK 9.41 2018-01-26T21:10:00Z 2018-01-26T21:10:00Z 2018-03-27T00:00:00Z
7 0388.HK 7.04 2017-10-03T14:00:00Z 2018-04-01T22:40:18Z
8 0388.HK 10.684 2018-03-01T05:40:00Z 2018-03-01T05:40:00Z
9 0388.HK 9.2 2018-03-01T19:37:00Z 2018-03-01T19:37:00Z
10 0388.HK 7.802 2018-03-01T14:57:00Z 2018-03-01T14:57:00Z
11 0388.HK 11.99 2018-03-01T17:17:00Z 2018-03-01T17:17:00Z
12 0388.HK 7.586 2018-03-05T10:30:00Z 2018-03-05T10:30:00Z
13 0388.HK 7.61 2018-02-28T12:20:00Z 2018-02-28T12:20:00Z
14 0388.HK 7.7 2018-01-11T07:47:00Z 2018-01-11T07:47:00Z
15 0388.HK 9.04 2018-03-01T09:22:00Z 2018-03-01T09:22:00Z
16 0388.HK 7.89 2018-02-28T21:54:00Z 2018-02-28T21:54:00Z
17 0388.HK 7.978 2018-03-01T08:34:00Z 2018-03-01T08:34:00Z
18 0388.HK 8.75 2018-04-09T21:08:00Z 2018-04-09T21:08:00Z
19 0388.HK 7.32 2018-01-09T20:44:00Z 2018-01-09T20:44:00Z
20 0388.HK 9.754 2018-02-28T14:15:00Z 2018-02-28T14:15:00Z
Note that there are 5 confirm dates and they are all attached to the first 5 rows.
But, this is wrong.
From Eikon/Excel
in cell A1:
=TR("0388.HK","TR.EPSEstValue;TR.EPSEstValue.origdate;TR.EPSEstAge;TR.EPSEstFootNote","Period=FY2019 SDate=1D CH=Fd RH=IN;date;confirmdate;analystcode;brokername;isexcluded",B2)"
Output:
Ticker | date | confirmdate | analystcode | brokername | isexcluded | broker estimate | Activation Date | Age | footnote |
---|---|---|---|---|---|---|---|---|---|
0388.HK | 3/1/2018 15:00 | Permission Denied 483808 | FALSE | 8.19 | 3/1/2018 15:00 | 48 | NULL | ||
0388.HK | 3/1/2018 5:58 | 6CGC | "MORNINGSTAR | INC." | FALSE | 6.94 | 3/1/2018 5:58 | 48 | |
0388.HK | 4/12/2018 12:00 | Permission Denied 73704 | FALSE | 9.6 | 4/12/2018 12:00 | 6 | NULL | ||
0388.HK | 1/29/2018 16:35 | 3/2/2018 | Permission Denied 7896 | FALSE | 12.038 | 1/29/2018 16:35 | 79 | NULL | |
0388.HK | 4/12/2018 8:27 | 786C | NOMURA ASIAN EQUITY RESEARCH | FALSE | 9.238 | 4/12/2018 8:27 | 6 | NULL | |
0388.HK | 1/26/2018 21:10 | 2/28/2018 | 4AVH | BNP PARIBAS GROUP | FALSE | 9.41 | 1/26/2018 21:10 | 82 | NULL |
0388.HK | 10/3/2017 14:00 | 4INH | RHB RESEARCH | TRUE | 7.04 | 4/1/2018 22:40 | 197 | Contributor update pending: Estimate failed freshness policy | |
0388.HK | 3/1/2018 5:40 | 4/13/2018 | Permission Denied 25632 | FALSE | 10.684 | 3/1/2018 5:40 | 48 | NULL | |
0388.HK | 3/1/2018 19:37 | 7A4D | CHINA EVERBRIGHT RESEARCH LTD | FALSE | 9.2 | 3/1/2018 19:37 | 48 | NULL | |
0388.HK | 3/1/2018 14:57 | Permission Denied 128064 | FALSE | 7.802 | 3/1/2018 14:57 | 48 | NULL | ||
0388.HK | 3/1/2018 17:17 | 3/1/2018 | 7GOU | CHINA INTERNATIONAL CAPITAL CORPORATION (HONG KONG) LIMITED | FALSE | 11.99 | 3/1/2018 17:17 | 48 | NULL |
0388.HK | 3/5/2018 10:30 | Permission Denied 22760 | FALSE | 7.586 | 3/5/2018 10:30 | 44 | NULL | ||
0388.HK | 2/28/2018 | Permission Denied 32 | FALSE | 7.61 | 2/28/2018 12:20 | 49 | NULL | ||
0388.HK | 1/11/2018 | 7HRJ | KGI SECURITIES (SG) PTE LTD | FALSE | 7.7 | 1/11/2018 7:47 | 97 | NULL | |
0388.HK | 3/1/2018 | 7IA9 | CHINA GALAXY INTERNATIONAL SECURITIES | FALSE | 9.04 | 3/1/2018 9:22 | 48 | NULL | |
0388.HK | 2/28/2018 | Permission Denied 392 | FALSE | 7.89 | 2/28/2018 21:54 | 49 | NULL | ||
0388.HK | 3/1/2018 | 772H | UOB KAY HIAN PTE LTD | FALSE | 7.978 | 3/1/2018 8:34 | 48 | NULL | |
0388.HK | 4/9/2018 | Permission Denied 36928 | FALSE | 8.75 | 4/9/2018 21:08 | 9 | NULL | ||
0388.HK | 1/9/2018 | 3/20/2018 | Permission Denied 23816 | FALSE | 7.32 | 1/9/2018 20:44 | 99 | NULL | |
0388.HK | 2/28/2018 14:15 | 3/27/2018 | Permission Denied 2880 | FALSE | 9.754 | 2/28/2018 14:15 | 49 | NULL |
If we look at the first row or the R output,
forecast value is 8.19 with confirmdate of 2018-3-2
but, in Excel, forecast value for the first row is also 8.19, but there is no confirm date. Confirm date of 2018-3-2 is linked with the forecast value of 12.038 (row 4).
Furthermore, I noted that the sequence of confirm date is consistent in both results but R get_data does not inject NULL into the data frame correctly.
I haven't tested it with Python API yet. though.
Thanks,
Andy
Hi,
I try to get an adjusted price and it didn't work.
corax parameter for the get_timeseries is not working.
"Error in set_string_property(payload, "corax", corax) :
object 'payload' not found"
Good job with the library!
There is a bug in the API. The code uses the payload variable. The correct variable should be list_object.
set_string_property <- function(list_object,property,value)
{
if (!is.null(value))
{
if (is.character(value))
{
payload[property] = value
return (TRUE)
}
else
{
return (FALSE)
}
}
return (TRUE)
}
I got this error when I have tried to install: (Windows 10 Machine, R 4.2.2 )
devtools::install_github("ahmedmohamedali/eikonapir")
Using GitHub PAT from the git credential store.
Erro: Failed to install 'unknown package' from GitHub:
HTTP error 401.
Bad credentials
Rate limit remaining: 57/60
Rate limit reset at: 2024-06-25 21:52:05 UTC
Hi, when i run the command get_timeseries (or any other command) I get:
Error in curl::curl_fetch_memory(url, handle = handle) :
Failed to connect to localhost port 9000: Connection refused
The package used to work until some tiime ago, and I tried everything (reinstalling and more), but this did not solve the issue. Can you please let me know if you know a solution? thanks!
The count parameter doesn't seem to work (or maybe I'm doing something wrong).
It seems to default 3000. If I try to increase or decrease the number. E.g., if I increase to 6000, still get 3000. If I decrease to 100, still get 3000 (or the maximum available).
Also, I need to do a as.integer() on any number submitted or I get an error saying it isn't an integer (which might be true but most functions of this type don't have this requirement).
I did an install of latest package from github hoping that by getting the version with the new port number to Eikon I'll be able to work without relogging every time I move from Eikon to R. Now I can't get any data, not when I'm logged in Eikon and not when I log in the separate Eikon API proxy. The error message is:
Error in get_proxy_port() :
no slot of name "proxy_port" for this object of class "RequestInfo"
Thanks, claudiu
Hi @ahmedmohamedali, recently the API capabilities have been integrated into the Eikon Toolbar. The port number being used now is 9000 (instead of 36036). Could you please amend this in the source code? The package is still looking for 36036, so we get the following error:
Error in curl::curl_fetch_memory(url, handle = handle) : Couldn't connect to server
Thanks!
I don't know if it's an issue or if I am missing something..
Python API can map error with the code below. How to do it with R?
df, err = ek.get_data(['GOOG.O', 'MSFT.O', 'FB.O', 'AMZN.O', 'TWTR.K'],
['TR.Revenue.date','TR.Revenue','TR.GrossProfit'],
{'Scale': 6, 'SDate': 0, 'EDate': -2, 'FRQ': 'FY', 'Curn': 'EUR'})
I have seeing this error a couple of times. Usually when Im trying to download a big index like New York Stock exchange. Usually it goes well, but sometimes it throws this error. This time at stock WYN.N.
get_timeseries("WYN.N",list("TIMESTAMP","HIGH","CLOSE","LOW","OPEN","VOLUME"),"2000-01-01T15:04:05",end_time,"daily")
[1] "WYN.N"
Error in 1:nrow(input_data_frame) : argument of length 0
Calls: get_timeseries -> get_formatted_data_frame
Hi everyone,
is there a way to retrieve the clean and dirty price of a bond with the function get_data?
thanks
I have a problem by obtaining tick data from EIKON. I can get the data, when I use "minut" (or "daily" or "hour") , but not when I use "tick". I cannot figure out why.
Code:
eikonapir.set_app_id('YOUR_APP_ID')
%# This works fine (minut data)
df = get_timeseries('IBM','*',start_date = '2017-03-21T00:00:00Z',end_date='2017-03-21T16:00:00Z',interval='minute')
%# This does NOT work (tick data)
df = get_timeseries('IBM','*',start_date = '2017-03-21T00:00:00Z',end_date='2017-03-21T16:00:00Z',interval='tick')
Thanks in advance - and thank you very much for a very useable package!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.