GetTradeMessages

class saxo_openapi.endpoints.trading.messages.GetTradeMessages

Get trade messages for the current user.

ENDPOINT = 'openapi/trade/v1/messages'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__()

Instantiate a GetTradeMessages request.

Parameters:None
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.trading as tr
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> r = tr.messages.GetTradeMessages()
>>> client.request(r)
>>> print(json.dumps(r.response, indent=4))

Output:

{
  "Data": [
    {
      "DateTime": "2014-12-12T09:17:12Z",
      "DisplayName": "Price Alert",
      "DisplayType": "Default",
      "IsDiscardable": false,
      "MessageBody": "Price alert was triggered on EURUSD",
      "MessageHeader": "Price Alert",
      "MessageId": "345322",
      "MessageType": "PriceAlert"
    }
  ]
}
expected_status
response

response - get the response of the request.

status_code