GithubHelp home page GithubHelp logo

openctp / webctp Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 10.0 258 KB

将CTP接口转换成websocket+json协议对外通讯,适合web类应用。

Home Page: http://www.openctp.cn

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
ctp ctpapi finance fintech futures openctp options quant stocks trader

webctp's Introduction

openctp(Powered by TTS - Tick Trading System)

openctp是一个以CTP生态为基础的平台,既提供了华鑫证券奇点、中泰证券XTP、东方财富EMT、东方证券OST等柜台的CTPAPI兼容接口,也提供了一套与上期技术SimNow模拟环境类似的模拟环境,也支持CTPAPI接口,不仅提供国内各期货交易所的期货与期权品种模拟交易,还提供了A股的股票、基金、债券以及股票期权模拟交易,也支持港股、美股等市场模拟交易。

openctp还提供了CTPAPI的Python接口以及CTP股票期权API的Python接口,开源了CTP命令行交易客户端ViTrader,还有图形界面交易客户端TickTrader,以及Mini版的MiniTrader都支持openctp、CTP、CTP股票期权、中泰XTP、华鑫奇点股票与股票期权等柜台,MiniTrader采用openctp的CTPAPI兼容接口技术支持了CTP、TTS、华鑫证券股票与股票期权等柜台,无需自己再替换dll。

openctp还做了一套websocket接口的CTP服务,webctp,将CTP的服务以websocket+json形式对外提供服务,也开放了源码。

openctp还提供了CTP、华鑫奇点、中泰XTP等柜台接口的开发咨询和培训以及柜台系统等的开发培训服务。

ctp开放平台全景图

目录结构:

  • ctp2TTS:openctp模拟环境CTPAPI兼容接口。
  • ctpopt2TTS:openctp模拟环境CTP股票期权兼容接口。
  • ctp2XTP:中泰证券XTP柜台CTPAPI兼容接口(含源码)。
  • ctp2STP:华鑫证券TORA奇点股票柜台CTPAPI兼容接口(含源码)。
  • ctp2EMT:东方财富EMT柜台CTPAPI兼容接口(含源码)。
  • ctp2STPOPT:华鑫证券TORA奇点股票期权柜台CTPAPI兼容接口。
  • ctp2OST:东方证券OST柜台CTPAPI兼容接口。
  • ctp2YD:易达柜台CTPAPI兼容接口。(易达官方提供)
  • ctp2IB:盈透证券TWS平台CTPAPI兼容接口。
  • ctp2QDP:量投QDP柜台CTPAPI兼容接口。
  • ctp2TAP:易盛TAP启明星柜台CTPAPI兼容接口。
  • ctp2QQ:腾讯行情CTPAPI兼容接口(含源码)。
  • ctp2Sina:新浪行情CTPAPI兼容接口(含源码)。
  • demo:CTPAPI开发相关的demo及工具源码。
  • tools:生产力工具。
  • docs:开发文档及行业资料。
  • ctpapi-python:CTPAPI的Python接口(openctp官方开发)。
  • ctpapi-opt-python:CTP股票期权API的Python接口(openctp官方开发)。
  • ctpapi-java:CTPAPI的Java接口。
  • ctpapi-go:CTPAPI的Go接口。
  • ctpapi-c:CTPAPI的C语言接口。
  • ctpapi-rust:CTPAPI的Rust语言接口。
  • ctpapi-C#:CTPAPI的C#语言接口。
  • widgets:图形界面小应用。

openctp模拟环境

openctp模拟环境与上期技术SimNow模拟环境类似,均为CTPAPI接口的测试与仿真平台,CTP是上期开发的,SimNow用的也是CTP柜台,所以SimNow是CTPAPI接口的官方测试平台,openctp是自己开发了兼容CTPAPI接口的柜台系统,由于CTP柜台业务非常多,我们openctp只是从一般投资者角度考虑,只实现了一般交易过程中需要使用的接口,完整版还需要到SimNow测试,其实SimNow也没多完整,毕竟是个模拟环境,很多业务也不支持,所以有些功能还是需要在实盘环境中测试的。

openctp模拟环境有三套,一套7x24环境,不间断循环播放最新交易日的一段行情,一套为仿真环境,交易时段与实盘一致,可以用来长期验证策略的运行效果,除期货外还支持A股的股票交易。第三套也是仿真环境,不过带宽较高,提供的品种也全,除期货、期权外还提供了A股的股票、基金、债券以及股票期权的仿真交易,收费也很便宜,只要300块一年,关注openctp公众号并回复注册vip即可。

支持品种:

  • 沪深交易所股票、债券、基金、股票期权等
  • 上期所、中金所等国内期货交易所全品种期货、期权
  • 港股、美股全部股票合约模拟交易
  • CME等外盘期货品种(即将上线)

相对Simnow优点:

  • 提供5档行情
  • 支持部分成交、部分撤消。
  • 支持负价交易(负价合约的合约号为MINUS,仅在7x24环境提供)。
  • 提供各交易所全商品模拟交易。
  • 关注“openctp”公众号即可自动得到一个7x24测试账号及仿真账号,无需提供手机号等隐私信息,回复“注册仿真”可再注册多个仿真账号,回复“注册24”可再注册多个7x24测试账号,且立即生效。
  • QQ群127235179有问必答,解答CTP及各交易相关问题。
  • openctp的7x24环境是真正的7x24,1秒钟都不停,完全独立的环境,与仿真环境没有任何关系,持仓、资金等交易数据不会被重置。
  • 除国内期货及期权外,还提供A股股票、债券、基金、股票期权、港美股以及外盘期货等全球市场模拟交易。
  • 支持市价单、FAK/FOK单。
  • 支持CTP股票期权接口。

撮合方式(同时支持做市与撮合):

  • 撮合:完全由用户之间撮合,按价格优先、时间优先撮合成交。撮合模式的合约只有三个,合约代码分别为TEST、BTC、MINUS,其它合约均为做市模式。
  • 做市:Simnow用的就是做市模式,以实盘行情盘口做市成交,即高于叫卖价的多单立即成交,低于叫买价的空单立即成交,否则挂在队列中等行情符合条件的时候成交。

部分成交、部分撤消:

  • 仿真环境的做市模式不会部分成交,要测试部分成交可在7x24环境交易TEST、BTC、MINUS这三个合约。

openctp模拟环境账号注册

关注openctp公众号,回复相应信息即可注册模拟账号,即时生效,初始资金1000万。

  • 7x24环境账号注册,回复注册24,每回复一次就多注册一个7x24账号,一个微信最多注册3个号。
  • 仿真环境账号注册,回复注册仿真,每回复一次就多注册一个仿真账号,一个微信最多注册3个号。
  • vip环境账号注册,回复注册vip,每回复一次就多注册一个vip账号,一个微信最多注册10个号。

BrokerID、AppID、AuthCode

openctp模拟环境不检查这几个字段,3项均可不填。

7x24模拟环境

  • 交易前置 - tcp://121.37.80.177:20002,或者使用域名tcp://openctp.cn:20002
  • 行情前置 - tcp://121.37.80.177:20004,或者使用域名tcp://openctp.cn:20004

仿真环境

仿真环境

openctp监控平台

openctp提供了一个集中监控SimNow、华鑫N视界、中泰XTP、东财EMT等模拟环境的监控平台,当然也包括openctp自己的模拟环境,有几个环境,有没开着,一眼就知道了,点这里看看:CTP接口模拟环境监控

openctp还提供了对几十家主流期货公司CTP柜台实盘环境的监控,并且标出了提供上期所免费5档行情支持的期货公司,点这里一看就知道了:CTP柜台实盘环境监控

monitor

CTPAPI及各柜台CTPAPI兼容接口下载:

CTP、TTS、XTP、TORA等柜台接口下载

已官方支持TTS通道(CTP开放平台)的产品:

MiniTrader

vnpy

mt5ctp

texttrader

WonderTrader

WonderTrader

通过自己替换dll可接入TTS通道(CTP开放平台)的产品:

快期V3

- [快期V2(CTP期货交易客户端)](https://zhuanlan.zhihu.com/p/432252376)

快期V2

- [TBTerminalCTP(交易开拓者)](https://zhuanlan.zhihu.com/p/437818698)

TBTerminal

粉丝交流QQ群:127235179

QQ群二维码

openctp培训服务

openctp提供证券期货交易开发方面的技术培训,也提供行业无关的基础技术培训,openctp的培训偏向于就业方向,比如想去私募或者科技公司从事量化或者柜台系统开发的比较适合,当然如果想自己学习一些技术帮助自己更好地做交易也是可以的。openctp的培训是迭代式的,会不断更新,补充更多的内容,同学可在相应课程的群内永久交流。所有课程的每节课在B站上都有试看视频,报培训只需要在openctp的公众号回复培训两个字即可获取联系方式。

openctp不定期组织同学进行技术交流,为大家创造一个好的学习氛围。

课程介绍

  • 第一期:C/C++高级编程,3000元,以krenx开发的C语言跨平台开发框架Think库为基准进行讲解,含socket网络编程、IPC进程通讯等,有众多实用的工具,可立即应用到工作中。另外还有boost.asio异步网络通讯框架等开发技术的讲解,也提供相应的实例源码。
  • 第二期:CTP、XTP等柜台接口开发技术,5000元,以openctp相关技术为基准进行讲解,含CTPAPI底层逻辑、CTPAPI各种注意事项、开源CTP客户端TextTrader源码讲解等。送高质量轻量级Tick级多策略交易框架源码(约三五千行),保持原汁原味的CTP数据结构,实时计算持仓、资金。
  • 第三期:交易系统开发,5000元,以TTS交易系统为基准进行讲解,含交易系统结构、架构技术、业务表结构设计、关键业务处理等。送一套完整的交易撮合系统源码,含下单、仓位与资金计算、委托回报、成交回报、撮合成交、行情推送等完整功能,正在开发中,开发完成后也将免费发给前面已报名的同学。
  • 第四期:金融交易业务与产品设计,3000元,通讲全球股票、期货、期权交易发展历程、交易规则、计算公式、风险控制及产品设计,提供一份CTP全部常用字段的详细说明。
  • 第五期:内存数据库架构交易系统总线开发技术,8000元,通过TTS的总线架构技术讲解CTP那样的总线开发技术,包括重演、热备、负载均衡、最短路由、分布式计算等技术,内存计算架构在各行业的高性能通讯方面都可以应用,远不止金融交易领域。

openctp公开课

openctp做了一些免费的0基础学习课程,帮助更多朋友进入到软件编程与证券期货交易行业。

  • C语言公开课:以生动有趣的方式讲C语言基础性编程技术,重在兴趣培养和信心建立。
  • C++语言公开课:以生动有趣的方式讲C++语言基础性编程技术,课程在准备中。
  • Linux环境编程公开课:介绍Unix&Linux的前世今世,讲Shell、VI编辑器等使用,讲netstat、traceroute、ifconfig、lsof等网络工具的使用,讲正则表达式等等,0基础,谁都能听得懂。

openctp公众号

微信公众号

精品文章:

注:openctp不对模拟交易及相关服务作任何保证,使用openctp产品进行实盘交易的后果完全由使用者自己承担。

webctp's People

Contributors

dennisxie avatar hcisgood avatar jedore avatar krenx1983 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

webctp's Issues

添加启动脚本

添加各个平台的启动脚本,方便一键启动分为如下几个脚本

# Windows
webctp_md.ps1 -c configure_file
webctp_td.ps1 -c configure_file
# Linux
webctp_md.sh -c configure_file
webctp_td.sh -c configure_file
# MacOS
webctp_md.sh -c configure_file
webctp_td.sh -c configure_file

Add request validation code.

Requirements:

  • Can easily define the validation strategy.
  • Easy to use.
  • Better to throw an exception with the response info, then we can catch it and return it in the connection.

查询交易所、产品、行情、持仓明细、保证金率、手续费、交易成本和合约手续费API及SPI函数

相关issue #5

///请求查询交易所
virtual int ReqQryExchange(CThostFtdcQryExchangeField *pQryExchange, int nRequestID) = 0;

///请求查询产品
virtual int ReqQryProduct(CThostFtdcQryProductField *pQryProduct, int nRequestID) = 0;

///请求查询合约
virtual int ReqQryInstrument(CThostFtdcQryInstrumentField *pQryInstrument, int nRequestID) = 0;

///请求查询行情
virtual int ReqQryDepthMarketData(CThostFtdcQryDepthMarketDataField *pQryDepthMarketData, int nRequestID) = 0;
///请求查询投资者持仓明细
virtual int ReqQryInvestorPositionDetail(CThostFtdcQryInvestorPositionDetailField *pQryInvestorPositionDetail, int nRequestID) = 0;
///请求查询交易所保证金率
virtual int ReqQryExchangeMarginRate(CThostFtdcQryExchangeMarginRateField *pQryExchangeMarginRate, int nRequestID) = 0;
///请求查询报单手续费
virtual int ReqQryInstrumentOrderCommRate(CThostFtdcQryInstrumentOrderCommRateField *pQryInstrumentOrderCommRate, int nRequestID) = 0;
///请求查询期权交易成本
virtual int ReqQryOptionInstrTradeCost(CThostFtdcQryOptionInstrTradeCostField *pQryOptionInstrTradeCost, int nRequestID) = 0;

///请求查询期权合约手续费
virtual int ReqQryOptionInstrCommRate(CThostFtdcQryOptionInstrCommRateField *pQryOptionInstrCommRate, int nRequestID) = 0;

补充行情接口的相关API和SPI

请另外建一个issue说明在补充哪些API和SPI,新建的issue请引用本issue并在本issue下comment,然后把开发中的API和SPI填写在开发中一栏,merge以后再改到已有中。

已有

  • login
  • SubscribeMarketData
  • OnRspSubscribeMarketData
  • UnSubscribeMarketData
  • OnRspUnSubMarketData
  • OnRtnDepthMarketData

开发中

未开发

  • GetTradingDay
  • RegisterFensUserInfo
  • RegisterNameServer
  • ReqQryMulticastInstrument
  • ReqUserLogout
  • SubscribeForQuoteRsp
  • UnSubscribeForQuoteRsp
  • OnHeartBeatWarning
  • OnRspError
  • OnRspQryMulticastInstrument
  • OnRspSubForQuoteRsp
  • OnRspUnSubForQuoteRsp
  • OnRspUserLogout
  • OnRtnForQuoteRsp

Repeated client

Now one connection(websocket) has one client(md/td).
If the same user login by multi clients, then server will create multi same clients which are repeated.
Can webctp avoid the repeated resources ?

查询成交、持仓、资金账户、投资者、交易编码、保证金率和手续费率的API和SPI函数

相关issue #5
///请求查询成交
virtual int ReqQryTrade(CThostFtdcQryTradeField *pQryTrade, int nRequestID) = 0;

///请求查询投资者持仓
virtual int ReqQryInvestorPosition(CThostFtdcQryInvestorPositionField *pQryInvestorPosition, int nRequestID) = 0;

///请求查询资金账户
virtual int ReqQryTradingAccount(CThostFtdcQryTradingAccountField *pQryTradingAccount, int nRequestID) = 0;

///请求查询投资者
virtual int ReqQryInvestor(CThostFtdcQryInvestorField *pQryInvestor, int nRequestID) = 0;

///请求查询交易编码
virtual int ReqQryTradingCode(CThostFtdcQryTradingCodeField *pQryTradingCode, int nRequestID) = 0;

///请求查询合约保证金率
virtual int ReqQryInstrumentMarginRate(CThostFtdcQryInstrumentMarginRateField *pQryInstrumentMarginRate, int nRequestID) = 0;

///请求查询合约手续费率
virtual int ReqQryInstrumentCommissionRate(CThostFtdcQryInstrumentCommissionRateField *pQryInstrumentCommissionRate, int nRequestID) = 0;

Unit test

  • For clients package.
  • For service package.

添加报单相关以及口令更新的API和SPI方法

关联单#5

///用户口令更新请求
virtual int ReqUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, int nRequestID) = 0;
///报单录入请求
virtual int ReqOrderInsert(CThostFtdcInputOrderField *pInputOrder, int nRequestID) = 0;
///报单操作请求
virtual int ReqOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, int nRequestID) = 0;
///查询最大报单数量请求
virtual int ReqQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, int nRequestID) = 0;
///请求查询报单
virtual int ReqQryOrder(CThostFtdcQryOrderField *pQryOrder, int nRequestID) = 0;

通过pypi进行发布

通过pip install webctp进行安装,用户可以引用webctp中的app进行自定义的启动。

补充交易接口的API和SPI

请另外建一个issue说明在补充哪些API和SPI,新建的issue请引用本issue并在本issue下comment,然后把开发中的API和SPI填写在开发中一栏,merge以后再改到已有中。

已有

  • login
  • ReqQryInstrument
  • OnRspReqQryInstrument

开发中

  • ReqUserPasswordUpdate
  • OnRspUserPasswordUpdate
  • ReqOrderInsert
  • OnRspOrderInsert
  • OnErrRtnOrderInsert
  • ReqOrderAction
  • OnRspOrderAction
  • OnErrRtnOrderAction
  • ReqQryMaxOrderVolume
  • OnRspQryMaxOrderVolume
  • ReqQryOrder
  • OnRspQryOrder

未开发

  • GetApiVersion
  • GetTradingDay
  • RegisterFensUserInfo
  • RegisterNameServer
  • RegisterUserSystemInfo
  • ReqBatchOrderAction
  • ReqCombActionInsert
  • ReqExecOrderAction
  • ReqExecOrderInsert
  • ReqForQuoteInsert
  • ReqFromBankToFutureByFuture
  • ReqFromFutureToBankByFuture
  • ReqGenUserCaptcha
  • ReqGenUserText
  • ReqOptionSelfCloseAction
  • ReqOptionSelfCloseInsert
  • ReqParkedOrderAction
  • ReqParkedOrderInsert
  • ReqQryAccountregister
  • ReqQryBrokerTradingAlgos
  • ReqQryBrokerTradingParams
  • ReqQryCFMMCTradingAccountKey
  • ReqQryClassifiedInstrument
  • ReqQryCombAction
  • ReqQryCombInstrumentGuard
  • ReqQryCombPromotionParam
  • ReqQryContractBank
  • ReqQryDepthMarketData
  • ReqQryEWarrantOffset
  • ReqQryExchange
  • ReqQryExchangeMarginRate
  • ReqQryExchangeMarginRateAdjust
  • ReqQryExchangeRate
  • ReqQryExecOrder
  • ReqQryForQuote
  • ReqQryInstrumentCommissionRate
  • ReqQryInstrumentMarginRate
  • ReqQryInstrumentOrderCommRate
  • ReqQryInvestUnit
  • ReqQryInvestor
  • ReqQryInvestorPosition
  • ReqQryInvestorPositionCombineDetail
  • ReqQryInvestorPositionDetail
  • ReqQryInvestorProductGroupMargin
  • ReqQryMMInstrumentCommissionRate
  • ReqQryMMOptionInstrCommRate
  • ReqQryNotice
  • ReqQryOptionInstrCommRate
  • ReqQryOptionInstrTradeCost
  • ReqQryOptionSelfClose
  • ReqQryParkedOrder
  • ReqQryParkedOrderAction
  • ReqQryProduct
  • ReqQryProductExchRate
  • ReqQryProductGroup
  • ReqQryQuote
  • ReqQryRiskSettleInvstPosition
  • ReqQryRiskSettleProductStatus
  • ReqQrySecAgentACIDMap
  • ReqQrySecAgentCheckMode
  • ReqQrySecAgentTradeInfo
  • ReqQrySecAgentTradingAccount
  • ReqQrySettlementInfo
  • ReqQrySettlementInfoConfirm
  • ReqQryTrade
  • ReqQryTraderOffer
  • ReqQryTradingAccount
  • ReqQryTradingCode
  • ReqQryTradingNotice
  • ReqQryTransferBank
  • ReqQryTransferSerial
  • ReqQueryBankAccountMoneyByFuture
  • ReqQueryCFMMCTradingAccountToken
  • ReqQuoteAction
  • ReqQuoteInsert
  • ReqRemoveParkedOrder
  • ReqRemoveParkedOrderAction
  • ReqSettlementInfoConfirm
  • ReqTradingAccountPasswordUpdate
  • ReqUserAuthMethod
  • ReqUserLoginWithCaptcha
  • ReqUserLoginWithOTP
  • ReqUserLoginWithText
  • ReqUserLogout
  • SubmitUserSystemInfo
  • SubscribePrivateTopic
  • SubscribePublicTopic

  • OnErrRtnBankToFutureByFuture
  • OnErrRtnBatchOrderAction
  • OnErrRtnCombActionInsert
  • OnErrRtnExecOrderAction
  • OnErrRtnExecOrderInsert
  • OnErrRtnForQuoteInsert
  • OnErrRtnFutureToBankByFuture
  • OnErrRtnOptionSelfCloseAction
  • OnErrRtnOptionSelfCloseInsert
  • OnErrRtnQueryBankBalanceByFuture
  • OnErrRtnQuoteAction
  • OnErrRtnQuoteInsert
  • OnErrRtnRepealBankToFutureByFutureManual
  • OnErrRtnRepealFutureToBankByFutureManual
  • OnHeartBeatWarning
  • OnRspBatchOrderAction
  • OnRspCombActionInsert
  • OnRspError
  • OnRspExecOrderAction
  • OnRspExecOrderInsert
  • OnRspForQuoteInsert
  • OnRspFromBankToFutureByFuture
  • OnRspFromFutureToBankByFuture
  • OnRspGenUserCaptcha
  • OnRspGenUserText
  • OnRspOptionSelfCloseAction
  • OnRspOptionSelfCloseInsert
  • OnRspParkedOrderAction
  • OnRspParkedOrderInsert
  • OnRspQryAccountregister
  • OnRspQryBrokerTradingAlgos
  • OnRspQryBrokerTradingParams
  • OnRspQryCFMMCTradingAccountKey
  • OnRspQryClassifiedInstrument
  • OnRspQryCombAction
  • OnRspQryCombInstrumentGuard
  • OnRspQryCombPromotionParam
  • OnRspQryContractBank
  • OnRspQryDepthMarketData
  • OnRspQryEWarrantOffset
  • OnRspQryExchange
  • OnRspQryExchangeMarginRate
  • OnRspQryExchangeMarginRateAdjust
  • OnRspQryExchangeRate
  • OnRspQryExecOrder
  • OnRspQryForQuote
  • OnRspQryInstrumentCommissionRate
  • OnRspQryInstrumentMarginRate
  • OnRspQryInstrumentOrderCommRate
  • OnRspQryInvestUnit
  • OnRspQryInvestor
  • OnRspQryInvestorPosition
  • OnRspQryInvestorPositionCombineDetail
  • OnRspQryInvestorPositionDetail
  • OnRspQryInvestorProductGroupMargin
  • OnRspQryMMInstrumentCommissionRate
  • OnRspQryMMOptionInstrCommRate
  • OnRspQryNotice
  • OnRspQryOptionInstrCommRate
  • OnRspQryOptionInstrTradeCost
  • OnRspQryOptionSelfClose
  • OnRspQryParkedOrder
  • OnRspQryParkedOrderAction
  • OnRspQryProduct
  • OnRspQryProductExchRate
  • OnRspQryProductGroup
  • OnRspQryQuote
  • OnRspQryRiskSettleInvstPosition
  • OnRspQryRiskSettleProductStatus
  • OnRspQrySecAgentACIDMap
  • OnRspQrySecAgentCheckMode
  • OnRspQrySecAgentTradeInfo
  • OnRspQrySecAgentTradingAccount
  • OnRspQrySettlementInfo
  • OnRspQrySettlementInfoConfirm
  • OnRspQryTrade
  • OnRspQryTraderOffer
  • OnRspQryTradingAccount
  • OnRspQryTradingCode
  • OnRspQryTradingNotice
  • OnRspQryTransferBank
  • OnRspQryTransferSerial
  • OnRspQueryBankAccountMoneyByFuture
  • OnRspQueryCFMMCTradingAccountToken
  • OnRspQuoteAction
  • OnRspQuoteInsert
  • OnRspRemoveParkedOrder
  • OnRspRemoveParkedOrderAction
  • OnRspSettlementInfoConfirm
  • OnRspTradingAccountPasswordUpdate
  • OnRspUserAuthMethod
  • OnRspUserLogout
  • OnRtnBulletin
  • OnRtnCFMMCTradingAccountToken
  • OnRtnCancelAccountByBank
  • OnRtnChangeAccountByBank
  • OnRtnCombAction
  • OnRtnErrorConditionalOrder
  • OnRtnExecOrder
  • OnRtnForQuoteRsp
  • OnRtnFromBankToFutureByBank
  • OnRtnFromBankToFutureByFuture
  • OnRtnFromFutureToBankByBank
  • OnRtnFromFutureToBankByFuture
  • OnRtnInstrumentStatus
  • OnRtnOpenAccountByBank
  • OnRtnOptionSelfClose
  • OnRtnOrder
  • OnRtnQueryBankBalanceByFuture
  • OnRtnQuote
  • OnRtnRepealFromBankToFutureByBank
  • OnRtnRepealFromBankToFutureByFuture
  • OnRtnRepealFromBankToFutureByFutureManual
  • OnRtnRepealFromFutureToBankByBank
  • OnRtnRepealFromFutureToBankByFuture
  • OnRtnRepealFromFutureToBankByFutureManual
  • OnRtnTrade
  • OnRtnTradingNotice

订阅行情和取消订阅行情的应答数据格式有误

期望为

{
  "MsgType": "OnRspUnSubscribeMarketData",
  "SpecificInstrument": {
    "InstrumentID": "au2305"
  },
  "RspInfo": {
    "ErrorID": 0,
    "ErrorMsg": ""
  },
  "RequestID": 0,
  "IsLast": true
}

实际是

{
    "MsgType": "OnRspSubMarketData",
    "RspInfo": {
        "ErrorID": 0,
        "ErrorMsg": "CTP:No Error"
    },
    "RequestID": 0,
    "IsLast": true,
    "SpecificInstrument": "ag2306"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.