Documentation ¶
Index ¶
Constants ¶
View Source
const ID = "xbalance"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Address string `json:"address"` AddressTag string `json:"addressTag"` Network string `json:"network"` ForeignFee fixedpoint.Value `json:"foreignFee"` }
func (*Address) UnmarshalJSON ¶
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 ¶
func (*State) SlackAttachment ¶
func (s *State) SlackAttachment() slack.Attachment
type Strategy ¶
type Strategy struct { 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"` State *State `persistence:"state"` }
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 ¶
type WithdrawalRequest struct { FromSession string `json:"fromSession"` ToSession string `json:"toSession"` Asset string `json:"asset"` Amount fixedpoint.Value `json:"amount"` }
func (*WithdrawalRequest) PlainText ¶
func (r *WithdrawalRequest) PlainText() string
func (*WithdrawalRequest) SlackAttachment ¶
func (r *WithdrawalRequest) SlackAttachment() slack.Attachment
func (*WithdrawalRequest) String ¶
func (r *WithdrawalRequest) String() string
Click to show internal directories.
Click to hide internal directories.