kungfu-origin / kungfu Goto Github PK
View Code? Open in Web Editor NEWKungfu Trader
License: Apache License 2.0
Kungfu Trader
License: Apache License 2.0
page.h 缺少一个配对的pack(push)
会不会导致windows的bug
原来要先启动master
已经修改core里的pipfile
并且执行yarn yarn build
还是不行 提示:
in
import yaml
ModuleNotFoundError: No module named 'yaml'
请问在kungfu中,我需要指定认证码,应该在哪里添加啊。
kungfu.json中有个Auth字段设置为true,但是具体的认证码,不知道应该添加在哪里。
check with kungfuctl 'status' command, the td engine is running for 4 hours.
but check the td's log, some contents are dispear between the up running time.
I dont know how to reproduce it or how to debug.
does anyone meet this issue before?
I saw in the definition of LFRspAccountField type in LFDataStruct.h there is a para named MarketValue
while in parseFrom function from ctp.h under longfist folder there is no convert code for it. The final line of this function is Equity
感谢开源,simnow网站提供的md td端口全部都ping不到了,导致无法测试,请问有没有其他测试方式?
……
-- Performing Test HAS_FLTO - Success
-- LTO enabled
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_LIBRARY (ADVANCED)
linked by target "strategy_util" in directory /opt/kungfu/v2.0/kungfu/cpp/wingchun/strategy
-- Configuring incomplete, errors occurred!
See also "/opt/kungfu/v2.0/kungfu/build/CMakeFiles/CMakeOutput.log".
See also "/opt/kungfu/v2.0/kungfu/build/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
我安装好了rpm 然后各项都运行正常,kungfu的状态也是active,但是kungfuctl 不能识别
[root@localhost gehua]# docker start kungfu
kungfu
[root@localhost gehua]# docker exec -it kungfu bash
[root@localhost /]# systemctl start kungfu
[root@localhost /]# systemctl status kungfu
* kungfu.service - Kungfu Master Trading System Daemon
Loaded: loaded (/etc/systemd/system/multi-user.target.wants/kungfu.service)
Active: active (running) since Thu 2018-03-15 19:29:20 CST; 16min ago
Process: 22 ExecStart=/usr/bin/supervisord -c /opt/kungfu/master/etc/supervisor/supervisord.conf (code=exited, status=0/SUCCESS)
Main PID: 174 (supervisord)
CGroup: /system.slice/docker-5f80f25d46a4bd5fe8fa9df4b550f13f33e046788544ad0e5df01a8114aff35c.scope/system.slice/kungfu.service
`-174 /usr/bin/python /usr/bin/supervisord -c /opt/kungfu/master/etc/supervisor/supervisord.conf
[root@localhost /]# kungfuctl
bash: kungfuctl: command not found
我把我安装的文件内容也贴出来:
[root@localhost /]# ls
anaconda-post.log boot etc kungfu lib64 media opt root sbin srv tmp var
bin dev home lib lost+found mnt proc run shared sys usr
[root@localhost /]# cd kungfu
[root@localhost kungfu]# ls
CMakeLists.txt LICENSE README.md build cmake doc longfist python rpm wingchun yijinjing
[root@localhost kungfu]# cd build
[root@localhost build]# ls
CMakeCache.txt CPackSourceConfig.cmake cmake_install.cmake longfist yijinjing
CMakeFiles Makefile install_manifest.txt rpm
CPackConfig.cmake _CPack_Packages kungfu-0.0.5-Linux.rpm wingchun
不知道怎么办了 试了在container每一层执行kungfuctl都不能识别
一个策略启动后,过一晚上,md_engine就不会调用on_bar或则on_ticker函数了。不知道是不是yjj中的engine_start/end_time的问题
yarn install v1.22.10
[1/4] Resolving packages...
success Already up-to-date.
$ yarn wsrun --serial install-deps && npm config set kungfu-core:runtime electron
yarn run v1.22.10
$ /home/zhech/Works/kungfu/node_modules/.bin/wsrun --serial install-deps
kungfu-core
$ cross-env PIPENV_TIMEOUT=600 pipenv --three install
| Virtualenv already exists!
| Removing existing virtualenv...
| Creating a virtualenv for this project...
| Pipfile: /home/zhech/Works/kungfu/core/Pipfile
| Using /usr/bin/python3.6m (3.6.8) to create virtualenv...
⠦ Creating virtual environment...created virtual environment CPython3.6.8.final.0-64 in 371ms
| creator CPython3Posix(dest=/home/zhech/.local/share/virtualenvs/core-xouqbSRt, clear=False, global=False)
| seeder FromAppData(download=False, pip=bundle, wheel=bundle, setuptools=bundle, via=copy, app_data_dir=/home/zhech/.local/share/virtualenv)
| added seed packages: pip==20.2.4, setuptools==50.3.2, wheel==0.35.1
| activators PythonActivator,FishActivator,XonshActivator,CShellActivator,PowerShellActivator,BashActivator
|
|✔ Successfully created virtual environment!
| Virtualenv location: /home/zhech/.local/share/virtualenvs/core-xouqbSRt
| Virtualenv already exists!
| Removing existing virtualenv...
| Creating a virtualenv for this project...
| Pipfile: /home/zhech/Works/kungfu/core/Pipfile
| Using /usr/bin/python3.6m (3.6.8) to create virtualenv...
⠼ Creating virtual environment...created virtual environment CPython3.6.8.final.0-64 in 233ms
| creator CPython3Posix(dest=/home/zhech/.local/share/virtualenvs/core-xouqbSRt, clear=False, global=False)
| seeder FromAppData(download=False, pip=bundle, wheel=bundle, setuptools=bundle, via=copy, app_data_dir=/home/zhech/.local/share/virtualenv)
| added seed packages: pip==20.2.4, setuptools==50.3.2, wheel==0.35.1
| activators PythonActivator,FishActivator,XonshActivator,CShellActivator,PowerShellActivator,BashActivator
|
|✔ Successfully created virtual environment!
| Virtualenv location: /home/zhech/.local/share/virtualenvs/core-xouqbSRt
| Pipfile.lock not found, creating...
| Locking [dev-packages] dependencies...
Building requirements...
Resolving dependencies...
⠴ Locking..✔ Success!
| Locking [packages] dependencies...
⠋ Locking...Building requirements...
Resolving dependencies...
⠙ Locking..✘ Locking Failed!
| Traceback (most recent call last):
| File "/usr/lib/python2.7/site-packages/pipenv/resolver.py", line 763, in
| main()
| File "/usr/lib/python2.7/site-packages/pipenv/resolver.py", line 759, in main
| parsed.requirements_dir, parsed.packages, parse_only=parsed.parse_only)
| File "/usr/lib/python2.7/site-packages/pipenv/resolver.py", line 741, in _main
| resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
| File "/usr/lib/python2.7/site-packages/pipenv/resolver.py", line 709, in resolve_packages
| requirements_dir=requirements_dir,
| File "/usr/lib/python2.7/site-packages/pipenv/resolver.py", line 692, in resolve
| req_dir=requirements_dir
| File "/usr/lib/python2.7/site-packages/pipenv/utils.py", line 1386, in resolve_deps
| req_dir=req_dir,
| File "/usr/lib/python2.7/site-packages/pipenv/utils.py", line 1091, in actually_resolve_deps
| deps, index_lookup, markers_lookup, project, sources, req_dir, clear, pre
| File "/usr/lib/python2.7/site-packages/pipenv/utils.py", line 649, in create
| pre=pre, clear=clear
| File "/usr/lib/python2.7/site-packages/pipenv/utils.py", line 463, in get_metadata
| req, resolver=transient_resolver
| File "/usr/lib/python2.7/site-packages/pipenv/utils.py", line 610, in get_deps_from_req
| best_match = pypi.find_best_match(req.ireq) if pypi else None
| File "/usr/lib/python2.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 205, in find_best_match
| raise NoCandidateFound(ireq, all_candidates, self.finder)
| pipenv.patched.piptools.exceptions.NoCandidateFound: Could not find a version that matches pywin32==227
| No versions found
| Was http://mirrors.aliyun.com/pypi/simple/ reachable?
|
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
| yarn install-deps
failed with exit code 1
kungfu
$ electron-builder install-app-deps
| • electron-builder version=21.2.0
| • loaded configuration file=package.json ("build" field)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
My Python version is 2.7.5, Python3 version is 3.6.8
Not Found - GET https://registry.npmjs.com/kungfu-core - Not found
npm ERR! 404
npm ERR! 404 '[email protected]' is not in the npm registry.
最后一次更新是在好几个月之前了,是不是只忙着商业化去了?
请问为什么不用异步模式,异步模式不是会更快些么
Tried to build from source, yarn reported couple of warnings and stucked as below.
[kungfu@ydjf53 kungfu-master]$ yarn install
yarn install v1.17.3
info No lockfile found.
[1/4] Resolving packages...
warning workspace-aggregator-9d535efa-1199-4c10-bab5-91dae1afe7ea > kungfu > @babel/[email protected]: 🚨 As of Babel 7.4.0, this
package has been deprecated in favor of directly
including core-js/stable (to polyfill ECMAScript
features) and regenerator-runtime/runtime
(needed to use transpiled generator functions):import "core-js/stable";
import "regenerator-runtime/runtime";
warning workspace-aggregator-9d535efa-1199-4c10-bab5-91dae1afe7ea > kungfu > [email protected]: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
warning workspace-aggregator-9d535efa-1199-4c10-bab5-91dae1afe7ea > kungfu-core > cross-var > [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
warning workspace-aggregator-9d535efa-1199-4c10-bab5-91dae1afe7ea > kungfu > babili-webpack-plugin > [email protected]: babili has been renamed to babel-minify. Please update to babel-preset-minify
warning workspace-aggregator-9d535efa-1199-4c10-bab5-91dae1afe7ea > kungfu > taskkill > execa > [email protected]: cross-spawn no longer requires a build toolchain, use it instead
warning workspace-aggregator-9d535efa-1199-4c10-bab5-91dae1afe7ea > kungfu > vue-loader > postcss-selector-parser > [email protected]: I wrote this module a very long time ago; you should use something else.
warning workspace-aggregator-9d535efa-1199-4c10-bab5-91dae1afe7ea > kungfu > electron > electron-download > nugget > progress-stream > through2 > xtend > [email protected]:
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
[2/4] Fetching packages...
[##########################################################################################################################] 1414/1415
#include <iostream>
#include "time.h"
int main() {
std::cout << "Hello, World!" << std::endl;
std::cout << "now in nano: "<< kungfu::yijinjing::time::now_in_nano()<< std::endl;
std::cout << "now: "<< kungfu::yijinjing::time::strftime(kungfu::yijinjing::time::now_in_nano())<< std::endl;
std::cout << "now: "<<kungfu::yijinjing::time::strptime(kungfu::yijinjing::time::strftime(kungfu::yijinjing::time::now_in_nano()))<< std::endl;
return 0;
}
(base) root@b76d5c11d5b9:/home/nanotime/build# ./nanotime
Hello, World!
now in nano: 1646633741961977443
now: 2022-03-07 14:15:41.961982479
now: -2209104342037912081
strategy.h缺少头文件#include
Mac和linux上,项目运行起来cpu占用率持续都是满的,这么耗能?
Hi, how can i get english language for Windows Build ?
Thank you.
kungfu的这个项目的安装配置说明写的很杂乱,一时说用docker,一时说源码编译。条理比较混乱,让人走了不少的弯路。建议理清下整个readme.md。
CMake Error at /kungfu/build/cmake_install.cmake:36 (file):
file INSTALL cannot copy file
"/kungfu/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/longfist/api/xtp/XTP_API_20171115_1.1.16.9/doc/XTP
QuoteAPI使用UDP常见问题.doc" to
"/kungfu/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/build/_CPack_Packages/Linux/RPM/kungfu-0.0.5-Linux/opt/kungfu/master/lib/longfist/api/xtp/XTP_API_20171115_1.1.16.9/doc/XTP
QuoteAPI使用UDP常见问题.doc".
CPack Error: Error when generating package: kungfu
make: *** [package] Error 1
kungfu-cli 要在哪里下载呢?
IWCDataProcessor.h 第 50 行
virtual void on_rsp_order(const LFInputOrderField* data, int request_id, short source, long rcv_time, short erorId=0, const char* errorMsg=nullptr) = 0;
既然是 rsp_order, 第一个参数应该是 const LFRtnOrderField* data 吧。响应返回的数据。
First of all, great project, thank you so much for open sourcing it.
At the same time I have a suggestion: why not provide some support for RPC/IPC interface? With this approach, users from different backtesting systems can take kungfu as an execution system/server, which is supposed to be the superior advantage of kungfu system, right? This can detour the limit and open the door to attract much more users (potentially using different backtesting systems, different languages other than python 2.7 and c++, different oses othan than centos ) to join the community.
错误 One or more carriage-return \r (^M) (Windows endline) found; Use only UNIX endline \n [whitespace/newline] [5] SQLiteCpp_cpplint E:\kungfu-v2\cpp\deps\SQLiteCpp-2.3.0\include\SQLiteCpp\SQLiteCpp.h 1
我的版本是1.0, 能告诉我TDEngine获取下单信息的代码在那么。 listening 函数中的reader好像只读了STSTEM文件
[4/4] Building fresh packages...
[-/6] ⠁ waiting...
[-/6] ⠁ waiting...
[3/6] ⠂ electron
[-/6] ⠂ waiting...
error /mnt/d/GoogleDownload/kungfu-2.1/kungfu-2.1/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /mnt/d/GoogleDownload/kungfu-2.1/kungfu-2.1/node_modules/electron
Output:
Downloading tmp-6456-0-electron-v4.2.11-linux-x64.zip
Error: connect ETIMEDOUT 20.205.243.166:443
/mnt/d/GoogleDownload/kungfu-2.1/kungfu-2.1/node_modules/electron/install.js:49
throw err
^
最新的提交代码,编译后有报错
marketdata_xtp.cpp:69:43: error: member reference base type 'char const[32]' is not a structure or union
[11/30 20:32:48.821780142] [ info ] [ 16926/16926 ] [hero.cpp:91#run] td/ctp/085715/live [21e59816] running
[11/30 20:32:48.821896991] [ info ] [ 16926/16926 ] [hero.cpp:92#run] from 2019-11-30 20:32:48.772408189 until end of world
[11/30 20:32:48.826441857] [ info ] [ 16926/16926 ] [hero.cpp:140#register_location] registered location td/ctp/085715/live [21e59816]
[11/30 20:32:48.827603456] [ info ] [ 16926/16926 ] [hero.cpp:140#register_location] registered location td/ctp/085715/live [21e59816]
[11/30 20:32:48.827633135] [ info ] [ 16926/16926 ] [hero.cpp:140#register_location] registered location system/master/21e59816/live [dcda860d]
[11/30 20:32:48.827650124] [ info ] [ 16926/16926 ] [hero.cpp:140#register_location] registered location system/master/a003b4f1/live [8b221a30]
[11/30 20:32:48.827665290] [ info ] [ 16926/16926 ] [hero.cpp:140#register_location] registered location system/service/ledger/live [a003b4f1]
[11/30 20:32:48.827776404] [ info ] [ 16926/16926 ] [trader_ctp.cpp:37#on_start] create ctp td api with path: /home/william/.config/kungfu/app/td/ctp/085715/log/live
[11/30 20:32:48.833837328] [ info ] [ 16926/16926 ] [apprentice.cpp:258#on_read_from] system/master/21e59816/live [dcda860d] asks observe at system/service/ledger/live [a003b4f1] 2019-11-30 20:32:48.828884276 from 2019-11-30 20:32:48.827727419
[11/30 20:32:48.834987715] [ info ] [ 16926/16926 ] [hero.cpp:162#register_channel] registered channel [a003b4f121e59816] from system/service/ledger/live [a003b4f1] to td/ctp/085715/live [21e59816]
[11/30 20:32:48.933743940] [ info ] [ 16926/16937 ] [trader_ctp.cpp:212#OnFrontConnected] connected
[11/30 20:32:48.933949770] [critical] [ 16926/16937 ] [signal.cpp:108#kf_os_signal_handler] bus error
[11/30 20:32:48.942212122] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7f010e404801]
[11/30 20:32:48.942239558] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /lib/x86_64-linux-gnu/libc.so.6(+0x89897) [0x7f010e44d897]
[11/30 20:32:48.942243233] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /lib/x86_64-linux-gnu/libc.so.6(+0x134cff) [0x7f010e4f8cff]
[11/30 20:32:48.942246100] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /lib/x86_64-linux-gnu/libc.so.6(+0x134d21) [0x7f010e4f8d21]
[11/30 20:32:48.942249681] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /lib/x86_64-linux-gnu/libc.so.6(+0x132a10) [0x7f010e4f6a10]
[11/30 20:32:48.942253166] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /lib/x86_64-linux-gnu/libc.so.6(+0x131ca2) [0x7f010e4f5ca2]
[11/30 20:32:48.942256584] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/kfext_ctp.cpython-37m-x86_64-linux-gnu.so(+0x4adf5) [0x7f00f8239df5]
[11/30 20:32:48.942259978] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/libctpthosttraderapi.so(_ZN25CThostFtdcUserApiImplBase17OnRspVerifyApiKeyEP12CFTDCPackage+0x69) [0x7f00f7170539]
[11/30 20:32:48.942263017] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/libctpthosttraderapi.so(_ZN25CThostFtdcUserApiImplBase13HandlePackageEP12CFTDCPackageP12CFTDCSession+0x165) [0x7f00f7174dc5]
[11/30 20:32:48.942267096] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/libctpthosttraderapi.so(ZN9CProtocol13HandlePackageEP8CPackagePS+0x2d) [0x7f00f70c44cd]
[11/30 20:32:48.942271479] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/libctpthosttraderapi.so(_ZN17CCompressProtocol3PopEP8CPackage+0x92) [0x7f00f70cd452]
[11/30 20:32:48.942275080] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/libctpthosttraderapi.so(ZN9CProtocol13HandlePackageEP8CPackagePS+0x2d) [0x7f00f70c44cd]
[11/30 20:32:48.942316395] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/libctpthosttraderapi.so(ZN9CProtocol13HandlePackageEP8CPackagePS+0x2d) [0x7f00f70c44cd]
[11/30 20:32:48.942321584] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/libctpthosttraderapi.so(_ZN16CChannelProtocol11HandleInputEv+0x30) [0x7f00f70c4de0]
[11/30 20:32:48.942324615] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/libctpthosttraderapi.so(_ZN14CSelectReactor10DispatchIOER6fd_setS1_Ri+0x74) [0x7f00f70c0124]
[11/30 20:32:48.942328528] [critical] [ 16926/16937 ] [stacktrace.cpp:118#print_stack_trace] /tmp/.mount_KungfuGCD6wf/resources/kfc/extensions/ctp/libctpthosttraderapi.so(_ZN14CSelectReactor11DispatchIOsEv+0xf5) [0x7f00f70c0265]
Locking [packages] dependencies…,
然后报错编译失败。
尝试过切换pip源
还是无济于事。
In core/python/kungfu/wingchun/book/position.py
def _apply_close(self, trade):
if self.volume < trade.volume:
raise Exception("{} over close position, current volume is {}, {} to close".format(self.uname, self.volume, trade.volume))
if trade.offset == Offset.CloseToday and self.volume - self.yesterday_volume < trade.volume:
raise Exception("{} over close today position, current volume is {}, {} to close".format(self.uname, self.volume - self.yesterday_volume, trade.volume))
margin = self.contract_multiplier * trade.price * trade.volume * self.margin_ratio
self.margin -= margin
self.book.avail += margin
self.volume -= trade.volume
if self.yesterday_volume > 0 and trade.offset != Offset.CloseToday:
self.yesterday_volume = 0 if self.yesterday_volume <= trade.volume else \
self.yesterday_volume - trade.volume
realized_pnl = (trade.price - self.avg_open_price) * trade.volume * \
self.contract_multiplier * (1 if self.direction == Direction.Long else -1)
self.realized_pnl += realized_pnl
self.book.realized_pnl += realized_pnl
对于**期货市场,平今仓的时候应该返还开仓保证金,在Rolling Day的时候应该按照逐日盯市的方式重新计算保证金,平昨仓按照新的保证金返还。
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
26355 666 20 0 797620 26788 16796 S 100.7 0.7 5:32.65 wingchun
8814 666 20 0 1501884 23720 15396 S 100.3 0.6 1406:29 yjj
8955 666 20 0 597716 33260 24120 S 100.0 0.8 1395:33 wingchun
1 root 20 0 137236 4820 3368 S 0.0 0.1 0:10.04 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.04 kthreadd
I enter the command:Top,but cpu is 100%,why?
how to modify ? it is very power
很多npm 包过时,不再支持低版本了,更新的依赖包时会出现低版本包没法下载或者node版本过低的报错,求更新一份可以编译的依赖配置
Sent from PPHub
RT
^Cuseradd: user 'bruce' already exists
warning: %post(kungfu-0.0.2-20171123112041.x86_64) scriptlet failed, signal 2
Non-fatal POSTIN scriptlet failure in rpm package kungfu-0.0.2-20171123112041.x86_64
centos 7 x64 node 10.15.3 yarn 1.17.3
got this error:
[leo@192 kungfu]$ yarn build
yarn run v1.17.3
$ yarn wsrun --serial --fast-exit build
$ /home/leo/Documents/src_codes/kungfu/node_modules/.bin/wsrun --serial --fast-exit build
kungfu-core
$ yarn run build:cpp && yarn run build:pyi
$ cross-var pipenv run python python/build.py --build_type $npm_package_config_buildtype -l $npm_package_config_loglevel --arch $npm_package_config_arch --runtime $npm_package_config_runtime --node_version $npm_package_config_node --electron_version $npm_package_config_electron make
| /home/leo/Documents/src_codes/kungfu/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328
| throw e;
| ^
|
| Error: Options {"loose":true} passed to /home/leo/Documents/src_codes/kungfu/node_modules/babel-preset-env/lib/index.js which does not accept options. (While processing preset: "/home/leo/Documents/src_codes/kungfu/node_modules/babel-preset-env/lib/index.js") (While processing preset: "/home/leo/Documents/src_codes/kungfu/node_modules/babel-preset-env/lib/index.js") (While processing preset: "/home/leo/Documents/src_codes/kungfu/node_modules/babel-preset-es2015/lib/index.js")
| at /home/leo/Documents/src_codes/kungfu/node_modules/babel-core/lib/transformation/file/options/option-manager.js:314:17
| at Array.map ()
| at OptionManager.resolvePresets (/home/leo/Documents/src_codes/kungfu/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
| at OptionManager.mergePresets (/home/leo/Documents/src_codes/kungfu/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
| at OptionManager.mergeOptions (/home/leo/Documents/src_codes/kungfu/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
| at OptionManager.init (/home/leo/Documents/src_codes/kungfu/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
| at compile (/home/leo/Documents/src_codes/kungfu/node_modules/babel-register/lib/node.js:103:45)
| at loader (/home/leo/Documents/src_codes/kungfu/node_modules/babel-register/lib/node.js:144:14)
| at Object.require.extensions.(anonymous function) [as .js] (/home/leo/Documents/src_codes/kungfu/node_modules/babel-register/lib/node.js:154:7)
| at Module.load (internal/modules/cjs/loader.js:600:32)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
| yarn build
failed with exit code 1
Stopping 1 active children
Aborted execution due to previous error
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
在 TraderCTP::OnRspQryInvestorPosition()中需判断pInvestorPosition 是否为空
ubuntu16.04下,boost1.65编译,得到如下信息:
[ 4%] Built target kflog
[ 7%] Linking CXX shared library libjournal.so
[ 31%] Built target journal
Scanning dependencies of target paged
[ 34%] Building CXX object yijinjing/paged/CMakeFiles/paged.dir/PageEngine.cpp.o
[ 36%] Building CXX object yijinjing/paged/CMakeFiles/paged.dir/PageSocketHandler.cpp.o
[ 39%] Building CXX object yijinjing/paged/CMakeFiles/paged.dir/PageServiceTask.cpp.o
[ 41%] Linking CXX shared library libpaged.so
[ 41%] Built target paged
Scanning dependencies of target journal_tool
[ 43%] Building CXX object yijinjing/tools/CMakeFiles/journal_tool.dir/JournalTool.cpp.o
[ 46%] Linking CXX executable journal_tool
../journal/libjournal.so.1.1: undefined reference to `boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
../journal/libjournal.so.1.1: undefined reference to `boost::re_detail::get_mem_block()'
../journal/libjournal.so.1.1: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
../journal/libjournal.so.1.1: undefined reference to `boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
../journal/libjournal.so.1.1: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
../journal/libjournal.so.1.1: undefined reference to `boost::re_detail::put_mem_block(void*)'
../journal/libjournal.so.1.1: undefined reference to `boost::re_detail::raise_runtime_error(std::runtime_error const&)'
collect2: error: ld returned 1 exit status
yijinjing/tools/CMakeFiles/journal_tool.dir/build.make:107: recipe for target 'yijinjing/tools/journal_tool' failed
make[2]: *** [yijinjing/tools/journal_tool] Error 1
CMakeFiles/Makefile2:296: recipe for target 'yijinjing/tools/CMakeFiles/journal_tool.dir/all' failed
make[1]: *** [yijinjing/tools/CMakeFiles/journal_tool.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
原因似乎是因为没有找到boost::re_detail中的函数定义?
是不是因为boost的版本不支持?应该如何修改makefile呢
错误日志:
[ 15%] Building CXX object yijinjing/journal/CMakeFiles/journal.dir/PageUtil.cpp.o
[ 17%] Building CXX object yijinjing/journal/CMakeFiles/journal.dir/PythonExtend.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See http://bugzilla.redhat.com/bugzilla for instructions.
make[2]: *** [yijinjing/journal/CMakeFiles/journal.dir/PythonExtend.cpp.o] Error 4
make[1]: *** [yijinjing/journal/CMakeFiles/journal.dir/all] Error 2
[ 96%] Linking CXX shared library ../../../../../Release/xtp.so
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.30 internal error, aborting at ../../bfd/elf64-x86-64.c:4358 in elf_x86_64_reloc_type_class
/usr/bin/ld: Please report this bug.
collect2: error: ld returned 1 exit status
cpp/wingchun/gateway/xtp/pybind/CMakeFiles/xtp.dir/build.make:109: recipe for target 'Release/xtp.so' failed
make[2]: *** [Release/xtp.so] Error 1
make[2]: *** Deleting file 'Release/xtp.so'
CMakeFiles/Makefile2:2715: recipe for target 'cpp/wingchun/gateway/xtp/pybind/CMakeFiles/xtp.dir/all' failed
make[1]: *** [cpp/wingchun/gateway/xtp/pybind/CMakeFiles/xtp.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
ERR! OMG Process terminated: 2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
在msg.h里面,存在安全问题,
strncpy(this->exchange_id, exchange_id.c_str(), EXCHANGE_ID_LEN)
比如,从 source的 c_str,拷贝n个字符到dest的char数组,这里n与dest的长度相同了,不合适。应该改成:下面这样
strncpy(this->exchange_id, exchange_id.c_str(), EXCHANGE_ID_LEN - 1)
也许我说的不一定对,欢迎argue
yarn build 过程中,kfc-win.spec 文件中报如下错误,
`
| exec(code, spec_namespace)
| File "python\kfc-win.spec", line 7, in
| if distutils.distutils_path.endswith('init.py'):
| AttributeError: module 'distutils' has no attribute 'distutils_path'
`
python 版本 3.7.0
是 python 版本不兼容还是什么问题
描述:
kongfu 容器启动的时候,会加入privileged参数,但是在阿里容器云上,并不支持该参数。
问题:
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.