Time & Sales example
Best Answer
-
You can modify StarterConsumer in RFA C++ package to subscribe to Time & Sales RICs, such as tIBM.N.
To request a Time & Sales RIC, the application needs to use a snapshot request.
rfa::common::Handle* sendItemRequest(
const rfa::common::RFA_String& itemName,
const rfa::common::RFA_String& serviceName,
rfa::common::UInt8 indicationMask = 0,
rfa::common::UInt8 msgModelType = rfa::rdm::MMT_MARKET_PRICE,
// rfa::common::Int32 interType = rfa::message::ReqMsg::InitialImageFlag | rfa::message::ReqMsg::InterestAfterRefreshFlag);
rfa::common::Int32 interType = rfa::message::ReqMsg::InitialImageFlag);The Time & Sales data is available in SEG_TEXT field which represents:
The 255-byte text field which can contain up to four log entries. There are embedded New Line control characters within this field to assist in displaying the log information.
To retrieve the next log segment, the application must subscribe to a RIC in NEXT_LR field.
if(respMsg.getHintMask() & RespMsg::PayloadFlag)
{
// _pDecoder->decodeData(respMsg.getPayload());
const rfa::common::Data& data = respMsg.getPayload();
if (!data.isBlank())
{
if (data.getDataType() == FieldListEnum){
const rfa::data::FieldList& input = static_cast<const rfa::data::FieldList&>(data);
FieldEntry fEntry;
if (input.find(258, DataBuffer::StringRMTESEnum, fEntry)){ //SEG_TEXT
const rfa::common::Data& data = fEntry.getData(DataBuffer::StringRMTESEnum);
if (!data.isBlank())
{
const DataBuffer& dataBuf = static_cast<const DataBuffer&>(data);
printf("%s\n", dataBuf.getAsString().c_str());
}
}
if (input.find(238, DataBuffer::StringAsciiEnum, fEntry)){ //NEXT_LR
const rfa::common::Data& data = fEntry.getData(DataBuffer::StringAsciiEnum);
if (!data.isBlank())
{
const DataBuffer& dataBuf = static_cast<const DataBuffer&>(data);
printf("NEXT_LR: %s\n", dataBuf.getAsString().c_str());
sendItemRequest(dataBuf.getAsString(), _cfgVars.serviceName);
}
}
}
}
}Please see the modified code in the attached file: starterconsumer.zip.
The output of the application looks like:
2017 Feb 06 14:51:11.206 ST GMT+07:00 3B40 2B1C 441 INFO
<- Received Event Stream Closed Event, event type: OMMItemEvent handle: 0000
000008A386E0.
2017 Feb 06 14:51:11.991 ST GMT+07:00 3B40 2B1C 597 TRACE <- Received MMT_MARK
ET_PRICE Refresh tou:$9l#*C
serviceName : API_ELEKTRON_EPD_RSSL
symbolName : tou:$9l#*C
streamState : NonStreaming
dataState : Ok
statusCode : None
statusText : All is well.
15:59:57.240 37 X 175.7300 03FEB 1648726 1065
15:59:56.859 100 X 175.7300 03FEB 1648473 M_SWEEP
15:59:56.416 100 X 175.7400 03FEB 1648308 M_SWEEP
2017 Feb 06 14:51:12.001 ST GMT+07:00 3B40 2B1C 413 TRACE Create Item Request
serviceName : API_ELEKTRON_EPD_RSSL
indicationMask : 0
msgModelType : 6 : MarketPrice
interactionType : 1 : InitialImageFlag.
********************** INFO ************************ INFO **********************
2017 Feb 06 14:51:12.005 ST GMT+07:00 3B40 2B1C 441 INFO
<- Received Event Stream Closed Event, event type: OMMItemEvent handle: 0000
000008A38810.
2017 Feb 06 14:51:12.753 ST GMT+07:00 3B40 2B1C 597 TRACE <- Received MMT_MARK
serviceName : API_ELEKTRON_EPD_RSSL
streamState : NonStreaming
dataState : Ok
statusCode : None
statusText : All is well.
15:59:56.409 200 175.7400 03FEB 1648304
15:59:55.880 100 X 175.8300 03FEB 1648075 M_SWEEP
15:59:55.859 100 X 175.8300 03FEB 1647965 M_SWEEP
NEXT_LR: tou:$9l#*=To interpret the data in SEG_TEXT, you need to refer to WORLD/TAS1 page.
1
Categories
- All Categories
- 6 AHS
- 37 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
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛