GetAllAlerts

class saxo_openapi.endpoints.valueadd.pricealerts.GetAllAlerts(params)

Get an unsorted list of all the price alert definitions belonging to the current user where the state matches the specified value. The alerts might belong to different accounts, should the user have more than one.

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

Instantiate a GetAllAlerts request.

Parameters:data (dict (required)) – dict representing the querystring parameters.
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.valueadd as va
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> params =
        {
          "$top": 12015,
          "$skip": 27782,
          "$inlinecount": "None",
          "State": "Enabled"
        }
>>> r = va.pricealerts.GetAllAlerts(params=params)
>>> rv = client.request(r)
>>> print(json.dumps(rv, indent=2))
{
  "Data": [
    {
      "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"
    }
  ],
  "MaxRows": 206
}
expected_status
response

response - get the response of the request.

status_code