order_watch

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Direction

type Direction string

type Msg

type Msg struct {
	tiki.Order
	CurrentPrice float64
}

func (Msg) String

func (msg Msg) String() string

type OrderWatchConfig

type OrderWatchConfig struct {
	common.BaseConfig
	MinAmount float64
}

func DefaultConfig

func DefaultConfig() OrderWatchConfig

func (OrderWatchConfig) IsValid

func (cfg OrderWatchConfig) IsValid() (bool, error)

type OrderWatchProcessor

type OrderWatchProcessor struct {
	*processorCommon.BaseProcessor
	*tiki.TikiClient
	// contains filtered or unexported fields
}

func NewOrderWatchProcessor

func NewOrderWatchProcessor(cfg OrderWatchConfig,
	tikiClient *tiki.TikiClient,
	db *store.Store,
	log logger.Logger,
) (*OrderWatchProcessor, error)

func (*OrderWatchProcessor) Process

func (p *OrderWatchProcessor) Process(ctx context.Context, order *tiki.Order) error

func (*OrderWatchProcessor) Queue

func (p *OrderWatchProcessor) Queue(msg interface{})

func (*OrderWatchProcessor) Start

func (p *OrderWatchProcessor) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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