GetAlertDefinition

class saxo_openapi.endpoints.valueadd.pricealerts.GetAlertDefinition(AlertDefinitionId)

Gets the specified price alert for the current user.

ENDPOINT = 'openapi/vas/v1/pricealerts/definitions/{AlertDefinitionId}'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__(AlertDefinitionId)

Instantiate a GetAlertDefinition request.

Parameters:AlertDefinitionId (string (required)) – the alert definition id.
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.valueadd as va
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> AlertDefinitionId = 30384
>>> r = va.pricealerts.GetAlertDefinition(AlertDefinitionId)
>>> rv = client.request(r)
>>> print(json.dumps(rv, indent=2))
{
  "AccountId": "13457INET",
  "AlertDefinitionId": "30834",
  "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,
  "UserId": "2361528"
}
expected_status
response

response - get the response of the request.

status_code