Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TREP APIs /
  • RFA /
avatar image
Question by pcarrieri · Feb 16 at 03:32 PM · rfac++decoding datamap entrymarket feed

RFA decoding payload

Hi All,

I'm having troubles in decoding the MapEntry. After logging in and successfully subscribing for multiple pairs I start receiving MMT_MARKET_BY_PRICE, so I get the payload and I iterate over the Map.

Here comes the problem! When I try to get the MapEntry Key the DataBuffer seems to be always blank.

Could you please which might be the issue? I attach here the code so that you can also take a look at the method calls that I'm using.

Thanks


// extracted just a piece of function needed for the troubleshotting
if(respMsg.getHintMask() & rfa::message::RespMsg::PayloadFlag) {
const rfa::common::Data& data = respMsg.getPayload();
if (data.isBlank()) {
return;
}

if(data.getDataType() == rfa::data::MapEnum) {
decodeMap(DateTime::now(),iInstrument.value(),static_cast<const rfa::data::Map&>(data));
} else{
LOG(ERROR) << "Cannot decode market data. Expexting a MapEntry to start decoding process";
}
}

decodeMap(const UtcNanos now, const std::size_t iInstrument, const rfa::data::Map& input) {
rfa::data::MapReadIterator it;
while(!it.off()){
modelUpdated |= decodeMapEntry(now,quoteModel,instrumentData,it.value());
it.forth();
  }
}

decodeMapEntry(const UtcNanos now,
ew::lp::QuoteModel& quoteModel,
const InstrumentData& instrumentData,
const rfa::data::MapEntry& input) {
const rfa::data::DataBuffer& buffer = static_cast<const rfa::data::DataBuffer&>(input.getKeyData());
if(buffer.isBlank()){
return false;
}
const std::string quoteID = buffer.getAsString().c_str();

switch(input.getAction()){
case rfa::data::MapEntry::Action::Update:
return updateQuote(now,"",quoteModel,instrumentData,static_cast<const rfa::data::FieldList&>(input.getData()));
case rfa::data::MapEntry::Action::Add:
return addQuote(now,"",quoteModel,instrumentData,static_cast<const rfa::data::FieldList&>(input.getData()));
case rfa::data::MapEntry::Action::Delete:
return deleteQuote("",quoteModel);
default:
LOG(ERROR) << "Unhandled MapEntry Action";
}

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.

7 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by zoya.farberov · Feb 17 at 08:36 PM

Hello @pcarrieri,

I am sorry if my explanation was not very clear.

I believe the issue is not that you are not decoding correctly. I believe you are requesting a combination of RIC and domain model from Elektron service that is not provided by the service.

To answer your question as asked, you can find the complete information in RFA C++ Developers Guides:

  • RDM Usage Guide - structure of MBP request and response fully explained
  • Developer Guide - details on requesting and decoding payloads.

In addition, to absorb the requesting and parsing of MbP quickly, I would either go over Consumer example with SDK, or go through step-by-step tutorial RFA C++ - Level 2 Refinitiv Data Model (RDM) data that also discusses requesting and decoding L2 data with RFA C++ and includes downloadable code example.

I hope this helps

Comment

People who like this

0 Show 0 · 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
REFINITIV
Answer by zoya.farberov · Feb 16 at 06:16 PM

Hello @pcarrieri,

Just a guess here.

I am looking at RFA8 SDK for C++.

Consumer example included with SDK is my preferred way to test MarketByPrice model subscription. When testing for MbP model, the method it uses to parse is DecomeMapMap and not DecodeMap. When decoding map of maps, it never arrives at DecodeMapEntry code as you appear to be executing.

You may wish to approach your custom requirement this way:

1. Run Consumer example included with RFA SDK with MarketByPrice model:

#\ConsumerClient_10\msgModelRequestType            = "marketPrice"
\ConsumerClient_10\msgModelRequestType            = "marketByPrice"

2. Confirm that are able to parse required RIC properly.

3. Incorporate the same handling into your custom consumer app.

---

If this is a new consumer application you are working on, I would suggest avoiding RFA C++ and looking at Refinitiv Realtime SDK - C/C++ for new development. RFA is currently a supported feature-complete API, while Refinitiv Realtime SDK (formerly Elektron) is open source, supporting cloud-based infra as well as many other new features, actively improved API, and it's ease of use tier, EMA, should greatly decrease your time-to-code requirement, as compared to RFA.


Comment

People who like this

0 Show 0 · 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
Answer by pcarrieri · Feb 17 at 09:10 AM

Hello @zoya.farberov,

I'm using Robust Foundation API - C++ Edition 8.2.0 and subscribed to RIC code EUR=.

The adapter is mostly done. I just need to figure out this issue so I'd prefer to avoid switching to another library.

I tried running Robust Foundation API for Java Sample, since there's no C++ Sample available for this library, and I'm able to retrieve the data. So the problem is in my code.

If you could please indicate me how the data needs to be decoded that would be great and really helpful.


Thanks


Comment

People who like this

0 Show 0 · 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
REFINITIV
Answer by zoya.farberov · Feb 17 at 04:38 PM

Hello @pcarrieri,

If you wish to consume RIC EUR=, I am assuming Refinitiv Realtime (fromerly Elektron) service, this RIC does not support MarketByPrice domain model. If you would like to consumer EUR=, please request a supported model, MarketPrice.

If you would like to consume MarketByPrice, the instrument would have to support this model, and your user to be permissioned for it.

If this is the case, nn your RFA C++ 8.2 SDK, please find Examples->Consumer.

This example supports common domain models, including Market By Price, examine and reuse MbP handling code.

Hope this helps?


Comment

People who like this

0 Show 0 · 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
Answer by pcarrieri · Feb 17 at 05:49 PM

Hi @zoya.farberov,

I've just got confirmed that I can subscribe for MarketByPrice to RIC EUR=. RFA SDK has a completely different way of sending and decoding the data respect to RFA Robust Foundation. If you could please provide an example for RFA Robust Foundation or at least indicate me the procedure to decode properly the data that would be great.


Thanks

Comment

People who like this

0 Show 0 · 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
REFINITIV
Answer by zoya.farberov · Feb 17 at 07:14 PM

Hi @pcarrieri,

I am glad to tell you how to verify this, however, I am afraid this will still not work as you expect:

  1. Verify domain MP, RIC EUR= with Consumer example.
    1. Open Consumer example project, found with your RFA SDK Examples -> Consumer and build it,
    2. In ExampleRFA.cfg, modify Connection_RSSL to point to your local infrastructure
\Connections\Connection_RSSL\connectionType                    = "RSSL"
\Connections\Connection_RSSL\rsslPort                         = "14002"
\Connections\Connection_RSSL\hostName                        = "YOUR_ADS_ADDRESS"

3. in Consumer.cfg, modify service, if your service name differs from the defined there by default, and itemList to EUR=

# Service name to be used to request
\ConsumerClient_10\service                        = "ELEKTRON_DD"

# Comma separated RIC List to be used to request
#\ConsumerClient_10\itemList                        = "TRI.N"
\ConsumerClient_10\itemList                        = "EUR="

4. Run the example to observe streaming data.

2. Verify domain MbP, RIC EUR= with Consumer example.

  1. in Consumer.cfg, modify domain to MbP
# RDM message type, see more detail in RDM.h for enumerations
\ConsumerClient_10\msgModelRequestType            = "marketPrice"
#\ConsumerClient_10\msgModelRequestType            = "marketByPrice"

2. Run the example, if you are subscribing Refiinitiv Real-Time feed, should observe "Not found" error, as MbP is not supported for EUR=

3. Optional step, only if you are permissioned for this content, verify MbP RIC = K.TO

1. Leave modelRequest type as is.

2. Modify itemList = "K.TO"

3. Run Consumer example again, to observe streaming MbP for K.TO instrument.

I have just tested as described above, with RFA 8.1 SDK C++, shared.

Let us know how this works for you.

Comment

People who like this

0 Show 0 · 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
Answer by pcarrieri · Feb 17 at 08:15 PM

Hello @zoya.farberov,

I understand that I can run this example in RFA SDK and make it work but that's not what I need. Even if I do that the problem for me is still there.

Really there's no way to get help about decoding payload with RFA Foundation? There's not an updated reference/example that helps clients code correctly/properly the adapter?


Thanks

Comment

People who like this

0 Show 0 · 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.

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

Related Questions

Visual Studio 2019 (16) support for RFA

RFA log error messages

rfa::common::RespStatus::SuspectEnum

"RFA - C++ Edition - 7.6.2.L1 - Windows static" not available?

Activate full message logs for RSSL connections in RFA C++

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