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 Antoine.Bouvet · Jan 21 at 11:17 AM · vbafieldsrics

RIC/Flied combination in VBA requests

Good morning,

I have a question about the Eikon API and the way historical data requests are constructed using VBA.

It has to do with RIC/field combination. I have a sample sheet that requests historical data via VBA for all the RICS provided as long as I want the same field for all of them. I would like to use different fields for different RICS (eg EUROSTR=, Value and EURIBOR3MD=, Close) in the same request.

The code i was given creates a String of RICs contained in a range using the following loop:

For i = 1 To rngRICS.Count

RICList = RICList & rngRICS.Value2(1, i) & ";"

Next i

while the field is created as follows:

Fields = ".Timestamp;." & Range("Field").Value

I tried to create a Fields string the same way as the RICs field is created but it requests all the fields for all the RICS. In other words, it doesnt put Field1 in front of RC1, Field2 in front of RIC2 etc.

Could you help me strucure this the right way? Appologies if this is a basic question, I am new to Eikon.

Thanks

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.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov. · Jan 26 at 03:40 AM

@Antoine.Bouvet

From the code snippets you provided I figure you must be using RHistory COM Library.

As @umer.nalla said, there's no way to create a request where certain fields would be requested only for certain RICs and other fields for other RICs. You could, however, create a separate request for each RIC, and then within each request you can specify only the fields you need for that request (or RIC). You could do this one RIC at a time in an artificial loop using a single instance of RHistoryQuery object, where the next request is sent from the callback for OnUpdate event (which is raised when the data for the previous request has been retrieved). Or you could create a separate instance of RHistoryQuery object for each RIC, keep all these objects in a collection and destroy the collection once the data for all RICs has been retrieved. To achieve this you'd need to create a couple of custom wrapper classes. Attached example demonstrates one way of approaching this.

RHistoryMultipleQueries.zip


rhistorymultiplequeries.zip (25.5 KiB)
Comment
Antoine.Bouvet

People who like this

1 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 umer.nalla · Jan 21 at 01:04 PM

Hi @Antoine.Bouvet

Whilst I am not a VBA expert, I can say that based on my knowledge of Eikon API, I understand it is not possible to request multiple RICs with different fields for each RIC in a single request.

If you refer to the Eikon DATA API reference
Eikon Data API for Python: eikon (refinitiv.com)

you will note that the historical data function takes a list of RICs, followed by an optional list of Fields - and it will attempt to obtain all the specified fields for all the RICs.

If you want to request different Fields for individual RICs, you will need to make individual requests for each RIC along with its list of required fields.


Comment
Antoine.Bouvet

People who like this

1 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 >
12 People are following this question.

Related Questions

symbology (sedol to ric)

Revenue fields

Get intraday BID/ASK data through ek.get_data

For TR.TotalReturnYTD field, how to change it to a customized version?

QuoteID not mapping to RICs.

  • 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