Documentation ¶
Index ¶
Constants ¶
View Source
const ID = "xbalance"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶ added in v1.17.0
type Address struct { Address string `json:"address"` AddressTag string `json:"addressTag"` Network string `json:"network"` ForeignFee fixedpoint.Value `json:"foreignFee"` }
func (*Address) UnmarshalJSON ¶ added in v1.17.0
type State ¶
type State struct { Asset string `json:"asset"` DailyNumberOfTransfers int `json:"dailyNumberOfTransfers,omitempty"` DailyAmountOfTransfers fixedpoint.Value `json:"dailyAmountOfTransfers,omitempty"` Since int64 `json:"since"` }
func (*State) IsOver24Hours ¶ added in v1.17.0
func (*State) SlackAttachment ¶ added in v1.17.0
func (s *State) SlackAttachment() slack.Attachment
type Strategy ¶
type Strategy struct { Notifiability *bbgo.Notifiability *bbgo.Graceful *bbgo.Persistence Interval types.Duration `json:"interval"` Addresses map[string]Address `json:"addresses"` MaxDailyNumberOfTransfer int `json:"maxDailyNumberOfTransfer"` MaxDailyAmountOfTransfer fixedpoint.Value `json:"maxDailyAmountOfTransfer"` CheckOnStart bool `json:"checkOnStart"` Asset string `json:"asset"` // Low is the low balance level for triggering transfer Low fixedpoint.Value `json:"low"` // Middle is the middle balance level used for re-fill asset Middle fixedpoint.Value `json:"middle"` Verbose bool `json:"verbose"` // 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)
type WithdrawalRequest ¶ added in v1.17.0
type WithdrawalRequest struct { FromSession string `json:"fromSession"` ToSession string `json:"toSession"` Asset string `json:"asset"` Amount fixedpoint.Value `json:"amount"` }
func (*WithdrawalRequest) PlainText ¶ added in v1.17.0
func (r *WithdrawalRequest) PlainText() string
func (*WithdrawalRequest) SlackAttachment ¶ added in v1.17.0
func (r *WithdrawalRequest) SlackAttachment() slack.Attachment
func (*WithdrawalRequest) String ¶ added in v1.17.0
func (r *WithdrawalRequest) String() string
Click to show internal directories.
Click to hide internal directories.