async def get_assets(self):
    " 获取交易账户资产信息\n\n        Args:\n            None\n\n        Returns:\n            assets: Asset if successfully, otherwise it's None.\n            error: Error information, otherwise it's None.\n        "
    (success, error) = (await self._rest_api.get_account_info())
    if error:
        return (None, error)
    if (not success['success']):
        return (None, 'get_account_info error')
    data = success['result']
    assets = {}
    total = float(data['collateral'])
    free = float(data['freeCollateral'])
    locked = (total - free)
    assets['USD'] = {'total': total, 'free': free, 'locked': locked}
    if (assets == self._assets):
        update = False
    else:
        update = True
    self._assets = assets
    timestamp = tools.get_cur_timestamp_ms()
    ast = Asset(self._platform, self._account, self._assets, timestamp, update)
    return (ast, None)
获取交易账户资产信息

Args:
    None

Returns:
    assets: Asset if successfully, otherwise it's None.
    error: Error information, otherwise it's None.
async def get_assets(self):
    " 获取交易账户资产信息\n\n        Args:\n            None\n\n        Returns:\n            assets: Asset if successfully, otherwise it's None.\n            error: Error information, otherwise it's None.\n        "
    (success, error) = (await self._rest_api.get_account_info())
    if error:
        return (None, error)
    if (not success['success']):
        return (None, 'get_account_info error')
    data = success['result']
    assets = {}
    total = float(data['collateral'])
    free = float(data['freeCollateral'])
    locked = (total - free)
    assets['USD'] = {'total': total, 'free': free, 'locked': locked}
    if (assets == self._assets):
        update = False
    else:
        update = True
    self._assets = assets
    timestamp = tools.get_cur_timestamp_ms()
    ast = Asset(self._platform, self._account, self._assets, timestamp, update)
    return (ast, None)