资源介绍
电脑版
golang的ctp接口(linux64)
准备
install go
install swig
建造
export GOROOT=
cd ./src
./make.sh
教程
package main
import (
"ctp"
"fmt"
)
var (
front string = "tcp://asp-sim2-front1.financial-trading-platform.com:26205"
api ctp.CThostFtdcTraderApi
)
type TradeApi struct {
ctp.ThostFtdcTraderSpiImplBase
}
//callback from c++ libararys
func (g *TradeApi) OnFrontConnected() {
fm