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

如何获取 pDepthMarketData行情返回的字段 #59

Open
mike2001 opened this issue Jun 24, 2021 · 1 comment
Open

如何获取 pDepthMarketData行情返回的字段 #59

mike2001 opened this issue Jun 24, 2021 · 1 comment

Comments

@mike2001
Copy link

print出来是这样的类型:DepthMarketDataField<TradingDay(20210623),reserve1(),ExchangeID(),reserve2(),LastPrice(2597.0),PreSettlementPrice(2591.0),PreClosePrice(2583.0),PreOpenInterest(603941.0),OpenPrice(2580.0),HighestPrice(2603.0),LowestPrice(2569.0),Volume(363103),Turnover(9396033190.0),OpenInterest(601336.0),ClosePrice(1.7976931348623157e+308),SettlementPrice(1.7976931348623157e+308),UpperLimitPrice(2772.0),LowerLimitPrice(2410.0),PreDelta(0.0),CurrDelta(1.7976931348623157e+308),UpdateTime(22:31:07),UpdateMillisec(0),BidPrice1(2597.0),BidVolume1(478),AskPrice1(2598.0),AskVolume1(873),BidPrice2(1.7976931348623157e+308),BidVolume2(0),AskPrice2(1.7976931348623157e+308),AskVolume2(0),BidPrice3(1.7976931348623157e+308),BidVolume3(0),AskPrice3(1.7976931348623157e+308),AskVolume3(0),BidPrice4(1.7976931348623157e+308),BidVolume4(0),AskPrice4(1.7976931348623157e+308),AskVolume4(0),BidPrice5(1.7976931348623157e+308),BidVolume5(0),AskPrice5(1.7976931348623157e+308),AskVolume5(0),AveragePrice(25877.04643035172),ActionDay(20210622),InstrumentID(c2109),ExchangeInstID(),BandingUpperPrice(0.0),BandingLowerPrice(0.0)>

如何获取里面的详细字段呢?比如lastprice

@martinx
Copy link

martinx commented Sep 1, 2021

直接获取即可

    def OnRtnDepthMarketData(self, pDepthMarketData):
        """
        行情订阅推送信息
        """
        print("LastPrice:", pDepthMarketData.LastPrice)

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

2 participants