Is there a possibility to retrieve options via Rsearch EIKON Data API (Python)?
How could I replicate the request presented on the screenshot attached in Python?
Best Answer
-
Try the following:
import refinitiv.dataplatform as rdp
...
response = rdp.Search.search(
filter = "UnderlyingQuoteRIC xeq 'SPY' and IsChain eq false and \
CallPutOption xeq 'Put' and ExerciseStyle xeq 'A' and \
PeriodicityCode eq 'M' and ExpiryDate ge 2022-04-01 and \
ExpiryDate le 2022-04-30",
order_by = "StrikePrice",
top = 2000,
select = "StrikePrice, ExpiryDate, RIC"
)
response.data.df1
Answers
-
I could not install this because when I try pip install refinitiv-dataplatform conda shows me refinitiv-dataplatform 1.0.0a11 requires httpx>=0.18.0, but you have httpx 0.14.2 which is incompatible. I installed 0.14.2 because it was the only solution for the following problem:
Error: no proxy address identified. Check if Eikon Desktop or Eikon API Proxy is running.
0 -
https://community.developers.refinitiv.com/questions/66494/eikon-data-api-error-no-proxy-address-identified.html - please look at the answers
0 -
@susskaya.anita you can also use try pip install httpx==0.19.0 and see if that works on your setup.0
-
For now I have the following problem:
0 -
@susskaya.anita Does the code run with httpx==0.14.2?0
-
no it is not because as I told you previously I could not install refinitiv dataplatform when I have 0.14.2. When I have 0.18 I could do it but the code then does not work.0
-
@susskaya.anita what version of nest-asynchio lib are you running?
0 -
1.5.1 - it is the version of nest asynchio0
-
@susskaya.anita Please also post the full code including the import statements and the appkey setting (you can remove your actual app key for security reasons). thx
0 -
import eikon as ek # the Eikon Python wrapper package
import refinitiv.dataplatform as rdp
import numpy as np # NumPy
import pandas as pd # pandas
import configparser as cp
import sys
ek.set_app_key('')
response = rdp.Search.search(
filter = "UnderlyingQuoteRIC xeq 'SPY' and IsChain eq false and \
CallPutOption xeq 'Put' and ExerciseStyle xeq 'A' and \
PeriodicityCode eq 'M' and ExpiryDate ge 2022-04-01 and \
ExpiryDate le 2022-04-30",
order_by = "StrikePrice",
top = 2000,
select = "StrikePrice, ExpiryDate, RIC"
)
response.data.df
0 -
another code is working properly
0 -
@susskaya.anita so you need to open the rdp desktop session first - please add the following line below your ek.set_app_key(''):
rdp.open_desktop_session('YOUR APP KEY HERE')
and try running thx
1 -
It worked. Thank you so much for your help and attention!1
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 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
- 370 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛