AccountSummary

class saxo_openapi.endpoints.accounthistory.accountvalues.AccountSummary(ClientKey, params=None)

Get ‘rolled up performance’ for the accounts of specified client.

ENDPOINT = 'openapi/hist/v3/accountValues/{ClientKey}/'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__(ClientKey, params=None)

Instantiate an AccountSummary request.

Parameters:
  • ClientKey (string (required)) – the ClientKey
  • params (dict (optional)) – dict with parameters representing the queringstring parameters
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.accounthistory as ah
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> ClientKey = 'Cf4xZWiYL6W1nMKpygBLLA=='
>>> r = ah.accountvalues.AccountSummary(ClientKey=ClientKey)
>>> client.request(r)
>>> print(json.dumps(r.response, indent=2))

Output:

{
  "Data": [
    {
      "AccountValue": 5028322.26953125,
      "AccountValueMonth": 1510.67004394531,
      "AccountValueYear": 0,
      "Key": "WMhrJRysCuCFlMbcGFvPVA==",
      "KeyType": "Account"
    },
    {
      "AccountValue": 1000,
      "AccountValueMonth": 0,
      "AccountValueYear": 0,
      "Key": "076n7v5YfRys3|tNojPVcA==",
      "KeyType": "Account"
    },
    {
      "AccountValue": 5028469.04129028,
      "AccountValueMonth": 1510.670043945311,
      "AccountValueYear": 0,
      "Key": "xwhUCDYh8X|pIwV|og2Qag==",
      "KeyType": "Client"
    }
  ]
}
expected_status
response

response - get the response of the request.

status_code