def get(self):
    rpcconn = AuthServiceProxy(RPC_URL)
    try:
        lstUtxos = BTC_ListUTXO.utxo(rpcconn, [], 1, 9999999)
        mapRet = {}
        for utxo in lstUtxos:
            strAddr = utxo['address'].strip()
            if (Decimal(utxo['amount']) < 0.0003):
                continue
            if (strAddr not in g_exUserAddrs):
                continue
            if (strAddr not in mapRet):
                mapRet[strAddr] = Decimal('0.0')
            nAmount = utxo['amount']
            mapRet[strAddr] = str((nAmount + Decimal(mapRet[strAddr])))
        self.write(json.dumps(BaseHandler.success_ret_with_data(mapRet), default=decimal_default))
    except Exception as e:
        self.write(json.dumps(BaseHandler.error_ret_with_data(('error: %s' % e))))
        logging.error('BTC_CollectionQuery error:{0} in {1}'.format(e, get_linenumber()))
def get(self):
    rpcconn = AuthServiceProxy(RPC_URL)
    try:
        lstUtxos = BTC_ListUTXO.utxo(rpcconn, [], 1, 9999999)
        mapRet = {}
        for utxo in lstUtxos:
            strAddr = utxo['address'].strip()
            if (Decimal(utxo['amount']) < 0.0003):
                continue
            if (strAddr not in g_exUserAddrs):
                continue
            if (strAddr not in mapRet):
                mapRet[strAddr] = Decimal('0.0')
            nAmount = utxo['amount']
            mapRet[strAddr] = str((nAmount + Decimal(mapRet[strAddr])))
        self.write(json.dumps(BaseHandler.success_ret_with_data(mapRet), default=decimal_default))
    except Exception as e:
        self.write(json.dumps(BaseHandler.error_ret_with_data(('error: %s' % e))))
        logging.error('BTC_CollectionQuery error:{0} in {1}'.format(e, get_linenumber()))