quantOS-org / JAQS

http://www.quantos.org/jaqs/
Other
616 stars 343 forks source link

关于DataApi的几个问题 #50

Open splusz opened 6 years ago

splusz commented 6 years ago

以下有几个问题,望关注,谢谢!

  1. 在部署DataCore到本地进行测试时,发现(订阅的)实时行情数据中没有vwap字段。看了源代码后发现问题出在这里(见下面代码片段的注释):

    # /jaqs/data/dataapi/data_api.py
    def _convert_quote_ind(self, quote_ind):
        """Convert original quote_ind to a map.
    
        The original quote_ind contains field index instead of field name!
        """
    
        if quote_ind['schema_id'] != self._schema_id:
            return None
    
        indicators = quote_ind['indicators']
        values = quote_ind['values']
    
        max_index = len(self._schema)
    
        quote = {}
        for i in range(len(indicators)):
            if indicators[i] < max_index:  # 此处应改为小于等于  <= 
                quote[self._schema_map[indicators[i]]['name']] = values[i]
            else:
                quote[str(indicators[i])] = values[i]
    
        return quote
  2. 接上一个问题, 用quote接口也是获取不到vwap字段的。这个字段在dataserver中好像是被注释掉了,有什么特别的原因吗?(DataCore/dataserver/server/src/main/scala/org/quantos/jads/services/jsq/QueryActor.scala

  3. 另外,行情中也没有包含基金的iopv字段(文档中有写),在dataserver中的行情查询和推送流程中也没有看到iopv。