Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • ETA /
avatar image
Question by manning0218 · Sep 18, 2017 at 03:09 PM · elektronrefinitiv-realtimeelektron-sdkrrteta-apielektron-transport-api

Is there anyway to specify what to return for the price tick?

I was going through the data dictionary and saw that in the enumtype.def file we have RTMES encoding for PRCTCK_1. I have read through the developers guide regarding RTMES decoding and was wondering if there is any other way to decode this so that we have UTF-8.

If not, is there a way to specify to return U or D for uptick and downtick respectively?

I have also seen in the enumtype.def file that for PRCTCK_1 there is enumeration for " U", " D", " +", " -". Is there a way to choose to use these enumerated values?

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.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by veerapath.rungruengrayubkul · Sep 20, 2017 at 02:51 AM

@manning0218

Do you mean that you don't want to use RMTES decoding for RMTES enum values of the PRCTCK_1 field?

The enum data normally is provided in UInt16 from provider. ETA application uses the getFieldEntryEnumType function to get corresponding enumerated information such as value display, meaning loaded which is loaded from the enumtype.def file.

If you want to change the display value of a enumeration, you may manually verify if the display value is 0xDE or 0xFE and then returns "U" or "D" instead.

Anyway, I recommend RMTES decoding for enum values. Below is the sample code demonstrating how to decode RMTES enum values to UTF-8.

RsslRet
decodeFieldEntry(RsslFieldEntry* fEntry, RsslDecodeIterator *dIter)
{    
…
case RSSL_DT_ENUM:
if ((ret = rsslDecodeEnum(dIter, &fidEnumValue)) == RSSL_RET_SUCCESS)
{
    RsslEnumType *pEnumType = getFieldEntryEnumType(dictionaryEntry, fidEnumValue);
    if (pEnumType)
    {
        /* create cache buffer for storing RMTES and applying partial updates */
        RsslRmtesCacheBuffer rmtesCache;
        char cacheSpace[100];
        /* create RsslBuffer to convert into */
        RsslBuffer utf8Buffer;
        char convertSpace[100];
        int i = 0;
        RsslRet retVal = 0;

        /* populate cache and conversion buffers with created memory */
        rmtesCache.data = cacheSpace;
        rmtesCache.length = 0; /* this is the used length, since cache starts out empty it should start at 0 */
        rmtesCache.allocatedLength = 100;
        utf8Buffer.data = convertSpace;
        utf8Buffer.length = 100;
        /* apply RMTES content to cache, if successful convert to UTF-8 */
        if ((retVal = rsslRMTESApplyToCache(&(pEnumType->display), &rmtesCache)) < RSSL_RET_SUCCESS)
        {
            /* error while applying to cache */
            printf("Error %s (%d) encountered while applying buffer to RMTES cache. Error Text: %s\n",
            rsslRetCodeToString(retVal), retVal, rsslRetCodeInfo(retVal));
        }
        else if ((retVal = rsslRMTESToUTF8(&rmtesCache, &utf8Buffer)) < RSSL_RET_SUCCESS)
        {
            /* error when converting */
            printf("Error %s (%d) encountered while converting from RMTES to UTF-8. Error Text: %s\n",
            rsslRetCodeToString(retVal), retVal, rsslRetCodeInfo(retVal));
        }
        else
        {
            /* SUCCESS: conversion was successful – application can now use converted content */
            for (i = 0; i < utf8Buffer.length; i ++) {
                    printf(" %x", (unsigned char)utf8Buffer.data[i]);
                }
                printf("(%d)\n", pEnumType->value);
            }
    }    
    else
        printf("%d\n", fidEnumValue);
}
else if (ret != RSSL_RET_BLANK_DATA)
{
    printf("rsslDecodeEnum() failed with return code: %d\n", ret);
    return ret;
}
break;
Comment

People who like this

0 Show 1 · 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
manning0218 · Sep 20, 2017 at 08:01 AM 0
Share

We don't want to use the RMTES enum values just because the decoding for RMTES to UTF-8 is costly. We will have to do decode for all our enum values and if we have say 20 enum values come back in which 19 do not need to use the RMTES decoding then we are adding a lot of overhead from my understanding.

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

Related Questions

Some CONTEXT_ID are not found in the data model discovery tool, where can I find the info?

Why SEQNUM is in order but QUOTIM_MS is not?

Elektron - Source dictionary service down

Cannot connect to Authentication URL

Recv buffer size and system limits in ETA

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • 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
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges