chaser

package module
v0.0.0-...-f5d5fb5 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 8 Imported by: 0

README

bbgo-chaser

exchangeStrategies:
  - on: binance
    chaser:
      symbol: BTCBUSD       # symbol of the market
      quantity: 0.1         # how much BTC to purchase per trade
      #gap: 5                # how much $ to place the order bellow / above current price
      profit: 0.5           # alternatively instead of setting gap you can set the desired profit per trade directly
      maxDistance: 5        # if the current price go above this value, the order is canceled and re-created with new calculated price
      maxNumberOfOrders: 4  # max number of orders to keep open at the same time
      waitAfter: 2          # once there are X orders pending to be sold, wait `waitMinutes` minutes before creating new orders
      waitMinutes: 1        # how long to wait before creating new orders once the `waitAfter` is reached

Documentation

Index

Constants

View Source
const ID = "chaser"

Variables

This section is empty.

Functions

This section is empty.

Types

type Strategy

type Strategy struct {
	Symbol            string           `json:"symbol"`
	Quantity          fixedpoint.Value `json:"quantity"`
	Gap               fixedpoint.Value `json:"gap,omitempty"`
	MaxDistance       fixedpoint.Value `json:"maxDistance"`
	MaxNumberOfOrders int              `json:"maxNumberOfOrders"`
	WaitAfter         int              `json:"waitAfter"`
	WaitMinutes       int              `json:"waitMinutes"`
	Profit            fixedpoint.Value `json:"profit,omitempty"`

	ActiveOrders *bbgo.ActiveOrderBook
	types.Market `json:"-" yaml:"-"`
}

func (*Strategy) ID

func (s *Strategy) ID() string

func (*Strategy) Initialize

func (s *Strategy) Initialize() error

func (*Strategy) InstanceID

func (s *Strategy) InstanceID() string

func (*Strategy) Run

func (*Strategy) Subscribe

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

func (*Strategy) Validate

func (s *Strategy) Validate() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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