zhangshuiyong / nodequant Goto Github PK
View Code? Open in Web Editor NEW一个基于Node.js的开源量化交易平台,轻巧地开发和部署量化投资策略
License: Apache License 2.0
一个基于Node.js的开源量化交易平台,轻巧地开发和部署量化投资策略
License: Apache License 2.0
MAC环境不支持吗?
engine下mainEngine的subscribeContract是传入两个参数,返回ret.实际上调用了第三个func参数,并且把结果作为参数返回,
我用的是方正期货的接口,看穿式监管生产版本,6.3.15
https://www.founderfu.com/fzzqqh_2019/technology_407.html
可以正常登录交易端口和行情端口。
也可以正常拿到所有合约,但是不管我订阅所有合约还是只订阅一条合约,都只能收到一条推送,之后就收不到了。
如果再次订阅,又会收到一条,并不是持续不断的收到推送。
不知道哪位大佬能帮我看一下这个问题?
node 8下面加载NodeQuant.node失败了,不知道是不是nodejs版本问题
> [email protected] start E:\nodequant\nodequant
> node ./bin/www
CtpClient Node Addon Path:./CTP/win32/x64/NodeQuant.node
module.js:653
return process.dlopen(module, path._makeLong(filename));
^
Error: The specified procedure could not be found.
\\?\E:\nodequant\nodequant\model\client\CTP\win32\x64\NodeQuant.node
at Object.Module._extensions..node (module.js:653:18)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (E:\nodequant\nodequant\model\client\CTPClient.js:10:10)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
可以正常登陆,无法获取市场信息,报错代码77.
NodeQuant <<<<<<<<<<
Date :00:52:46
2018-4-27 00:52:46,信息来源MainEngine ,Msg:MainEngine Start
CtpClient Created
2018-4-27 00:52:46,信息来源CTP ,Msg:Trade Front connected.--> The Login
docker0: Success
2018-4-27 00:52:46,信息来源CTP ,Msg:Trade Front login request sended. Return:0
2018-4-27 00:52:46,信息来源CTP ,Msg:Market Front connected. --> Then Login
docker0: Success
2018-4-27 00:52:46,信息来源CTP ,Msg:Market Front login request sended. return:0
2018-4-27 00:52:46,信息来源CTP ,Msg:CTP Trade Front login successfully
2018-4-27 00:52:46,信息来源CTP ,Msg:Trade Front confirm settlementInfo request sended. Return:0
2018-4-27 00:52:46,信息来源CTP ,Msg:Market Front login successfully
2018-4-27 00:52:46,信息来源CTP ,Msg:Trade Front confirm settlementInfo successfully. --> Then query all contracts.
2018-4-27 00:52:47,信息来源CTP ,Msg:Trade Front query all contract: Received all contracts.
2018-4-27 00:52:47,信息来源StrategyEngine ,Msg:StrategyEngine Start
2018-4-27 00:52:47,信息来源Demo ,Msg:Demo策略启动成功
出现错误来源CTP ,Msg:Market Front Response Error. ErrorId:77,ErrorMsg:undefined
兄弟 读了你的代码,发觉你的js不是很熟练,引擎里的逻辑也有不少可以优化的地方,何不开源出ctp addon的源码,大家一起群策群力,共同维护好这个项目呢?我的软肋在于不会封装ctp addon,但相对精于js和交易,有10年前端经验和四年交易经验,想与你一起做这个项目,但苦于不开源核心代码,真的是不敢用。兄弟考虑考虑。
a.聚焦于Feed/Broker,与backtest/Strategy等模块分离开来
将Feed的数据通过消息队列(NATS/ZeroQM/...)发送出去,再进入到backtest/Strategy模块中去
https://github.com/nats-io/node-nats
b.尽量借鉴gekko/zenbot等基于NodeJS的交易平台,并进行改造
可以把国内的A股相关的tdx,还有IB/Robinhood,还有数字货币的CCXT都加进去,形成统一的Feed/Broker
国内的A股相关的是:
https://github.com/rainx/tdx.js
node-ib
https://github.com/pilwon/node-ib
robinhood-node
https://github.com/aurbano/robinhood-node
数字货币
https://github.com/ccxt-dev/ccxt
有些需要定制一些底层的功能,希望能开源。
CtpClient is undefine!!!CtpClient Only Support Windows Node.js-v8.9.1-32bit/Windows Node.js-v8.9.1-64bit/Linux x64 Node.jsv8.9.1
SgitClient is undefine!!!SgitClient Only Support Windows Node.js-v8.9.1-32bit/Linux x64 Node.js-v8.9.1
NodeQuant <<<<<<<<<<
Date :下午4:50:22
大佬,我是在MAC 搭建了这套环境,目前已经运行不报错了,但是启动的时候CTP Client is undefine 是因为 我的操作系统问题吗?
运行时遇到问题:
module.js:602
return process.dlopen(module, path._makeLong(filename));
^
Error: %1 is not a valid Win32 application.
\?\C:\my\nodequant\nodequant\model\client\CTP\NodeQuant.node
at Object.Module._extensions..node (module.js:602:18)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Function.Module.runMain (module.js:609:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:598:3
遇到一个订阅行情,没收到推送的问题
在node文件中,增加更多的ctp API的支持
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.