Documentation ¶
Index ¶
Constants ¶
View Source
const (
ConfigErrCode = 1001
)
View Source
const (
ExchangeBitmex = "bitmex"
)
Variables ¶
View Source
var ConfigErr = errcode.CreateCoinBaseError( ConfigErrCode, "Invalid config: %s")
Functions ¶
This section is empty.
Types ¶
type CoinCorpConfig ¶
type CoinCorpConfig struct { TimeZone string `toml:"time-zone" json:"time_zone"` Interval []int `toml:"kline-interval" json:"kline_interval"` Http *HttpConfig `toml:"http" json:"http"` Websocket *WebsocketConfig `toml:"websocket" json:"websocket"` ExchangeMap map[string]*ExchangeConfig `toml:"exchange" json:"exchange"` BaseConfig *baseconfig.Config }
func GetCoinCorpConfig ¶
func GetCoinCorpConfig() *CoinCorpConfig
func LoadConfig ¶
func LoadConfig(configPath string, basePath string) *CoinCorpConfig
func (*CoinCorpConfig) LoadFromToml ¶
func (c *CoinCorpConfig) LoadFromToml(configFile string) error
type ExchangeConfig ¶
type ExchangeConfig struct { WebsocketAddress string `toml:"websocket-address" json:"websocket_address"` APIKey string `toml:"api-key" json:"api_key"` APISecret string `toml:"api-secret" json:"api_secret"` Symbols []string `toml:"symbols" json:"symbols"` Topic []string `toml:"topic" json:"topic"` HttpUrl string `toml:"http-url" json:"http_url"` }
type HttpConfig ¶
Click to show internal directories.
Click to hide internal directories.