With this python code using RDP, I am trying to sent 100 requests in one go (the max this endpoint accepts). How can I entre several dictionaries in `extended_params`?
definition = rd.content.ipa.financial_contracts.option.Definition( # IPA = instrument Pricing Analytics instrument_code=instrument, underlying_type=rd.content.ipa.financial_contracts.option.UnderlyingType.ETI, # ETI = Exchange Traded Instrument fields=requestFields, extended_params=ATuniverseL) response = definition.get_data()
AttributeError: 'list' object has no attribute 'item
FYI:
instrument, requestFields
('STXE42500C3.EX', ['MarketValueInDealCcy', 'RiskFreeRatePercent', 'UnderlyingPrice', 'PricingModelType', 'DividendType', 'VolatilityType', 'UnderlyingTimeStamp', 'ReportCcy', 'VolatilityType', 'Volatility', 'DeltaPercent', 'GammaPercent', 'RhoPercent', 'ThetaPercent', 'VegaPercent'])
ATuniverseL[0]
[{'instrumentType': 'Option', 'instrumentDefinition': {'buySell': 'Buy', 'underlyingType': 'Eti', 'instrumentCode': 'STXE42500C3.EX', 'strike': '4250'}, 'pricingParameters': {'marketValueInDealCcy': '62.0', 'riskFreeRatePercent': '2.621', 'underlyingPrice': '4180.51', 'pricingModelType': 'BlackScholes', 'dividendType': 'ImpliedYield', 'volatilityType': 'Implied', 'underlyingTimeStamp': 'Default', 'reportCcy': 'EUR'}}, {'instrumentType': 'Option', 'instrumentDefinition': {'buySell': 'Buy', 'underlyingType': 'Eti', 'instrumentCode': 'STXE42500C3.EX', 'strike': '4250'}, 'pricingParameters': {'marketValueInDealCcy': '61.8', 'riskFreeRatePercent': '2.621', 'underlyingPrice': '4188.74', 'pricingModelType': 'BlackScholes', 'dividendType': 'ImpliedYield', 'volatilityType': 'Implied', 'underlyingTimeStamp': 'Default', 'reportCcy': 'EUR'}}]
I tried to play round with the library, but there seem not to be a way to have multiple values for - say - market_value_in_deal_ccy:
import refinitiv.data.content.ipa.financial_contracts.option as option definition = option.Definition( # IPA = instrument Pricing Analytics instrument_code=instrument, underlying_type=option.UnderlyingType.ETI, # ETI = Exchange Traded Instrument, pricing_parameters=option._option_pricing_parameters.PricingParameters( market_value_in_deal_ccy=62.0), fields=requestFields) response = definition.get_data()
And apparently the only available types for this argument are floats, lo list, tuples or dictionaries that are itteratable:
market_value_in_deal_ccy : float, optional