xmaker

package
v1.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ID = "xarb"

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	Position          *bbgo.Position   `json:"position,omitempty"`
	AccumulatedVolume fixedpoint.Value `json:"accumulatedVolume,omitempty"`
	AccumulatedPnL    fixedpoint.Value `json:"accumulatedPnL,omitempty"`
	AccumulatedProfit fixedpoint.Value `json:"accumulatedProfit,omitempty"`
	AccumulatedLoss   fixedpoint.Value `json:"accumulatedLoss,omitempty"`
	AccumulatedSince  int64            `json:"accumulatedSince,omitempty"`
}

type Strategy

type Strategy struct {
	*bbgo.Graceful
	*bbgo.Notifiability
	*bbgo.Persistence

	Symbol          string           `json:"symbol"`
	MaxQuantity     fixedpoint.Value `json:"maxQuantity"`
	MinQuantity     fixedpoint.Value `json:"minQuantity"`
	TakeRatio       fixedpoint.Value `json:"takeRatio"`
	MinSpreadRatio  fixedpoint.Value `json:"minSpreadRatio"`
	MinQuoteBalance fixedpoint.Value `json:"minQuoteBalance"`
	MinBaseBalance  fixedpoint.Value `json:"minBaseBalance"`
	DelayTime       types.Duration   `json:"delayTime"`
	// contains filtered or unexported fields
}

func (*Strategy) CrossRun

func (s *Strategy) CrossRun(ctx context.Context, orderExecutionRouter bbgo.OrderExecutionRouter, sessions map[string]*bbgo.ExchangeSession) error

func (*Strategy) CrossSubscribe

func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession)

func (*Strategy) ID

func (s *Strategy) ID() string

func (*Strategy) LoadState

func (s *Strategy) LoadState() error

func (*Strategy) SaveState

func (s *Strategy) SaveState() error

func (*Strategy) Validate

func (s *Strategy) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL