Is there an easy way to debug live trading?
I've tried putting in print statements in oandapy.py
def request(self, endpoint, method='GET', params=None):
but not seeing it in console.. (and orders not hitting oanda servers).. which makes me wonder if the oandapy module is being called at all. But if I use command line using curl (with same acctid/apikey), it seems to work fine.
The constructor (def init) seems to be getting hit... the request method, on the other hand, does not seem to be.`
Is there a smarter way to debug?
Solved it. It turns out buy_bracket() with float(size) doesn't work.. it accepts int(size)
buy_bracketitself doesn't look at anything. It simply generates orders and delegates to the rest of the platform. But if the
sizedoesn't make sense (
float) things will probably break somewhere.
There is no specific provision to forbid passing a
float, but there is also no effort made to check that it isn't passed.