Providing Fids in TickHistoryRawExtractionRequest Rest Api resulting null

I am facing situation where when i provide certain combination of Fids it returning result as null without any data at all. I am using TickHistoryRawExtractionRequest Rest Api. I always want to extract previous day data.

Below is the combination of Fids i am providing:

requestBody = {
"ExtractionRequest": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
"IdentifierList": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [{
"Identifier": "STXEc1",
"IdentifierType": "Ric"
}]
},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "2021-09-02T12:00:00.000Z",
"QueryEndDate": "2021-09-02T12:10:00.000Z",
"Fids": "6,22,25,30,31,77,178,183,184,1021,4465,11872,12770,14265,14266",
"ExtractBy": "Ric",
"SortBy": "SingleByRic",
"DomainCode": "MarketPrice",
"DisplaySourceRIC": "true"
}
}
}


Now for example when i try to use below combination of Fids in the same request, i am getting data:

requestBody = {
"ExtractionRequest": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
"IdentifierList": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [{
"Identifier": "STXEc1",
"IdentifierType": "Ric"
}]
},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "2021-09-02T12:00:00.000Z",
"QueryEndDate": "2021-09-02T12:10:00.000Z",
"Fids": "22,30,25,31,14265,1021",
"ExtractBy": "Ric",
"SortBy": "SingleByRic",
"DomainCode": "MarketPrice",
"DisplaySourceRIC": "true"
}
}
}


I dont understand this issue. What is the problem with the combinatioin of Fids and why it has something to do output data ? I need to get data based on the combination of Fids which i need.


Best Answer

  • rahul.deshmukh
    rahul.deshmukh Contributor
    Answer ✓

    @Gurpreet Below is the condition i changed in the request and only added "FidListOperator": "OR"


    requestBody = {
    "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
    "IdentifierList": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
    "InstrumentIdentifiers": [{
    "Identifier": "STXEc1",
    "IdentifierType": "Ric"
    }]
    },
    "Condition": {
    "MessageTimeStampIn": "GmtUtc",
    "ReportDateRangeType": "Range",
    "QueryStartDate": yesterday_start_dt.strftime(format2),
    "QueryEndDate": yesterday_end_dt.strftime(format2),
    "Fids": "6,22,25,30,31,77,178,183,184,1021,4465,11872,12770,14265,14266",
    "ExtractBy": "Ric",
    "SortBy": "SingleByRic",
    "DomainCode": "MarketPrice",
    "DisplaySourceRIC": "true",
    "FidListOperator": "OR"
    }
    }
    }

Answers