in lines 72 & 77 at app.py: r = positions..... probably missing: import oandapyV20.endpoints.positions as positions