Author

Topic: API - sendmany error (Read 532 times)

legendary
Activity: 1554
Merit: 1008
December 24, 2013, 04:31:18 AM
#1
=conn.getbalance() # here = 0.2
Code:
       conn.settxfee(0.0001)
        main_acc = '.main.'
        bal = conn.getbalance(main_acc, xcurr.conf) # here bal = -177
        print bal, vol
        if bal < vol:
            for (k,v) in conn.listaccounts(xcurr.conf).iteritems():
                if v == 0: continue
                conn.move(k, main_acc, float(v))
                print k,v
        bal = conn.getbalance(main_acc, xcurr.conf)
        print 'NEW bal:', bal # here bal = 0.2
        #res = conn.sendmany( main_acc, sends, xcurr.conf )
        res = conn.sendmany( main_acc,{ '....VMsWBDjDLL5': 0.00200 })
        log(res)

ERROR:
 u'Insufficient funds', u'code': -6

why?
How escape form check the account balance?
Jump to: