what is wrong with my futures request for BTC and ES?
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")
Answers
-
Thank you for reaching out to us.
You need to check the Notes in the response. I got this one.
"Notes": [ "Extraction Services Version 18.3.1.48082 (0d5e6bbb8e4a), Built Jan 10 2025 19:16:51\nUser ID: 9008895\nExtraction ID: 2000000878088820\nCorrelation ID: CiD/9008895/AAAAAA.094f1e321bbaead7/RA\nSchedule: 0x094f1e321bcaead7 (ID = 0x0000000000000000)\nInput List (1 items): (ID = 0x094f1e321bcaead7) Created: 03/10/2025 PM 03:27:59 Last Modified: 03/10/2025 PM 03:27:59\nReport Template: _OnD_0x094f1e321bcaead7 (ID = 0x094f1e321bdaead7) Created: 03/10/2025 PM 03:27:58 Last Modified: 03/10/2025 PM 03:27:58\nSchedule dispatched via message queue (0x094f1e321bcaead7)\nSchedule Time: 03/10/2025 PM 03:27:59\nProcessing started at 03/10/2025 PM 03:27:59\nProcessing completed successfully at 03/10/2025 PM 03:27:59\nExtraction finished at 03/10/2025 AM 08:27:59 UTC, with servers: xc81xkeuq13\nInstrument <RIC,BTCc1> expanded to 0 RICS.\n\n\nReport suppressed because there are no instruments\n" ]
If I changed the View to "LegacyLevel2", I can extract the data properly.
BTCc1 may not support the RawMarketByPrice. Please contact the Tick History support team directly via MyAccount to verify the data.
0 -
This works for 0#1YM: but not for 0#1ES or 0#1NQ.
def get_chain_ric_market_depth(futures_ric, query_start_date, query_end_date): """ Example futures ric: 0#1YM: """ json_blob = { "ExtractionRequest": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryMarketDepthExtractionRequest", "IdentifierList": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": [ { "Identifier": futures_ric, "IdentifierType": "ChainRIC" } ] }, "Condition": { "View": "RawMarketByPrice", "MessageTimeStampIn": "GmtUtc", "ReportDateRangeType": "Range", "QueryStartDate": query_start_date, "QueryEndDate": query_end_date, "DisplaySourceRIC": True } } } post_url = URL_BASE + "/Extractions/ExtractRaw" response = requests.post(post_url, headers = { "Authorization": f"Token {REFINITIV_AUTH_TOKEN}", "Content-Type": "application/json" }, json = json_blob) if response.status_code != 200: raise ValueError(f"Failed to fetch tick data: {response.status_code} - {response.text}") job_id = response.json().get("JobId") if not job_id: raise ValueError("No JobId returned. Check request parameters.") # Fetch extracted data data_url = f"{URL_BASE}/Extractions/RawExtractionResults('{job_id}')/$value" data_response = requests.get(data_url, headers = { "Authorization": f"Token {REFINITIV_AUTH_TOKEN}" }, stream = True) data_response.raise_for_status() return data_response
How do I get futures market depth data for Nasdaq and S&P?
0 -
0#1ES and 0#1NQ are invalid RICs.
Typically, you can check the Notes in the response for the problem.
"Notes": [ "All identifiers were invalid. No extraction performed." ],
Please contact the Tick History support team directly via MyAccount for the RICs that can provide the futures market depth data for Nasdaq and S&P.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛