Documentation
¶
Index ¶
- Constants
- func GetSessionAttributes(exchange types.Exchange) (isMargin, isFutures, isIsolated bool, isolatedSymbol string)
- func IsMaxExchange(exchange interface{}) bool
- func New(n types.ExchangeName, options Options) (types.ExchangeMinimal, error)
- func NewPublic(exchangeName types.ExchangeName) (types.Exchange, error)
- func NewWithEnvVarPrefix(n types.ExchangeName, varPrefix string) (types.ExchangeMinimal, error)
- func Register(name types.ExchangeName, factory Factory)
- type Constructor
- type EnvLoader
- type Factory
- type Options
Constants ¶
View Source
const ( OptionKeyAPIKey = "API_KEY" OptionKeyAPISecret = "API_SECRET" OptionKeyAPIPassphrase = "API_PASSPHRASE" OptionKeyAPIPrivateKey = "API_PRIVATE_KEy" )
Variables ¶
This section is empty.
Functions ¶
func GetSessionAttributes ¶ added in v1.37.0
func IsMaxExchange ¶ added in v1.58.0
func IsMaxExchange(exchange interface{}) bool
func New ¶
func New(n types.ExchangeName, options Options) (types.ExchangeMinimal, error)
func NewWithEnvVarPrefix ¶
func NewWithEnvVarPrefix(n types.ExchangeName, varPrefix string) (types.ExchangeMinimal, error)
NewWithEnvVarPrefix allocate and initialize the exchange instance with the given environment variable prefix When the varPrefix is a empty string, the default exchange name will be used as the prefix
func Register ¶ added in v1.63.0
func Register(name types.ExchangeName, factory Factory)
Types ¶
type Constructor ¶ added in v1.63.0
ExchangeConstructor is a function type to create an exchange instance with the given options
type EnvLoader ¶ added in v1.63.0
ExchangeEnvLoader is a function type to load exchange options from environment variables According to pkg/bbgo/environment.go, we must to get the environment variable with %s-api-key so that we can add this custom exchange.
type Factory ¶ added in v1.63.0
type Factory struct {
EnvLoader EnvLoader
Constructor Constructor
}
Directories
¶
| Path | Synopsis |
|---|---|
|
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
|
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
|
Code generated by go:generate; DO NOT EDIT.
|
Code generated by go:generate; DO NOT EDIT. |
|
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Click to show internal directories.
Click to hide internal directories.