Hello,
I am using API rest in python to extract best bid/offer quote. Could you please tell me if it is possible to change the time step of the extraction? Because I want to get only the first quote of each minute. If so, what field should I add in my body request?
Thanks for your support!
Eric
PS : I am not sure if I posted on the right forum, my apologize
PS: Here is my body code using json:
import json
import datetime
body = json.dumps({
"ExtractionRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
"ContentFieldNames": ['Ask Price',
'Ask Size',
'Bid Price',
'Bid Size',
'Number of Buyers',
'Number of Sellers'],
"IdentifierList": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [{'Identifier': 'FR0013516549=MY', 'IdentifierType': 'Ric'}],
"ValidationOptions": {
"AllowHistoricalInstruments": True,
"AllowInactiveInstruments": True,
"AllowOpenAccessInstruments": False
},
"UseUserPreferencesForValidationOptions": False
},
"Condition": {
"ReportDateRangeType" : "Range",
"QueryStartDate": datetime.strptime('07/10/2020', "%d/%m/%Y").date().strftime("%Y-%m-%d")+"T00:00:00.000Z",
"QueryEndDate": datetime.strptime('07/10/2020', "%d/%m/%Y").date().strftime("%Y-%m-%d")+"T23:00:00.000Z",
"View": "NormalizedLL2",
"NumberOfLevels": 1,
"SortBy": "SingleByRic",
"MessageTimeStampIn": "GmtUtc"
}
}
})