def __init__(self, key, secret, options={}):
self.options = options
self.auth = (key, secret)
if 'hostname' in options:
self.hostname = options['hostname']
else:
self.hostname = 'api.mybitx.com'
self.port = options['port'] if 'port' in options else 443
self.pair = options['pair'] if 'pair' in options else 'XBTZAR'
self.ca = options['ca'] if 'ca' in options else None
self.timeout = options['timeout'] if 'timeout' in options else 30
self.headers = {
'Accept': 'application/json',
'Accept-Charset': 'utf-8',
'User-Agent': 'py-bitx v' + __version__
}
self._executor = ThreadPoolExecutor(max_workers=5)
评论列表
文章目录