OptionsChainSubscriptionCreate¶
-
class
saxo_openapi.endpoints.trading.optionschain.
OptionsChainSubscriptionCreate
(data)¶ Create an active options chain subscription.
-
ENDPOINT
= 'openapi/trade/v1/optionschain/subscriptions'¶
-
EXPECTED_STATUS
= 201¶
-
METHOD
= 'POST'¶
-
__init__
(data)¶ Instantiate a OptionsChainSubscriptionCreate request.
Parameters: data (dict) – the dict representing the parameters of the request body. >>> import saxo_openapi >>> import saxo_openapi.endpoints.trading as tr >>> import json >>> client = saxo_openapi.API(access_token=...) >>> data = { "Arguments": { "AccountKey": "LZTc7DdejXODf-WSl2aCyQ==", "AssetType": "StockIndexOption", "Expiries": [ { "Index": 1, "StrikeStartIndex": 0 } ], "Identifier": 18, "MaxStrikesPerExpiry": 3 }, "ContextId": "20190411051355700", "ReferenceId": "C0165000", "RefreshRate": 1000 }
>>> r = tr.optionschain.OptionsChainSubscriptionCreate(data=data) >>> client.request(r) >>> print(json.dumps(r.response, indent=4))
Output:
{ "Arguments": { "AccountKey": "LZTc7DdejXODf-WSl2aCyQ==", "AssetType": "StockIndexOption", "Expiries": [ { "Index": 1, "StrikeStartIndex": 0 } ], "Identifier": 18, "MaxStrikesPerExpiry": 3 }, "ContextId": "20190411051355700", "ReferenceId": "C0165000", "RefreshRate": 1000 }
-
expected_status
¶
-
response
¶ response - get the response of the request.
-
status_code
¶
-