All Projects → mayiweb → goctp

mayiweb / goctp

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

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to goctp

snow-ctp
Node CTP Wrapper
Stars: ✭ 15 (-76.19%)
Mutual labels:  ctp
openctp
CTP开放平台提供A股、港股、美股、期货、期权等全品种接入通道,通过提供中泰证券XTP、华鑫证券奇点、东方证券OST、东方财富证券EMT、盈透证券TWS等各通道的CTPAPI接口,CTP程序可以无缝对接各股票柜台。平台也提供了一套基于TTS交易系统的模拟环境,同样提供了CTPAPI兼容接口,可以替代Simnow,为CTP量化交易开发者提供7x24可用的模拟环境。
Stars: ✭ 389 (+517.46%)
Mutual labels:  ctp
ctp-rs
A Rust wrapper of CTP API
Stars: ✭ 74 (+17.46%)
Mutual labels:  ctp
MarketHub
CTP期货数据收集与中转程序
Stars: ✭ 33 (-47.62%)
Mutual labels:  ctp
vnpy3
vnpy3
Stars: ✭ 19 (-69.84%)
Mutual labels:  ctp
ftdc
implement ftdc protocol of CTP in java
Stars: ✭ 34 (-46.03%)
Mutual labels:  ctp
backend-ctp
CTP接口封装,使用redis做消息中转
Stars: ✭ 26 (-58.73%)
Mutual labels:  ctp
Kungfu
Kungfu Trader
Stars: ✭ 2,536 (+3925.4%)
Mutual labels:  ctp
trader
交易模块
Stars: ✭ 20 (-68.25%)
Mutual labels:  ctp

goctp

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

环境

install go
install swig

构建

go get -u github.com/mayiweb/goctp
构建过程比较慢,需要多等一会儿
通过 go get 下载会自动构建,也可以手动构建,进入 github.com/mayiweb/goctp 目录 执行 make install 即可
码云地址(国内的速度快):gitee.com/mayiweb/goctp

依赖

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

编译

进入 github.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 命令
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].