I am looking at an extraction request based upon:
{
"ExtractionRequest": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
"IdentifierList": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [
{
"Identifier": "ESH25",
"IdentifierType": "Ric"
},
{
"Identifier": "ESM25",
"IdentifierType": "Ric"
},
{
"Identifier": "ESU25",
"IdentifierType": "Ric"
}
],
"ValidationOptions": {
"AllowHistoricalInstruments": true
},
"UseUserPreferencesForValidationOptions": false
},
"Condition": {
"MessageTimeStampIn": "LocalExchangeTime",
"ReportDateRangeType": "Range",
"QueryStartDate": "2025-01-16T17:00:00-06:00",
"QueryEndDate": "2025-01-17T16:00:00-06:00",
"DisplaySourceRIC": true
}
}
}
then download extracted file using the jobid, the header for the request is
{
"Content-Type": "application/json",
"Accept-Encoding": "gzip"
}
Is this the correct header? Or should Accept-Encoding go in the original extraction request?
So I am expecting a gzip file, is that correct?
The value of:
int(response.headers['Content-Length'])
Does not match the actual file size, do you know why?
I am using the "Content-length" to validate what has been downloaded. If the file has been downloaded correctly its file size should in theory match the content length. Can you confirm if my understanding is correct?
An alternative is to use the "Content-MD5" but this appears to be missing from the response headers. Do you know how I obtain this, then I can validate against the checksum?