code: def query_positions(self, accounts):
          
          try:
              data = self.call("positions", {'client': accounts})
              if data is not None:
                  cash_part = data.get('subAccounts', {}).get('人民币', False)
                  if cash_part:
                      cash_available = cash_part.get('可用金额', cash_part.get('可用'))
  
                  position_part = data.get('dataTable', False)
                  if position_part:
                      res = data.get('dataTable', False)
                      if res:
                          hold_headers = res['columns']
                          hold_headers = [
                              cn_en_compare[item] for item in hold_headers
                          ]
                          hold_available = pd.DataFrame(
                              res['rows'],
                              columns=hold_headers
                          )
                  if len(hold_available) == 1 and hold_available.amount[0] in [
                          None,
                          '',
                          0
                  ]:
                      hold_available = pd.DataFrame(
                          data=None,
                          columns=hold_headers
                      )
                  return {
                      'cash_available':
                      cash_available,
                      'hold_available':
                      hold_available.assign(
                          amount=hold_available.amount.apply(float)
                      ).loc[:,
                            ['code',
                             'amount']].set_index('code').amount
                  }
              else:
                  print(data)
                  return False, 'None ACCOUNT'
          except:
              return False
docs: 查询现金和持仓
  
          Arguments:
              accounts {[type]} -- [description]
  
          Returns:
              dict-- {'cash_available':xxx,'hold_available':xxx}