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")

image

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

Best Answer

  • zoya faberov
    zoya faberov ✭✭✭✭✭
    Answer ✓

    Hi @vlad_deprecated_0,

    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

Answers

  • zoya faberov
    zoya faberov ✭✭✭✭✭

    Hello @vlad_deprecated_0,

    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.

  • Hi @zoya faberov

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

    image

    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:

    image

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


    Kind Regards

  • 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