Documentation
¶
Index ¶
Constants ¶
View Source
const (
ErrTplNotSupported = "source '%s' does not support action '%s'"
)
Variables ¶
This section is empty.
Functions ¶
func QuotesToMap ¶
Types ¶
type DividendEntry ¶
type DividendEntry struct { Date util.YearMonthDay Dividends float64 `json:",string"` }
type DividendHist ¶
type DividendHist struct { Symbol string Dividends []DividendEntry }
type Quote ¶
type Quote struct { Symbol string /* e.g.: VEUR.AS, Vanguard dev. europe on Amsterdam */ Name string Exchange string /* last actualization of the results */ Updated time.Time /* volume */ Volume int64 /* outstanding shares */ AvgDailyVolume int64 /* avg amount of shares traded */ /* dividend & related */ PeRatio float64 /* Price / EPS */ DividendYield float64 /* annual div. per share / price per share */ DividendExDate time.Time /* last dividend payout date */ /* price & derived */ Bid, Ask float64 Open, PreviousClose float64 LastTradePrice float64 Change, ChangePercent float64 DayLow, DayHigh float64 YearLow, YearHigh float64 Ma50, Ma200 float64 /* 200- and 50-day moving average */ }
func (*Quote) DivPayoutRatio ¶
will try to calculate the dividend payout ratio, if possible, * otherwise returns 0
type Source ¶
type Source interface { Quote(symbols []string) ([]Quote, error) Hist(symbols []string) (map[string]Hist, error) HistLimit(symbols []string, start time.Time, end time.Time) (map[string]Hist, error) DividendHist(symbols []string) (map[string]DividendHist, error) DividendHistLimit(symbols []string, start time.Time, end time.Time) (map[string]DividendHist, error) fmt.Stringer }
Click to show internal directories.
Click to hide internal directories.