AccountListByClient¶
-
class
saxo_openapi.endpoints.portfolio.accounts.
AccountListByClient
(params)¶ Get all accounts owned by the specified client.
-
ENDPOINT
= 'openapi/port/v1/accounts/'¶
-
EXPECTED_STATUS
= 200¶
-
METHOD
= 'GET'¶
-
__init__
(params)¶ Instantiate an AccountListByClient request.
Parameters: params (dict (required)) – params must contain at least the ClientKey >>> import saxo_openapi >>> import saxo_openapi.endpoints.portfolio as pf >>> import json >>> client = saxo_openapi.API(access_token=...) >>> params = { "ClientKey": "Cf4xZWiYL6W1nMKpygBLLA==" }
>>> r = pf.accounts.AccountListByClient(params=params) >>> client.request(r) >>> print(json.dumps(r.response, indent=4))
Output:
{ "Data": [ { "IsMarginTradingAllowed": true, "DirectMarketAccess": false, "AccountId": "9226397", "ClientId": "9226397", "CreationDate": "2019-02-02T10:47:42.313000Z", "SupportsAccountValueProtectionLimit": false, "CurrencyDecimals": 2, "ClientKey": "Cf4xZWiYL6W1nMKpygBLLA==", "IsTrialAccount": true, "Sharing": [ "NoSharing" ], "IsCurrencyConversionAtSettlementTime": true, "AccountType": "Normal", "Active": true, "IndividualMargining": false, "CanUseCashPositionsAsMarginCollateral": true, "AccountKey": "Cf4xZWiYL6W1nMKpygBLLA==", "AccountGroupKey": "Cf4xZWiYL6W1nMKpygBLLA==", "Currency": "EUR", "IsShareable": false, "UseCashPositionsAsMarginCollateral": true, "LegalAssetTypes": [ "FxSpot", "FxForwards", "FxVanillaOption", "FxKnockInOption", "FxKnockOutOption", "FxOneTouchOption", "FxNoTouchOption" ] } ] }
-
expected_status
¶
-
response
¶ response - get the response of the request.
-
status_code
¶
-