question

Upvotes
Accepted
0 1 2 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 512.0 KiB each and 1.0 MiB total.

Monitored by @moragodkrit

@akash.mundra

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
22k 59 14 21

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 512.0 KiB each and 1.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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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