"Historical reference request" is not returning any data

I'm trying to do an historical reference request but I'm getting nothing returned. This is happening with every product code I'm trying. It stopped working yesterday. I'm the only one running the extraction, so it's not because there's more than one request being made at a time. My request code is below. Just for reference, the Product ric I'm using at the moment is LCOmmV1.


requestHeaders={

"Prefer":"respond-async",

"Content-Type":"application/json",

"Authorization": "token " + token

}

HistRefUrl = 'https://selectapi.datascope.refinitiv.com/RestApi/v1//Extractions/ExtractWithNotes';

requestBody={

"ExtractionRequest": {

"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.HistoricalReferenceExtractionRequest",

"ContentFieldNames": [

"RIC",

"Start date",

"Change Date",

"Expiration Date"

],

"IdentifierList": {

"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",

"InstrumentIdentifiers": [

{

"Identifier": "LCOmmV1",

"IdentifierType": "Ric"

}

],

"ValidationOptions": {

"AllowHistoricalInstruments": 'true'

},

"UseUserPreferencesForValidationOptions": 'false'

},

"Condition": {

"StartDate": "2015-01-01T00:00:00.000Z",

"EndDate": todaysDate + "T" + "00:00:00.000Z"

}

}

}

Best Answer

  • sanchezTJUK
    sanchezTJUK Explorer
    Answer ✓

    Thanks for your reply Zoya. I think the problem has been that I've not been re-polling the response from the server. It seems to be working now.

Answers

  • zoya faberov
    zoya faberov ✭✭✭✭✭

    Hello @sanchezTJUK .

    Try:

    {
    "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.HistoricalReferenceExtractionRequest",
    "ContentFieldNames": [
    "RIC",
    "Start date",
    "Change Date",
    "Expiration Date"
    ],
    "IdentifierList": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
    "InstrumentIdentifiers": [
    {"Identifier": "LCOmmV1", "IdentifierType": "Ric" }
    ],
    "ValidationOptions": {
    "AllowHistoricalInstruments": true
    },
    "UseUserPreferencesForValidationOptions": false
    },
    "Condition": {
    "StartDate": "2000-01-01T00:00:00.000Z",
    "EndDate": "2021-08-25T00:00:00.000Z"
    }

    }

    }

    From my testing, this results in:

    RIC,Start date,Change Date,Expiration Date,User Defined Identifier,User Defined Identifier2,User Defined Identifier3,User Defined Identifier4,User Defined Identifier5,User Defined Identifier6
    LCOmmV1,,2021/05/02,2021/08/31,,,,,,RIC|LCOmmV