# gohs **Repository Path**: mayiweb/gohs ## Basic Information - **Project Name**: gohs - **Description**: 恒生 股票期权 极速api 接口 Golang版 (for linux64) - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 1 - **Created**: 2021-07-21 - **Last Updated**: 2023-12-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gohs 恒生 股票期权 极速api 接口 Golang版 (for linux64) ## 环境 go(版本 go1.15.14) swig(版本 4.0.2) ## 构建 码云地址(国内的速度快) go get -u gitee.com/mayiweb/gohs github go get -u github.com/mayiweb/gohs 构建过程比较慢,需要多等一会儿 通过 go get 下载会自动构建,也可以手动构建,进入 github.com/mayiweb/gohs 目录 执行 make install 即可 如 make install 提示 “go: cannot find main module; see 'go help modules'”,那就使用包管理,命令 go mod init gohs ## 依赖 默认使用 gbk 编码,需要用到开源库转换为 utf8 go get -u github.com/axgle/mahonia ## 编译 进入 github.com/mayiweb/gohs/demo 目录,或将该目录里面的文件全部复制出来组成一个新项目 make build 编译成功后会在当前目录生成 hs 可执行文件(可以修改 Makefile 文件改变生成的文件名) ./hs [运行模式|默认test] ## 部署发布 生成 hs 文件后,使用 ldd hs 命令查看依赖关系,并将api目录下的 .so 文件放在同一文件夹(注意需要有执行权限): hs libruntime,sync-atomic.so libHSTradeApi.so libHSMdApi.so libHsFutuSystemInfo.so libt2sdk.so libtcpsdk.so ... 将部署目录路径写入 /etc/ld.so.conf 文件最后一行,并执行 /sbin/ldconfig 命令