Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于DataApi的几个问题 #50

Open
splusz opened this issue Jul 16, 2018 · 0 comments
Open

关于DataApi的几个问题 #50

splusz opened this issue Jul 16, 2018 · 0 comments

Comments

@splusz
Copy link

splusz commented Jul 16, 2018

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

  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
  1. 接上一个问题, 用quote接口也是获取不到vwap字段的。这个字段在dataserver中好像是被注释掉了,有什么特别的原因吗?(DataCore/dataserver/server/src/main/scala/org/quantos/jads/services/jsq/QueryActor.scala

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant