Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by Wessel · Oct 16, 2017 at 10:52 AM · pythonpython api400 bad requestspreadsheet-functiongavg

"GAVG" function in python API

Some of my Excel fromulas used the "GAVG" Function, and it worked really well. an example:

GAVG(TR.HQCountryCode,TR.GICSIndustry,TR.RevenueSmartEstLastYrGrowth,universe="EquityAll"),Curn=USD

This function does not seem to work well in the Python scripting API. sometimes it works, but most of the time it crashes, displaying the error: HTTPError: 400 Bad Request.

Is the GAVG function supported?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov. · Nov 17, 2017 at 11:27 AM

While the use of these functions is not yet officially supported through Eikon Python API, this seems to work just dandy for me:
ek.get_data(['TRI.N','IBM.N','AAPL.O'],['GAVG(TR.HQCountryCode,TR.GICSIndustry,TR.RevenueSmartEstLastYrGrowth,universe="EquityAll")'],{'Curn':'USD'})
Would you mind giving me an example, which returns Bad Request for you?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Alex Putkov. · Nov 10, 2017 at 04:44 PM

I'm afraid the functions such as this one that you can see in Quick Functions section of Parameters & Quick Functions Tab in Formula Builder dialog in Eikon Excel cannot be used in Eikon Python API. At least not today.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by bartosz.latkowski · May 17, 2018 at 11:46 AM

hi, I tried above and it worked but admit getting HTTPError: 400 Bad Request occasionally.
Also Eikon Excel returns different result:

=TR("TRI.N;IBM.N;AAPL.O","TR.HQCountryCode;TR.GICSIndustry;GAVG(TR.RevenueSmartEstLastYrGrowth,universe=""EquityAll"")","CH=IN;Fd Curn=USD TRANSPOSE:Y",H8)
Apart from that I tried also % change but couldn't get it working and received HTTPError: 400 Bad Request again

ek.get_data('PZU.WA', ['PERCENT_CHG(TR.PriceClose, lag=-12D)']) 

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

[MainThread 47708] Backend error. 400 Bad Request

Get Instruments by exchange or country?

[Python API] How to retrieve competitors or similar companies list

Can Codebook perform those?

Does get_timeseries provides adjusted close prices (splits and dividends) when using corax="adjusted" ?

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges