def get(self):
    btc_rpc_connection = AuthServiceProxy(RPC_URL)
    try:
        addr = self.get_argument('address')
        data = BTC_ListUTXO.utxo(btc_rpc_connection, addr)
        if (not data):
            self.write(json.dumps(BaseHandler.error_ret_with_data('0')))
            return
        from utils import accumulate
        self.write(json.dumps(BaseHandler.success_ret_with_data(('%.8f' % accumulate(data))), default=decimal_default))
    except Exception as e:
        self.write(json.dumps(BaseHandler.error_ret_with_data(('error: %s' % e))))
        logging.error('BTC_GetBalance error:{0} in {1}'.format(e, get_linenumber()))
def get(self):
    btc_rpc_connection = AuthServiceProxy(RPC_URL)
    try:
        addr = self.get_argument('address')
        data = BTC_ListUTXO.utxo(btc_rpc_connection, addr)
        if (not data):
            self.write(json.dumps(BaseHandler.error_ret_with_data('0')))
            return
        from utils import accumulate
        self.write(json.dumps(BaseHandler.success_ret_with_data(('%.8f' % accumulate(data))), default=decimal_default))
    except Exception as e:
        self.write(json.dumps(BaseHandler.error_ret_with_data(('error: %s' % e))))
        logging.error('BTC_GetBalance error:{0} in {1}'.format(e, get_linenumber()))