question

Upvotes
Accepted
5 2 2 2

How to configure FID search option for TickHistoryRaw Requests in .NET API?

Hi all,


In a TickHistoryRaw Request sent via the .NET API, is it possible to configure the FID search option below? (default value is "AND" and I would like to change it to "OR")

There has been a similar question asked previously and the answer suggests it is possible, however, in the .NET API, the class TickHistoryRawCondition does not seem to have "FidListOperator" as a field or anything similar that would allow me to change that option.


Kind Regards

tick-history-rest-apic#.net
1588082292888.png (20.9 KiB)
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.

Upvote
Accepted
32.2k 41 11 20

Hi @Vlad,

I see it on TickHistoryRawCondition

public FidListOperators FidListOperator { get; set; }

However, I see that you do not see it on your side.

Could you please download the latest version of .Net DSS REST Examples app from Downloads?

I just did a quick modification in my .Net example:

 Condition = new TickHistoryRawCondition()
      {
           DaysAgo = null,
           MessageTimeStampIn = TickHistoryTimeOptions.GmtUtc,
           QueryEndDate = DateTime.UtcNow,
           QueryStartDate = DateTime.UtcNow - TimeSpan.FromDays(10),
           ReportDateRangeType = ReportDateRangeType.Range,
           ExtractBy = TickHistoryExtractByMode.Ric,
           SortBy = TickHistorySort.SingleByRic,
           DomainCode = TickHistoryRawDomain.MarketPrice,
           DisplaySourceRIC = false,
           Fids = "25,6",
           FidListOperator = FidListOperators.OR
      }                 

It worked as expected for me

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.

Hi @zoya.farberov,

I have downloaded the latest version and it works fine. It was me all along using an older version of the API.

Thank you very much for all your help.


Kind Regards



Upvote
32.2k 41 11 20

Hello @Vlad,

I understand the question is how to submit a selected fid list into TickHistoryRaw request.

In DSS API Examples, Create:TickHistoryRaw, I see an example how to submit fids:

var extractionRequest = new TickHistoryRawExtractionRequest()
            {
                IdentifierList = new InstrumentIdentifierList()
                {
                    InstrumentIdentifiers = new[]
                    {
                        // Notice the time ranges specified with the instruments
                        new HistoricalInstrumentIdentifier { Identifier = "IBM.N", IdentifierType = IdentifierType.Ric, RangeStart = timeRange1Start, RangeEnd = timeRange1End },
                        new HistoricalInstrumentIdentifier { Identifier = "KO.N", IdentifierType = IdentifierType.Ric, RangeStart = timeRange2Start, RangeEnd = timeRange2End }
                    }
                },
                Condition = new TickHistoryRawCondition()
                {
                    DaysAgo = null,
                    MessageTimeStampIn = TickHistoryTimeOptions.GmtUtc,
                    QueryEndDate = null,  // Note that since the time ranges are specified in the list, there is no range specified in the condition.
                    QueryStartDate = null,
                    ReportDateRangeType = ReportDateRangeType.PerIdentifier,
                    ExtractBy = TickHistoryExtractByMode.Ric,
                    SortBy = TickHistorySort.SingleByRic,
                    DomainCode = TickHistoryRawDomain.MarketPrice,
                    DisplaySourceRIC = false,
                    Fids = "25"
                }
            };

This list can be comma-delimited as per other discussion thread you mention:

"Fids": "275,393,875,1010"

In DSS API Reference Tree I also see FidListOperator defined as either AND or OR.

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.

Hi @zoya.farberov,

Thank you for your answer. My request looks very similar to the example you attached:

where "fids" is a string of comma-delimited values, as you suggested. This works fine.

However, the request uses the default value of "FidListOperator", which is "AND". I would like to change this to "OR" in my request, and although it does exist in the API reference tree you pointed me to, "FidListOperator" is not available as a public field in TickHistoryRawCondition:

Therefore, I cannot change it. My question was whether it is possible for me to change the "FidListOperator" in my request.


Kind Regards

1588092585797.png (15.8 KiB)
1588092884106.png (37.8 KiB)

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.