Documentation
¶
Index ¶
- Constants
- type LargeAmountAlert
- type LargeAmountAlertConfig
- type QuoteCurrencyPreference
- type Strategy
- func (s *Strategy) CrossRun(ctx context.Context, _ bbgo.OrderExecutionRouter, ...) error
- func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession)
- func (s *Strategy) Defaults() error
- func (s *Strategy) ID() string
- func (s *Strategy) Initialize() error
- func (s *Strategy) InstanceID() string
- func (s *Strategy) Subscribe(session *bbgo.ExchangeSession)
- func (s *Strategy) Validate() error
Constants ¶
View Source
const ID = "xalign"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LargeAmountAlert ¶ added in v1.61.0
type LargeAmountAlert struct {
SlackAlert *slackalert.SlackAlert
QuoteCurrency string
AlertAmount fixedpoint.Value
BaseCurrency string
Side types.SideType
Price fixedpoint.Value
Quantity fixedpoint.Value
Amount fixedpoint.Value
}
func (*LargeAmountAlert) SlackAttachment ¶ added in v1.61.0
func (m *LargeAmountAlert) SlackAttachment() slack.Attachment
type LargeAmountAlertConfig ¶ added in v1.61.0
type LargeAmountAlertConfig struct {
Slack *slackalert.SlackAlert `json:"slack"`
QuoteCurrency string `json:"quoteCurrency"`
Amount fixedpoint.Value `json:"amount"`
}
type QuoteCurrencyPreference ¶
type Strategy ¶
type Strategy struct {
*bbgo.Environment
Interval types.Interval `json:"interval"`
PreferredSessions []string `json:"sessions"`
PreferredQuoteCurrencies *QuoteCurrencyPreference `json:"quoteCurrencies"`
ExpectedBalances map[string]fixedpoint.Value `json:"expectedBalances"`
UseTakerOrder bool `json:"useTakerOrder"`
DryRun bool `json:"dryRun"`
BalanceToleranceRange fixedpoint.Value `json:"balanceToleranceRange"`
Duration types.Duration `json:"for"`
MaxAmounts map[string]fixedpoint.Value `json:"maxAmounts"`
LargeAmountAlert *LargeAmountAlertConfig `json:"largeAmountAlert"`
SlackNotify bool `json:"slackNotify"`
SlackNotifyMentions []string `json:"slackNotifyMentions"`
SlackNotifyThresholdAmount fixedpoint.Value `json:"slackNotifyThresholdAmount,omitempty"`
// contains filtered or unexported fields
}
func (*Strategy) CrossRun ¶
func (s *Strategy) CrossRun(ctx context.Context, _ bbgo.OrderExecutionRouter, sessions map[string]*bbgo.ExchangeSession) error
func (*Strategy) CrossSubscribe ¶
func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession)
func (*Strategy) Initialize ¶ added in v1.61.0
func (*Strategy) InstanceID ¶
func (*Strategy) Subscribe ¶
func (s *Strategy) Subscribe(session *bbgo.ExchangeSession)
Click to show internal directories.
Click to hide internal directories.