async def connected_callback(self):
    '网络链接成功回调\n        '
    if (self._account != None):
        (await self._login())
        (success, error) = (await self._rest_api.list_markets())
        if error:
            state = State(self._platform, self._account, 'list_markets error: {}'.format(error), State.STATE_CODE_GENERAL_ERROR)
            SingleTask.run(self.cb.on_state_update_callback, state)
            (await self.socket_close())
            return
        for info in success['result']:
            self._syminfo[info['name']] = info
        if (self.cb.on_order_update_callback != None):
            for sym in self._symbols:
                (orders, error) = (await self.get_orders(sym))
                if error:
                    state = State(self._platform, self._account, 'get_orders error: {}'.format(error), State.STATE_CODE_GENERAL_ERROR)
                    SingleTask.run(self.cb.on_state_update_callback, state)
                    (await self.socket_close())
                    return
                for o in orders:
                    SingleTask.run(self.cb.on_order_update_callback, o)
        if (self.cb.on_position_update_callback != None):
            for sym in self._symbols:
                (pos, error) = (await self.get_position(sym))
                if error:
                    state = State(self._platform, self._account, 'get_position error: {}'.format(error), State.STATE_CODE_GENERAL_ERROR)
                    SingleTask.run(self.cb.on_state_update_callback, state)
                    (await self.socket_close())
                    return
                SingleTask.run(self.cb.on_position_update_callback, pos)
        if (self.cb.on_asset_update_callback != None):
            (ast, error) = (await self.get_assets())
            if error:
                state = State(self._platform, self._account, 'get_assets error: {}'.format(error), State.STATE_CODE_GENERAL_ERROR)
                SingleTask.run(self.cb.on_state_update_callback, state)
                (await self.socket_close())
                return
            SingleTask.run(self.cb.on_asset_update_callback, ast)
        if (self.cb.on_order_update_callback != None):
            (await self.send_json({'op': 'subscribe', 'channel': 'orders'}))
        if (self.cb.on_fill_update_callback != None):
            (await self.send_json({'op': 'subscribe', 'channel': 'fills'}))
        self._subscribe_response_count = 0
网络链接成功回调
async def connected_callback(self):
    '\n        '
    if (self._account != None):
        (await self._login())
        (success, error) = (await self._rest_api.list_markets())
        if error:
            state = State(self._platform, self._account, 'list_markets error: {}'.format(error), State.STATE_CODE_GENERAL_ERROR)
            SingleTask.run(self.cb.on_state_update_callback, state)
            (await self.socket_close())
            return
        for info in success['result']:
            self._syminfo[info['name']] = info
        if (self.cb.on_order_update_callback != None):
            for sym in self._symbols:
                (orders, error) = (await self.get_orders(sym))
                if error:
                    state = State(self._platform, self._account, 'get_orders error: {}'.format(error), State.STATE_CODE_GENERAL_ERROR)
                    SingleTask.run(self.cb.on_state_update_callback, state)
                    (await self.socket_close())
                    return
                for o in orders:
                    SingleTask.run(self.cb.on_order_update_callback, o)
        if (self.cb.on_position_update_callback != None):
            for sym in self._symbols:
                (pos, error) = (await self.get_position(sym))
                if error:
                    state = State(self._platform, self._account, 'get_position error: {}'.format(error), State.STATE_CODE_GENERAL_ERROR)
                    SingleTask.run(self.cb.on_state_update_callback, state)
                    (await self.socket_close())
                    return
                SingleTask.run(self.cb.on_position_update_callback, pos)
        if (self.cb.on_asset_update_callback != None):
            (ast, error) = (await self.get_assets())
            if error:
                state = State(self._platform, self._account, 'get_assets error: {}'.format(error), State.STATE_CODE_GENERAL_ERROR)
                SingleTask.run(self.cb.on_state_update_callback, state)
                (await self.socket_close())
                return
            SingleTask.run(self.cb.on_asset_update_callback, ast)
        if (self.cb.on_order_update_callback != None):
            (await self.send_json({'op': 'subscribe', 'channel': 'orders'}))
        if (self.cb.on_fill_update_callback != None):
            (await self.send_json({'op': 'subscribe', 'channel': 'fills'}))
        self._subscribe_response_count = 0