RemoveSubscriptions

class saxo_openapi.endpoints.eventnotificationservices.clientactivities.RemoveSubscriptions(ContextId, params=None)

Remove multiple/all subscriptions for the current session on this resource and free all resources on the server.

ENDPOINT = 'openapi/ens/v1/activities/subscriptions/{ContextId}'
EXPECTED_STATUS = 202
METHOD = 'DELETE'
RESPONSE_DATA = None
__init__(ContextId, params=None)

Instantiate a RemoveSubscriptions request.

Parameters:
  • ContextId (string (required)) – the ContextId of the subscription
  • params (dict (optional)) – dict with querystring parameters

params example:

params =
    {
      "Tag": "PAGE2"
    }
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.eventnotificationservices as ens
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> ContextId = ...
>>> r = ens.clientactivities.RemoveSubscriptions(ContextId,
...                                              params=params)
>>> client.request(r)
>>> assert r.status_code == r.expected_status

No data is returned.

expected_status
response

response - get the response of the request.

status_code