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
Best Answer
-
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.
1
Answers
-
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.
1
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛