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

davidk
davidk Contributor

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

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @davidk

    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 " Paused

Answers