UpdatePriceAlert

class saxo_openapi.endpoints.valueadd.pricealerts.UpdatePriceAlert(AlertDefinitionId, data)

Update a price alert definition for the current user.

ENDPOINT = 'openapi/vas/v1/pricealerts/definitions/{AlertDefinitionId}'
EXPECTED_STATUS = 204
METHOD = 'PUT'
RESPONSE_DATA = None
__init__(AlertDefinitionId, data)

Instantiate an UpdatePriceAlert request.

Parameters:data (dict (required)) – dict representing the body parameters.
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.valueadd as va
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> AlertDefinitionId = 30384
>>> data =
        {
          "AccountId": "13457INET",
          "AssetType": "FxSpot",
          "Comment": "I believe EURUSD will go up within the next few years!",
          "ExpiryDate": "2016-09-30T12:00:00Z",
          "IsRecurring": true,
          "Operator": "GreaterOrEqual",
          "PriceVariable": "AskTick",
          "State": "Enabled",
          "TargetValue": 1.34595,
          "Uic": 21
        }
>>> r = va.pricealerts.UpdatePriceAlert(AlertDefinitionId, data=data)
>>> client.request(r)
>>> assert r.status_code == r.expected_status

No response data is returned.

expected_status
response

response - get the response of the request.

status_code