Getting a list of all RIC codes for Equity Index Options
Hello Developers,
Notes: I'm using the python API and have access to Refinitiv Tickhistory.
Getting a list of all option RIC codes (with expiration date and strike price) for S&P 500, current + historical.
Right now, I am using the following:
UnderlyingRIC = '.SPX' for S&P 500
request_header = { 'Prefer':'respond-async;odata.maxpagesize=25000',
'Content-Type':'application/json',
'Authorization': 'token {}'.format(auth_token)
}
request_body = { 'SearchRequest': { '@odata.context': 'http://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#DataScope.Select.Api.Search.FuturesAndOptionsSearchRequest',
'FuturesAndOptionsType': 'Options',
'UnderlyingRic': '.SPX',
'ExpirationDate': {'@odata.type': '#DataScope.Select.Api.Search.DateValueComparison',
'ComparisonOperator': 'GreaterThanEquals',
'Value': '1995-01-01'
}
}
}
data_request = requests.post('https://selectapi.datascope.refinitiv.com/RestApi/v1/Search/FuturesAndOptionsSearch',
json = request_body, headers = request_header)
It gives me the option meta data for all live contracts + historical contracts from October 2017 (which I guess implies a 5 year rule). However, I want this information for all options on S&P 500 since 1996 (which is when we're told TRTH starts) can you please help?
I saw previous questions here:
https://community.developers.refinitiv.com/questions/51893/need-details-regarding-options-ric-construction.html including something I had asked earlier https://community.developers.refinitiv.com/questions/95314/getting-information-for-ric-code-of-an-option-via.html, but I am looking for all expired contracts because I do not know the specific contracts available. I understand how option Option RICs are constructed, but my understanding is that there are conflicts since the number of bits reserved for strike price is not well-defined (XXXXX20000) can mean a strike of 200 or 2000 depending on the context. Which is why we need specific RIC codes - Expiration dates - Strike Price mappings.
The code above works fine for futures (in that it gives me a list of all futures RIC on SPX, etc) but for options only returns last 5 years. Lastly, I am mindful of the fact that the data is stored in chunks and I run queries sequentially until the '@odata.nextlink' flag exists and so this is all there exists.
Thank you very much!
Best,
Neel.
Best Answer
-
Hello @ns3481 ,
Thank you for the clarification. To better understand the results, I have run some verifications via DSS GUI.
First, run the same search, and sorted the results on Expiration Date:
the contents start with 2017.
However, the default result size via GUI is just 2000. So I have further run the following request to verify if any results are available prior to 2017:
Consequently, I believe this content to be available starting from 2017.
However, I suggest to additionally verify this content availability with Refinitiv content experts directly at Refinitiv Helpdesk Online -> Content -> DSS.
Hope that this information is of help
2
Answers
-
Hello @ns3481 ,
Please try this request on your side:
{{protocol}}{{host}}{{api}}Search/FuturesAndOptionsSearch
{
"SearchRequest": {
"@odata.context": "http://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#DataScope.Select.Api.Search.FuturesAndOptionsSearchRequest",
"FuturesAndOptionsType": "Options",
"UnderlyingRic": ".SPX",
"AssetStatus":"Inactive",
"ExpirationDate": {"@odata.type": "#DataScope.Select.Api.Search.DateValueComparison",
"ComparisonOperator": "GreaterThanEquals",
"Value": "1995-01-01"
}
}
}perhaps this is what you are looking for?
2 -
Hello @zoya faberov,
Thank you very much for your quick response. I had tried this earlier. The problem is with the inactive flag, I get only the inactive contracts on S&P 500 (from October 2017-Sept 2022), but not before. I need information on all historical contracts from 1996-.
Thank you very much.
Best,
Neel.
0 -
Thanks Zoya. I'll reach out to the team as you suggest.
Best,
Neel.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛