This is giving me a 200 but I'm not getting any futures data.
Where can I get a list of futures contracts and the months and the RIC btw? Where can I get this list?
This is my code. I'm getting a 200 but no order book data for this futures.
def get_tick_history(ticker, query_start_date, query_end_date):
json_blob = {
"ExtractionRequest": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryMarketDepthExtractionRequest",
"IdentifierList": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [{
"Identifier": f"{ticker}",
"IdentifierType": "Ric",
}],
"ValidationOptions": {
"AllowHistoricalInstruments": "true"
},
"UseUserPreferencesForValidationOptions": "false",
},
"Condition": {
"View": "RawMarketByPrice",
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"DisplaySourceRIC": "true",
"DateRangeTimeZone": "UTC",
"QueryStartDate": query_start_date,
"QueryEndDate": query_end_date,
},
}
}
post_url = URL_BASE + "/Extractions/ExtractRaw"
request_response = post_request_with_auth(post_url, REFINITIV_AUTH_TOKEN, json_blob)
job_id = request_response.json()["JobId"]
logger.info("Starting CSV download...")
data_response = requests.get(URL_BASE + f"/Extractions/RawExtractionResults('{job_id}')/$value", headers = {
"Authorization": f"Token {REFINITIV_AUTH_TOKEN}"
}, stream = True)
data_response.raise_for_status()
return data_response
# Example usage:
if __name__ == "__main__":
# intraday_data = get_embargo_info("FCX")
# if intraday_data:
# print(json.dumps(intraday_data, indent=4))
# get_sp500()
get_tick_history("BTCc1", "2025-03-01T09:30:00Z", "2025-03-06T16:00:00Z")