Requesting US equity imbalance type/side via Workspace API-- numeric data for string fields

I'm porting some tasks from the Eikon C# .NET APIs to the LSEG Data Library API (implementing in Python). For some of this data we subscribe to the US imbalance feed RICs (e.g. IBM.NOI, AAPL.ITC). I'm subscribing to, among other fields, IMB_TYPE, IMB_ACT_TP, and IMB_SIDE). These fields, in the Eikon Quote app and the Workspace Quote app, show up as strings (for example, IMB_TYPE is usually O, R, or C, for open, regulatory, or close; IMB_SIDE is usually B, S, or N, for a buy, sell, or neutral imbalance). They always showed up that way using the C# API as well. However, in the LSEG Workspace API, they are showing up as numbers, like IMB_SIDE=3 or IMB_ACT_TP=4. Is this expected? Is there a known mapping from the numeric values of these fields to their string values or vice versa? I'm not sure how to deal with these.
Best Answer
-
Thank you for reaching out to us.
Those fields are enumeration fields. Each enumeration field contains numeric values and expanded strings.
Those values and mappings are defined in the enumtype.def file. For example:
!
! ACRONYM FID
! ------- ---
!
IMB_ACT_TP 4333
!
! VALUE DISPLAY MEANING
! ----- ------- -------
0 " " Not set
1 "O " Open
2 "M " Market
3 "H " Halt
4 "C " Close
5 "A " AESP
6 "SP" EDSP
7 "E " Resume Auction
8 "F " Periodic Auction
9 "V " Volatility
10 "I " Intra-Day Auction
11 "OP" OPA Auction
12 "R " Regulatory Imbalance
!
! ACRONYM FID
! ------- ---
!
IMB_SIDE 4340
IMB_SIDE2 13083
!
! VALUE DISPLAY MEANING
! ----- ------- -------
0 " " Not Set
1 "N " No imbalance
2 "B " Buy imbalance
3 "S " Sell imbalance
4 "O " Insufficient orders to calculate
5 "P " Paused0
Answers
-
Thanks Jiranpongse. I don't suppose there is a function somewhere that would parse this file into a dictionary or other type to make this programatically visible)? I could hard-code the mapping I need here, but that seems counterproductive given there is an enumtype.def file which is presumably supposed to be dynamic; conversely I could parse the file, but it seems like that's probably something you already have implemented. The lseg.data.delivery._Dictionary class looked initially promising, but doesn't seem to work, at least under Eikon.
0 -
There is a sample code on GitHub.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛