In [1]:
import json
import oandapyV20
import oandapyV20.endpoints.positions as positions
from exampleauth import exampleauth
accountID, access_token = exampleauth.exampleAuth()
client = oandapyV20.API(access_token=access_token)
r = positions.OpenPositions(accountID=accountID)
rv = client.request(r)
print("Response: ", json.dumps(rv, indent=2))