def portfolio(): tmp = req_admxi.get_portfolio('hades') print "MONEY: " + str(req_admxi.get_cash('hades')) + '$' if not tmp: print "SHARES : 0" else: shares = tmp[0] print "SHARES: NAME | NBR | TYPE | CUR" print " %s | %02d | %s | %s" % (shares[1],int(shares[4]),shares[2],shares[3])
def update_data(): global money global shares money = req_admxi.get_cash('hades') tmp = req_admxi.get_portfolio('hades') if not tmp: shares = 0 else: shares = tmp[0][4]
def update(): cash = req_admxi.get_cash(ALGO) portfolio = req_admxi.get_portfolio(ALGO) print cash, portfolio print req_admxi.get_orders(ALGO)