def post(self):
    rpc_connection = AuthServiceProxy(RPC_URL)
    try:
        lastscannedblktime = int(str(self.get_argument('blocktime')))
        data = BTC_CrawlTxData.process(rpc_connection, lastscannedblktime)
        for i in range(len(data)):
            data[i]['amount'] = str(data[i]['amount'])
        self.write(json.dumps(BaseHandler.success_ret_with_data(data), default=decimal_default))
    except Exception as e:
        self.write(json.dumps(BaseHandler.error_ret_with_data(('error: %s' % e))))
        logging.error('BTC_CrawlTxData error:{0} in {1}'.format(e, get_linenumber()))
def post(self):
    rpc_connection = AuthServiceProxy(RPC_URL)
    try:
        lastscannedblktime = int(str(self.get_argument('blocktime')))
        data = BTC_CrawlTxData.process(rpc_connection, lastscannedblktime)
        for i in range(len(data)):
            data[i]['amount'] = str(data[i]['amount'])
        self.write(json.dumps(BaseHandler.success_ret_with_data(data), default=decimal_default))
    except Exception as e:
        self.write(json.dumps(BaseHandler.error_ret_with_data(('error: %s' % e))))
        logging.error('BTC_CrawlTxData error:{0} in {1}'.format(e, get_linenumber()))