timebar persistence

I did ask this question earlier, however the response received did not solve the problem.

in the code below, when i use, "TimebarPersistence": "false", i still receive carried over values (i would not expect to see quotes on Saturday and Sunday). note: ticker1 is defined as "JPY="

requestUrl='https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/ExtractRaw'

requestHeaders={"Prefer":"respond-async","Content-Type":"application/json","Authorization": "token " + token}

requestBody={
"ExtractionRequest": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
"ContentFieldNames": ["Close Ask","Close Bid","High Ask","High Bid","Low Ask","Low Bid","No. Asks","No. Bids",
"Open Ask","Open Bid"],
"IdentifierList": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [{"Identifier": ticker1,"IdentifierType": "Ric"},
#{"Identifier": ticker2,"IdentifierType": "Ric"}
],
"UseUserPreferencesForValidationOptions": "false"
},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate":QueryStartDate ,
"QueryEndDate": QueryEndDate,
"SummaryInterval": "OneMinute",
"TimebarPersistence": "false",
"DisplaySourceRIC": "true"
}
}
}

r2 = requests.post(requestUrl, json=requestBody,headers=requestHeaders)

#Display the HTTP status of the response
#Initial response status (after approximately 30 seconds wait) is usually 202
status_code = r2.status_code
print ("HTTP status of the response: " + str(status_code))

if status_code == 200 :
r2Json = json.loads(r2.text.encode('ascii', 'ignore'))
jobId = r2Json["JobId"]
print ('\njobId: ' + jobId + '\n')
notes = r2Json["Notes"]
print ('Extraction notes:\n' + notes[0])

Best Answer

  • Jirapongse
    Answer ✓

    @jolin.majmin

    Thank you for reaching out to us.

    I checked with the following request.

    {
      "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
        "ContentFieldNames": [
          "Close Ask",
          "Close Bid",
          "High",
          "High Ask",
          "High Bid",
          "Last",
          "Low",
          "Low Ask",
          "Low Bid",
          "No. Asks",
          "No. Bids",
          "No. Trades",
          "Open",
          "Open Ask",
          "Open Bid",
          "Volume"
        ],
        "IdentifierList": {
          "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",  
          "InstrumentIdentifiers": [{
            "Identifier": "JPY=",
            "IdentifierType": "Ric"
          }],
          "ValidationOptions": null,
          "UseUserPreferencesForValidationOptions": false
        },
        "Condition": {
          "MessageTimeStampIn": "GmtUtc",
          "ReportDateRangeType": "Range",
          "QueryStartDate": "2024-04-04T00:00:00.000Z",
          "QueryEndDate": "2024-04-10T00:00:00.000Z",
          "SummaryInterval": "OneMinute",
          "TimebarPersistence": false,
          "DisplaySourceRIC": true
        }
      }
    }

    The output is:

    1713338670137.png

    To verify the retrieved content, please contact the Tick History support team directly via MyRefinitiv. The support can check the request message and verify the retrieved content.

Answers

  • Thank you, I see ""ValidationOptions": null, was added...what does this field do?

  • Also, note "ValidationOptions": "null", results in

    HTTP status of the response: 400
  • @jolin.majmin

    The request is used in Postman. It could be None in Python. This is a property to validate instruments.