def updateorders(self):
log.info("<STR_LIT>")<EOL>self.cancelall()<EOL>target = self.bot.get("<STR_LIT:target>", {})<EOL>price = self.getprice()<EOL>buy_price = price * (<NUM_LIT:1> - target["<STR_LIT>"]["<STR_LIT>"] / <NUM_LIT:100>)<EOL>sell_price = price * (<NUM_LIT:1> + target["<STR_LIT>"]["<STR_LIT>"] / <NUM_LIT:100>)<EOL>self["<STR_LIT>"] = float(price)<EOL>if float(self.balance(self.market["<STR_LIT>"])) < buy_price * target["<STR_LIT>"]["<STR_LIT>"]:<EOL><INDENT>InsufficientFundsError(Amount(target["<STR_LIT>"]["<STR_LIT>"] * float(buy_price), self.market["<STR_LIT>"]))<EOL>self["<STR_LIT>"] = True<EOL><DEDENT>else:<EOL><INDENT>self["<STR_LIT>"] = False<EOL>self.market.buy(<EOL>buy_price,<EOL>Amount(target["<STR_LIT>"]["<STR_LIT>"], self.market["<STR_LIT>"]),<EOL>account=self.account<EOL>)<EOL><DEDENT>if float(self.balance(self.market["<STR_LIT>"])) < target["<STR_LIT>"]["<STR_LIT>"]:<EOL><INDENT>InsufficientFundsError(Amount(target["<STR_LIT>"]["<STR_LIT>"], self.market["<STR_LIT>"]))<EOL>self["<STR_LIT>"] = True<EOL><DEDENT>else:<EOL><INDENT>self["<STR_LIT>"] = False<EOL>self.market.sell(<EOL>sell_price,<EOL>Amount(target["<STR_LIT>"]["<STR_LIT>"], self.market["<STR_LIT>"]),<EOL>account=self.account<EOL>)<EOL><DEDENT>pprint(self.execute())<EOL>
Update the orders