AccountUpdate

class saxo_openapi.endpoints.portfolio.accounts.AccountUpdate(AccountKey, data)

Update account details. Particularly the user account shield value, the benchmark instrument or the account display name.

ENDPOINT = 'openapi/port/v1/accounts/{AccountKey}'
EXPECTED_STATUS = 204
METHOD = 'PATCH'
RESPONSE_DATA = None
__init__(AccountKey, data)

Instantiate an AccountUpdate request.

Parameters:
  • AccountKey (string (required)) – the AccountKey
  • data (dict (required)) – dict representing the requestbody.
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.portfolio as pf
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> data =
        {
          "DisplayName": "MyTestName"
        }
>>> AccountKey = '...'
>>> r = pf.account.AccountUpdate(AccountKey=AccountKey, 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