コード例 #1
0
    def __init__(self, access_key, secret_key, account_id):
        self._bc = BTCChina(access_key, secret_key)
        self._id = account_id

        self._profile = {}
        self._balance = {}
        self._frozen = {}

        self._TITLE = '[ONLINE]'
        self._retry = 5
        self._retry_interval = 10

        self._last_sell_out = 0

        self._sync()
        pass
コード例 #2
0
class BTCChinaAccount(object):
    '''
    '''
    def __init__(self, access_key, secret_key, account_id):
        self._bc = BTCChina(access_key, secret_key)
        self._id = account_id

        self._profile = {}
        self._balance = {}
        self._frozen = {}
        
        self._TITLE = '[ONLINE]'
        self._retry = 5
        self._retry_interval = 10

        self._last_sell_out = 0

        self._sync()
        pass

    def _do_sync(self):
        try:
            info_dict = self._bc.get_account_info()
            self._profile = info_dict['profile']
            self._balance = info_dict['balance']
            self._frozen = info_dict['frozen']
        except Exception, e:
            logger.error(traceback.format_exc())
            logger.error(str(e))
            return False
        return True
コード例 #3
0
class BTCChinaAccount(object):
    '''
    '''
    def __init__(self, access_key, secret_key, account_id):
        self._bc = BTCChina(access_key, secret_key)
        self._id = account_id

        self._profile = {}
        self._balance = {}
        self._frozen = {}

        self._TITLE = '[ONLINE]'
        self._retry = 5
        self._retry_interval = 10

        self._last_sell_out = 0

        self._sync()
        pass

    def _do_sync(self):
        try:
            info_dict = self._bc.get_account_info()
            self._profile = info_dict['profile']
            self._balance = info_dict['balance']
            self._frozen = info_dict['frozen']
        except Exception, e:
            logger.error(traceback.format_exc())
            logger.error(str(e))
            return False
        return True
コード例 #4
0
    def __init__(self, access_key, secret_key, account_id):
        self._bc = BTCChina(access_key, secret_key)
        self._id = account_id

        self._profile = {}
        self._balance = {}
        self._frozen = {}
        
        self._TITLE = '[ONLINE]'
        self._retry = 5
        self._retry_interval = 10

        self._last_sell_out = 0

        self._sync()
        pass