4 Star 15 Fork 10

蚂蚁web / goctp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

goctp

上海期货交易所 ctp 接口 Golang版 (for linux64)

环境安装

go(版本 go1.15.14)
swig(版本 4.0.2)

构建

码云地址(国内的速度快)
go get -u gitee.com/mayiweb/goctp

github
go get -u github.com/mayiweb/goctp

构建过程比较慢,需要多等一会儿
通过 go get 下载会自动构建,也可以手动构建,进入 gitee.com/mayiweb/goctp 目录 执行 make install 即可

依赖

ctp 默认使用 gbk 编码,需要用到开源库转换为 utf8
go get -u github.com/axgle/mahonia

编译

进入 gitee.com/mayiweb/goctp/demo 目录,或将该目录里面的文件全部复制出来组成一个新项目
make build
编译成功后会在当前目录生成 ctp 可执行文件(可以修改 Makefile 文件改变生成的文件名)
./ctp [运行模式|默认test]

部署发布

生成 ctp 文件后,使用 ldd ctp 命令查看依赖关系,并将如下文件放在同一文件夹(注意需要有执行权限):
    ctp
    libruntime,sync-atomic.so
    libthostmduserapi_se.so
    libthosttraderapi_se.so

将部署目录路径写入 /etc/ld.so.conf 文件最后一行,并执行 /sbin/ldconfig 命令
MIT License Copyright (c) 2019 mayiweb Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

期货期权 ctp 接口 Golang版 (for linux64) 展开 收起
Go
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/mayiweb/goctp.git
git@gitee.com:mayiweb/goctp.git
mayiweb
goctp
goctp
master

搜索帮助