scmaker

package
v1.49.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const ID = "scmaker"

Variables

This section is empty.

Functions

This section is empty.

Types

type BollingerConfig

type BollingerConfig struct {
	Interval types.Interval `json:"interval"`
	Window   int            `json:"window"`
	K        float64        `json:"k"`
}

type IntensityStream

type IntensityStream struct {
	*indicator.Float64Series

	Buy, Sell *indicator.RMAStream
	// contains filtered or unexported fields
}

func Intensity

func Intensity(source indicator.KLineSubscription, window int) *IntensityStream

type Strategy

type Strategy struct {
	Environment *bbgo.Environment
	Market      types.Market

	Symbol string `json:"symbol"`

	NumOfLiquidityLayers int `json:"numOfLiquidityLayers"`

	LiquidityUpdateInterval types.Interval   `json:"liquidityUpdateInterval"`
	PriceRangeBollinger     *BollingerConfig `json:"priceRangeBollinger"`
	StrengthInterval        types.Interval   `json:"strengthInterval"`

	AdjustmentUpdateInterval types.Interval `json:"adjustmentUpdateInterval"`

	MidPriceEMA            *types.IntervalWindow `json:"midPriceEMA"`
	LiquiditySlideRule     *bbgo.SlideRule       `json:"liquidityScale"`
	LiquidityLayerTickSize fixedpoint.Value      `json:"liquidityLayerTickSize"`

	MaxExposure fixedpoint.Value `json:"maxExposure"`

	MinProfit fixedpoint.Value `json:"minProfit"`

	Position    *types.Position    `json:"position,omitempty" persistence:"position"`
	ProfitStats *types.ProfitStats `json:"profitStats,omitempty" persistence:"profit_stats"`
	// contains filtered or unexported fields
}

Strategy scmaker is a stable coin market maker

func (*Strategy) ID

func (s *Strategy) ID() string

func (*Strategy) InstanceID

func (s *Strategy) InstanceID() string

func (*Strategy) Run

func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, session *bbgo.ExchangeSession) error

func (*Strategy) Subscribe

func (s *Strategy) Subscribe(session *bbgo.ExchangeSession)

Jump to

Keyboard shortcuts

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