portfolio

package
v0.0.0-...-0d73d77 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Portfolio

type Portfolio interface {
	Load(ctx context.Context) bool
	Save(ctx context.Context) error
	Init(cash, currency, price decimal.Decimal, fee map[string]decimal.Decimal)
	Cash() decimal.Decimal
	Currency() decimal.Decimal
	Value(price decimal.Decimal) decimal.Decimal
	Update(cash, currency, price decimal.Decimal, fee map[string]decimal.Decimal)
	LastBuyPrice() decimal.Decimal
	Profit(price decimal.Decimal) decimal.Decimal
	Start(ctx context.Context)
}

func New

func New(db *mongo.Database) Portfolio

Jump to

Keyboard shortcuts

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