AccountsMe

class saxo_openapi.endpoints.portfolio.accounts.AccountsMe(params=None)

Get all accounts under a particular client to which the logged in user belongs.

ENDPOINT = 'openapi/port/v1/accounts/me'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__(params=None)

Instantiate an AccountsMe request.

Parameters:params (dict (optional)) – optional querystring parameters
>>> import saxo_openapi
>>> import saxo_openapi.endpoints.portfolio as pf
>>> import json
>>> client = saxo_openapi.API(access_token=...)
>>> params =
        {}
>>> r = pf.accounts.AccountsMe(params=params)
>>> client.request(r)
>>> print(json.dumps(r.response, indent=4))

Output:

{
  "Data": [
    {
      "ClientId": "9226397",
      "DirectMarketAccess": false,
      "IsTrialAccount": true,
      "AccountType": "Normal",
      "UseCashPositionsAsMarginCollateral": true,
      "CanUseCashPositionsAsMarginCollateral": true,
      "LegalAssetTypes": [
        "FxSpot",
        "FxForwards",
        "FxVanillaOption",
        "FxKnockInOption",
        "FxKnockOutOption",
        "FxOneTouchOption",
        "FxNoTouchOption"
      ],
      "SupportsAccountValueProtectionLimit": false,
      "IndividualMargining": false,
      "IsShareable": false,
      "Sharing": [
        "NoSharing"
      ],
      "CreationDate": "2019-02-02T10:47:42.313000Z",
      "IsCurrencyConversionAtSettlementTime": true,
      "Active": true,
      "CurrencyDecimals": 2,
      "AccountKey": "Cf4xZWiYL6W1nMKpygBLLA==",
      "ClientKey": "Cf4xZWiYL6W1nMKpygBLLA==",
      "AccountGroupKey": "Cf4xZWiYL6W1nMKpygBLLA==",
      "AccountId": "9226397",
      "Currency": "EUR",
      "IsMarginTradingAllowed": true
    }
  ]
}
expected_status
response

response - get the response of the request.

status_code