For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
error when buying stocks with ib
-
Hello,
I use ib as the live broker and everything seems to be ok until I get to the code that actually buys a stock
self.buy(data=self.getdatabyname(ticker), size=100)
I get the error "error() takes 2 positional arguments but 4 were given"
can anyone help? -
The stack traces are usually a bit more verbose, indicating where the error happened. Can you post it?
-
Found the problem, the size parameter cant be float value, even if it is 170.0 it must be converted to an int
-
The IB API is always full of surprises.