xnav

package
v1.64.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 16 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ID = "xnav"

Variables

This section is empty.

Functions

func NewAssetMapFromBalanceMap added in v1.61.0

func NewAssetMapFromBalanceMap(
	priceSolver *pricesolver.SimplePriceSolver, priceTime time.Time, m types.BalanceMap, fiat string,
) asset.Map

Types

type AllAssetSnapshot added in v1.61.0

type AllAssetSnapshot struct {
	SessionAssets map[string]asset.Map
	TotalAssets   asset.Map
	Time          time.Time
}

type DebtAssetMap added in v1.61.0

type DebtAssetMap asset.Map

func (DebtAssetMap) PlainText added in v1.62.0

func (m DebtAssetMap) PlainText() (out string)

func (DebtAssetMap) SlackAttachment added in v1.61.0

func (m DebtAssetMap) SlackAttachment() slack.Attachment

type State

type State struct {
	Since int64 `json:"since"`
}

func (*State) IsOver24Hours

func (s *State) IsOver24Hours() bool

func (*State) PlainText

func (s *State) PlainText() string

func (*State) Reset

func (s *State) Reset()

func (*State) SlackAttachment

func (s *State) SlackAttachment() slack.Attachment

type Strategy

type Strategy struct {
	*bbgo.Environment

	Interval      types.Interval `json:"interval"`
	Schedule      string         `json:"schedule"`
	ReportOnStart bool           `json:"reportOnStart"`
	IgnoreDusts   bool           `json:"ignoreDusts"`

	ShowBreakdown   bool `json:"showBreakdown"`
	ShowDebtDetails bool `json:"showDebtDetails"`

	State *State `persistence:"state"`
	// contains filtered or unexported fields
}

func (*Strategy) CrossRun

func (s *Strategy) CrossRun(
	ctx context.Context, _ 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) Initialize added in v1.56.0

func (s *Strategy) Initialize() error

func (*Strategy) Validate added in v1.56.0

func (s *Strategy) Validate() error

Jump to

Keyboard shortcuts

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