ContractoptionSpaces¶
-
class
saxo_openapi.endpoints.referencedata.instruments.
ContractoptionSpaces
(OptionRootId, params=None)¶ Get contractoption data.
-
ENDPOINT
= 'openapi/ref/v1/instruments/contractoptionspaces/{OptionRootId}'¶
-
EXPECTED_STATUS
= 200¶
-
METHOD
= 'GET'¶
-
__init__
(OptionRootId, params=None)¶ Instantiate a ContractoptionSpaces request.
Parameters: - OptionRootId (string (required)) – the OptionRootId
- params (dict (optional)) – dict representing querystring parameters
>>> import json >>> import saxo_openapi >>> import saxo_openapi.endpoints.referencedata as rd >>> client = saxo_openapi.API(access_token=...) >>> OptionRootId = 231 >>> params = { "ExpiryDates": "2019-05-01", "OptionSpaceSegment": "SpecificDates" }
>>> r = rd.instruments.ContractoptionSpaces( ... OptionRootId=OptionRootId, ... params=params) >>> client.request(r) >>> print(json.dumps(r.response, indent=4))
Output:
{ "AmountDecimals": 0, "AssetType": "StockOption", "CanParticipateInMultiLegOrder": false, "ContractSize": 100, "CurrencyCode": "EUR", "DefaultAmount": 1, "DefaultExpiry": "2019-04-18T00:00:00Z", "DefaultOption": { "PutCall": "Call", "StrikePrice": 27, "Uic": 11897720, "UnderlyingUic": 16350 }, "Description": "Royal Dutch Shell Plc A", "Exchange": { "CountryCode": "NL", "ExchangeId": "EUR_AMS2", "Name": "Euronext Equity & Index Derivatives - AMS" }, "ExerciseStyle": "American", "Format": { "Decimals": 2, "OrderDecimals": 2, "StrikeDecimals": 3 }, "GroupId": 0, "IncrementSize": 1, "IsTradable": true, "LotSize": 1, "LotSizeType": "OddLotsNotAllowed", "OptionRootId": 231, "OptionSpace": [ { "DisplayDaysToExpiry": 0, "DisplayExpiry": "2019-03-01", "Expiry": "2019-03-15", "LastTradeDate": "2019-03-15T16:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 24, "DisplayExpiry": "2019-04-01", "Expiry": "2019-04-18", "LastTradeDate": "2019-04-18T15:30:00.000000Z", "SpecificOptions": [ { "PutCall": "Call", "StrikePrice": 24, "Uic": 11897711, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 25, "Uic": 11897712, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 26.5, "Uic": 11897717, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 26, "Uic": 11897719, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 27, "Uic": 11897720, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 25, "Uic": 11897721, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 24, "Uic": 11897722, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 26, "Uic": 11897723, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 28, "Uic": 11897724, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 30, "Uic": 11897725, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 27.5, "Uic": 11897728, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 29, "Uic": 11897729, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 26.5, "Uic": 11897730, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 27, "Uic": 11897731, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 27.5, "Uic": 11897732, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 28, "Uic": 11897733, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 30, "Uic": 11897734, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 29, "Uic": 11897735, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 23, "Uic": 11900544, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 23, "Uic": 11900558, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 25.5, "Uic": 11903077, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 25.5, "Uic": 11903078, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 22, "Uic": 11949922, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 22, "Uic": 11949924, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 32, "Uic": 12003078, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 32, "Uic": 12003081, "UnderlyingUic": 16350 }, { "PutCall": "Call", "StrikePrice": 28.5, "Uic": 12007474, "UnderlyingUic": 16350 }, { "PutCall": "Put", "StrikePrice": 28.5, "Uic": 12007478, "UnderlyingUic": 16350 } ], "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 54, "DisplayExpiry": "2019-05-01", "Expiry": "2019-05-17", "LastTradeDate": "2019-05-17T15:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 85, "DisplayExpiry": "2019-06-01", "Expiry": "2019-06-21", "LastTradeDate": "2019-06-21T15:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 177, "DisplayExpiry": "2019-09-01", "Expiry": "2019-09-20", "LastTradeDate": "2019-09-20T15:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 268, "DisplayExpiry": "2019-12-01", "Expiry": "2019-12-20", "LastTradeDate": "2019-12-20T16:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 451, "DisplayExpiry": "2020-06-01", "Expiry": "2020-06-19", "LastTradeDate": "2020-06-19T16:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 634, "DisplayExpiry": "2020-12-01", "Expiry": "2020-12-18", "LastTradeDate": "2020-12-18T16:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 999, "DisplayExpiry": "2021-12-01", "Expiry": "2021-12-17", "LastTradeDate": "2021-12-17T16:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 1364, "DisplayExpiry": "2022-12-01", "Expiry": "2022-12-16", "LastTradeDate": "2022-12-16T16:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } }, { "DisplayDaysToExpiry": 1729, "DisplayExpiry": "2023-12-01", "Expiry": "2023-12-15", "LastTradeDate": "2023-12-15T16:30:00.000000Z", "TickSizeScheme": { "DefaultTickSize": 0.05, "Elements": [ { "HighPrice": 5, "TickSize": 0.01 } ] } } ], "OrderDistances": { "EntryDefaultDistance": 0, "EntryDefaultDistanceType": "Percentage", "StopLimitDefaultDistance": 5, "StopLimitDefaultDistanceType": "Pips", "StopLossDefaultDistance": 0.5, "StopLossDefaultDistanceType": "Percentage", "StopLossDefaultEnabled": false, "StopLossDefaultOrderType": "Stop", "TakeProfitDefaultDistance": 0.5, "TakeProfitDefaultDistanceType": "Percentage", "TakeProfitDefaultEnabled": false }, "PriceToContractFactor": 100, "RelatedInstruments": [ { "AssetType": "CfdOnStock", "Uic": 16350 }, { "AssetType": "Stock", "Uic": 16350 } ], "RelatedOptionRoots": [], "SettlementStyle": "PhysicalDelivery", "StandardAmounts": [ 1, 5, 10, 25, 50, 100, 500, 1000 ], "SupportedOrderTypes": [ "Limit" ], "Symbol": "RDSA:xams", "TickSize": 0.01, "TradableOn": [ "9300675" ], "UnderlyingAssetType": "Stock" }
-
expected_status
¶
-
response
¶ response - get the response of the request.
-
status_code
¶
-