question

Upvotes
Accepted
2 1 1 2

TURNOVER FID #100 has incorrect precision for ILUH3 ric

We are upgrading our application to use ETA API for Shanghai International Energy Exchange. Most of the symbols for this exchange publish incorrect TURNOVER (FID#100) with an extra digit. For example, ILUH3 on Nov 2 10:55AM shows:

ETA:

<!-- rwfMajorVer="14" rwfMinorVer="1" -->

<UPDATE domainType="MARKET_PRICE" streamId="100014" containerType="FIELD_LIST" flags="0x90 (HAS_SEQ_NUM|DO_NOT_CONFLATE)" updateType="9" seqNum="62462" dataSize="112">

<dataBody>

<fieldList flags="0x08 (HAS_STANDARD_DATA)">

<fieldEntry fieldId="6" data="0D00 B982"/>

<fieldEntry fieldId="14266" data="0237 25"/>

<fieldEntry fieldId="65" data="0E0A 8E"/>

<fieldEntry fieldId="64" data="0E6E BB"/>

<fieldEntry fieldId="18" data="0237 25"/>

<fieldEntry fieldId="31" data="0E06"/>

<fieldEntry fieldId="77" data="0E06 42"/>

<fieldEntry fieldId="100" data="0D02 52CE DC"/> This is 38981340 in decimals

<fieldEntry fieldId="32" data="0E20 72"/>

<fieldEntry fieldId="178" data="0E1A"/>

<fieldEntry fieldId="56" data="0C01 48"/>

<fieldEntry fieldId="1379" data="0D00 B754"/>

<fieldEntry fieldId="22" data="0D00 B978"/>

<fieldEntry fieldId="11" data="0D05 E6"/>

<fieldEntry fieldId="30" data="0E06"/>

<fieldEntry fieldId="5" data="0237 25"/>

<fieldEntry fieldId="25" data="0D00 B982"/>

<fieldEntry fieldId="14" data="02"/>

</fieldList>

</dataBody>

</UPDATE>

Both RFA and Eikon display this figure as 3898134. Refinitiv customer support advise me to post this query here so that Refinitiv developers can investigate the issue.


We are currently using upa-8.0.0.L1.all.rrg version

eta-api#technology
icon clock
10 |1500

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

Upvotes
Accepted
55.7k 144 45 65

@hermes.tanhueco

It means that the data is 3898134.0.

How does the client decode it to 38981340?

If the client gets it directly from RsslInt value, it is definitely 38981340.

typedef struct
{
    RsslBool        isBlank;    /*!< @brief RSSL_TRUE if this real value is blank  */
    RsslUInt8        hint;        /*!< @brief Populated with an enumerated value from \ref RsslRealHints */
    RsslInt            value;        /*!< @brief raw signed value with decimal point or denominator removed and accounted for in the RsslReal::hint */
} RsslReal;

The client must apply hint to the value before using it.

icon clock
10 |1500

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

Upvote
55.7k 144 45 65

@hermes.tanhueco

Sorry about the issue that you are facing.

The field 100 is RsslReal so its structure is :

typedef struct
{
    RsslBool        isBlank;    /*!< @brief RSSL_TRUE if this real value is blank  */
    RsslUInt8        hint;        /*!< @brief Populated with an enumerated value from \ref RsslRealHints */
    RsslInt            value;        /*!< @brief raw signed value with decimal point or denominator removed and accounted for in the RsslReal::hint */
} RsslReal;

RsslReal contains a hint and 0D is RSSL_RH_EXPONENT_1. Therefore, 38981340 * (10^-1) = 3898134.0.

"0D02 52CE DC" represents "3898134.0".

<updateMsg domainType="RSSL_DMT_MARKET_PRICE" streamId="4" containerType="RSSL_DT_FIELD_LIST" flags="0x0" updateType="
0 (RDM_UPD_EVENT_TYPE_UNSPECIFIED)" dataSize="53">
    <dataBody>
        <fieldList flags="0x8 (RSSL_FLF_HAS_STANDARD_DATA)">
            <fieldEntry fieldId="6" data="0D02 52CE DC"/>
            <fieldEntry fieldId="22" data="0C67"/>
            <fieldEntry fieldId="25" data="0C4F 53"/>
            <fieldEntry fieldId="32" data="0C00 9896 80"/>
            <fieldEntry fieldId="11" data="0C4F 5B"/>
            <fieldEntry fieldId="267" data="103A 1D"/>
            <fieldEntry fieldId="14305" data="0C0E 0703 C618 6FE7"/>
        </fieldList>
    </dataBody>
</updateMsg>


<!-- End Message (Channel IPC descriptor = 584) -->
UpdateMsg
    streamId="5"
    domain="MarketPrice Domain"
    updateTypeNum="0"
    name="TEST.BK"
    serviceId="1"
    serviceName="ELEKTRON_DD"
    Payload dataType="FieldList"
        FieldList
            FieldEntry fid="6" name="TRDPRC_1" dataType="Real" value="3898134.0"
            FieldEntry fid="22" name="BID" dataType="Real" value="1.03"
            FieldEntry fid="25" name="ASK" dataType="Real" value="203.07"
            FieldEntry fid="32" name="ACVOL_1" dataType="Real" value="100000.00"
            FieldEntry fid="11" name="NETCHNG_1" dataType="Real" value="203.15"
            FieldEntry fid="267" name="ASK_TIME" dataType="Time" value="16:58:29:000:000:000"
            FieldEntry fid="14305" name="EVENT_T_NS" dataType="Time" value="12:14:07:966:111:999"
        FieldListEnd


    PayloadEnd
UpdateMsgEnd

The client can use the rsslRealToDouble or rsslRealToString method in ETA to convert a RsslReal to a double or string, respectively.

1667556595507.png

I hope that this information is of help


1667556595507.png (57.6 KiB)
icon clock
10 |1500

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

Thanks @Jirapongse. Does it mean converting from Real to long is incorrect?