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?
Best Answer
-
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;0
Answers
-
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.
0
Categories
- All Categories
- 6 AHS
- 39 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛