예제 #1
0
 def create_request(self, subscription_handler, parse, callback, error_handler, is_trade=False, is_mbp_feed=False):
     request = WebsocketRequest()
     request.subscription_handler = subscription_handler
     request.is_trading = is_trade
     request.is_mbp_feed = is_mbp_feed
     request.auto_close = True  # for websocket request, auto close the connection after request.
     request.json_parser = parse
     request.update_callback = callback
     request.error_handler = error_handler
     return request
 def create_request(self, subscription_handler, parse, callback,
                    error_handler, is_trade):
     request = WebsocketRequest()
     request.subscription_handler = subscription_handler
     request.is_trading = is_trade
     request.auto_close = False  # subscribe need connection. websocket request need close request.
     request.json_parser = parse
     request.update_callback = callback
     request.error_handler = error_handler
     return request