AccountList

class oandapyV20.endpoints.accounts.AccountList

Bases: oandapyV20.endpoints.accounts.Accounts

Get a list of all Accounts authorized for the provided token.

ENDPOINT = 'v3/accounts'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__()

Instantiate an AccountList request.

>>> import oandapyV20
>>> import oandapyV20.endpoints.accounts as accounts
>>> client = oandapyV20.API(access_token=...)
>>> r = accounts.AccountList()
>>> client.request(r)
>>> print r.response
{
  "accounts": [
    {
      "id": "101-004-1435156-002",
      "tags": []
    },
    {
      "id": "101-004-1435156-001",
      "tags": []
    }
  ]
}