comm

package
v0.0.0-...-0697e30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2020 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OK                   RequestReturnValue = 0  // 0,代表成功。
	NetworkError                            = -1 //-1,表示网络连接失败;
	UnhandlerExceedLimit                    = -2 //-2,表示未处理请求超过许可数;
	QPSExceedLimit                          = -3 //-3,表示每秒发送请求数超过许可数。
)

Variables

This section is empty.

Functions

func DecodeGBK

func DecodeGBK(s string) (string, error)

DecodeGBK convert GBK to UTF-8

func GetFieldValueIgnoreEmptyPassword

func GetFieldValueIgnoreEmptyPassword(field interface{}) map[string]interface{}

func LogReq

func LogReq(reqID int, message string, reqRtn int, reqField interface{})

func RspToError

func RspToError(pRspInfo libctp.CThostFtdcRspInfoField) error

func ShouldDecodeGBK

func ShouldDecodeGBK(s string) string

func StringSlice2C

func StringSlice2C(strs []string) *string

Types

type Account

type Account struct {
	BrokerID string `toml:"broker_id"`
	UserID   string `toml:"user_id"`
	Password string `toml:"password"`
}

Account 为交易CTP交易账户,可用于登录行情、交易前置

type ClientAuth

type ClientAuth struct {
	AppID    string `toml:"app_id"`
	AuthCode string `toml:"auth_code"`
}

type RequestReturnValue

type RequestReturnValue int

func (RequestReturnValue) String

func (i RequestReturnValue) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL