question

Upvotes
Accepted
0 0 1 2

How can we apply a filter in quick consumer application in RFA.net to get only Ask/Bid Prices.

Sample code:

FieldList fieldList = payload as FieldList;
///Console.WriteLine("FieldList's entry count: " + fieldList.StandardDataCount);
short fieldId;
foreach (FieldEntry fieldEntry in fieldList)
{
fieldId = fieldEntry.FieldID;
try
{
RDMFidDef fidDef = rdmFieldDictionary.GetFidDef(fieldId);

}

@moragodkrit

treprfarfa-apiconsumerfilter
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
13k 32 12 18

There are two ways to do this:

a. In the foreach iterator, compare each fieldId to the one you desire (BID, ASK) and ignore others.

b. Send a view request, whereby only the fids that are requested are returned in the update messages. This capability is a licenseable feature, and has to be enabled on your ADS. Look at StarterConsumer_BatchView example for details.

icon clock
10 |1500

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

Currently i am using first approach only. I am filtering out based on the Field names like BID or ASK but i am filtering after information coming from server.

Can i do the filtering before sending the request like based on Field ID (22 or 25) for Ask or BID? Will this number be changed or it will remain same?

>> Can i do the filtering before sending the request ...

This is the View feature, presented in the option (b) above.

Click below to post an Idea Post Idea