How could I replicate the request presented on the screenshot attached in Python?
For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
How could I replicate the request presented on the screenshot attached in Python?
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.df
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.
@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
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
@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