code: def namedb_get_account_history(cur, address, offset=None, count=None):
      
      sql = 'SELECT * FROM accounts WHERE address = ? ORDER BY block_id DESC, vtxindex DESC'
      args = (address,)
  
      if count is not None:
          sql += ' LIMIT ?'
          args += (count,)
  
      if offset is not None:
          sql += ' OFFSET ?'
          args += (offset,)
  
      sql += ';'
      rows = namedb_query_execute(cur, sql, args)
  
      ret = []
      for rowdata in rows:
          tmp = {}
          tmp.update(rowdata)
          ret.append(tmp)
  
      return ret
docs: Get the history of an account's tokens