def __init__(self, base_url=None, symbol=None, apiKey=None, apiSecret=None, orderIDPrefix='mm_bitmex_', shouldWSAuth=True, postOnly=False, timeout=7):
    'Init connector.'
    self.base_url = base_url
    self.symbol = symbol
    self.postOnly = postOnly
    self.shouldWSAuth = shouldWSAuth
    if (apiKey is None):
        raise Exception(('Please set an API key and Secret to get started. See ' + 'https://github.com/BitMEX/sample-market-maker/#getting-started for more information.'))
    self.apiKey = apiKey
    self.apiSecret = apiSecret
    if (len(orderIDPrefix) > 13):
        raise ValueError('settings.ORDERID_PREFIX must be at most 13 characters long!')
    self.orderIDPrefix = orderIDPrefix
    self.retries = 0
    self.session = requests.Session()
    self.session.headers.update({'user-agent': ('liquidbot-' + constants.VERSION)})
    self.session.headers.update({'content-type': 'application/json'})
    self.session.headers.update({'accept': 'application/json'})
    self.ws = BitMEXWebsocket()
    self.ws.connect(base_url, symbol, shouldAuth=shouldWSAuth)
    self.__check_ws_alive()
    self.timeout = timeout
Init connector.
def __init__(self, base_url=None, symbol=None, apiKey=None, apiSecret=None, orderIDPrefix='mm_bitmex_', shouldWSAuth=True, postOnly=False, timeout=7):
    
    self.base_url = base_url
    self.symbol = symbol
    self.postOnly = postOnly
    self.shouldWSAuth = shouldWSAuth
    if (apiKey is None):
        raise Exception(('Please set an API key and Secret to get started. See ' + 'https://github.com/BitMEX/sample-market-maker/#getting-started for more information.'))
    self.apiKey = apiKey
    self.apiSecret = apiSecret
    if (len(orderIDPrefix) > 13):
        raise ValueError('settings.ORDERID_PREFIX must be at most 13 characters long!')
    self.orderIDPrefix = orderIDPrefix
    self.retries = 0
    self.session = requests.Session()
    self.session.headers.update({'user-agent': ('liquidbot-' + constants.VERSION)})
    self.session.headers.update({'content-type': 'application/json'})
    self.session.headers.update({'accept': 'application/json'})
    self.ws = BitMEXWebsocket()
    self.ws.connect(base_url, symbol, shouldAuth=shouldWSAuth)
    self.__check_ws_alive()
    self.timeout = timeout