User

class saxo_openapi.endpoints.rootservices.user.User

Get information of current user.

ENDPOINT = 'openapi/root/v1/user/'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__()

Instantiate a User request.

>>> import saxo_openapi
>>> import saxo_openapi.endpoints.rootservices as rs
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> r = rs.user.User()
>>> rv = client.request(r)
>>> print(rv)

Output:

{
  "AccessRights": {
    "CanManageCashTransfers": true,
    "CanTakePriceSession": true,
    "CanTakeTradeSession": true,
    "CanTrade": true,
    "CanViewAnyClient": true
  },
  "ClientId": 467989277,
  "EmployeeId": "472298225",
  "Roles": [
    "OAPI.Roles.RetailClient"
  ],
  "UserId": 983293960
}
expected_status
response

response - get the response of the request.

status_code