user

package
v0.0.0-...-78ae253 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detail

type Detail struct {
	StockName   string // 股票名稱
	StockNumber int    // 股票編號
	Items       []*transaction
}

func NewDetail

func NewDetail(name string, number int) *Detail

type Position

type Position struct {
	HandlingFee  float64 // 手續費折數
	ShareHolding map[int]bool
	Details      []*Detail
}

func NewPosition

func NewPosition(hf float64) *Position

func (*Position) AddStock

func (p *Position) AddStock(stockNumber int, t time.Time, logs int, price float64, whole bool) (*transaction, error)

StockNumber: 股票代號 t: 交易時間 logs: 買賣單位, 一張=1000 logs price: 買入金額 whole: 是否交易整張

Jump to

Keyboard shortcuts

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