config

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtpConfig

type CtpConfig struct {
	QuoteHost  string `toml:"quotehost"`
	TradeHost  string `toml:"tradehost"`
	BrokerID   string `toml:"brokerid"`
	InvestorID string `toml:"investorid"`
	Password   string `toml:"password"`
	AppID      string `toml:"appid"`
	AuthCode   string `toml:"authcode"`
}

CTP配置

type DaemonConfig

type DaemonConfig struct {
	Host             string `toml:"host"`
	WebHost          string `toml:"webhost"`
	Channel          string `toml:"channel"`
	GoogleSecret     string `toml:"googlesecret"`
	WebUserName1     string `toml:"webusername1"`
	WebUserPassword1 string `toml:"webuserpassword1"`
	WebUserName2     string `toml:"webusername2"`
	WebUserPassword2 string `toml:"webuserpassword2"`
}

守护程序配置

type MongoDBConfig

type MongoDBConfig struct {
	Uri       string `toml:"uri"`
	Port      int    `toml:"port"`
	Minutes   string `toml:"minutes"`
	Minutes5  string `toml:"minutes5"`
	Minutes10 string `toml:"minutes10"`
	Minutes15 string `toml:"minutes15"`
	Minutes30 string `toml:"minutes30"`
	Minutes60 string `toml:"minutes60"`
	Days      string `toml:"days"`
	Tick      string `toml:"tick"`
}

mongo数据库配置

type QuoteServerConfig

type QuoteServerConfig struct {
	Host    string `toml:"host"`
	WebHost string `toml:"webhost"`
}

行情服务配置

type RedisDBConfig

type RedisDBConfig struct {
	Host string `toml:"host"`
}

redis数据库配置

type RiskControlConfig

type RiskControlConfig struct {
	SingleLeverage int `toml:"singleleverage"`
	MultiLeverage  int `toml:"multileverage"`
}

风控配置

type TomlConfig

type TomlConfig struct {
	QuoteServer QuoteServerConfig
	TradeServer TradeServerConfig
	Daemon      DaemonConfig
	RedisDB     RedisDBConfig
	MongoDB     MongoDBConfig
	Ctp         CtpConfig
	RiskControl RiskControlConfig
}

所有配置

var Conf TomlConfig

type TradeServerConfig

type TradeServerConfig struct {
	Host   string `toml:"host"`
	ApiKey string `toml:"apikey"`
}

交易服务配置

Jump to

Keyboard shortcuts

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