collector

package
v0.0.0-...-093acf2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

func NewCollector

func NewCollector(cfg *config.Config, log *zap.Logger, ctx context.Context) *Collector

func (*Collector) Close

func (c *Collector) Close() error

func (*Collector) Run

func (c *Collector) Run() error

type Surebet

type Surebet struct {
	ID           int64           `json:"id"`
	BinTicker    *TickerData     `json:"b"`
	FtxTicker    *TickerData     `json:"o"`
	LastBinTime  int64           `json:"last_bin_time"`
	AvgPriceDiff decimal.Decimal `json:"avg_price_diff"`
	MaxPriceDiff decimal.Decimal `json:"max_price_diff"`
	MinPriceDiff decimal.Decimal `json:"min_price_diff"`
	UsdtPrice    decimal.Decimal `json:"usdt_price"`
}

type TickerData

type TickerData struct {
	Symbol          string          `json:"s"`
	BidPrice        decimal.Decimal `json:"b"`
	BidQty          decimal.Decimal `json:"B"`
	AskPrice        decimal.Decimal `json:"a"`
	AskQty          decimal.Decimal `json:"A"`
	ServerTime      int64           `json:"st"`
	ReceiveTime     int64           `json:"rt"`
	PrevBidPrice    decimal.Decimal `json:"pb"`
	PrevBidQty      decimal.Decimal `json:"pB"`
	PrevAskPrice    decimal.Decimal `json:"pa"`
	PrevAskQty      decimal.Decimal `json:"pA"`
	PrevServerTime  int64           `json:"pst"`
	PrevReceiveTime int64           `json:"prt"`
}

Jump to

Keyboard shortcuts

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