Documentation ¶
Index ¶
- func NormalizeTimestamp(res Resolution, t time.Time) time.Time
- type Candle
- type Combined
- type Finnhub
- func (f *Finnhub) Candles(res Resolution, symbol string, from time.Time, to time.Time) ([]*Candle, error)
- func (f *Finnhub) Peers(symbol string) ([]string, error)
- func (f *Finnhub) Quote(symbol string) (*Candle, error)
- func (f *Finnhub) RecommendationTrends(symbol string) (*RecommendationTrends, error)
- type NOP
- type Note
- type RecommendationTrends
- type Resolution
- type Source
- type Store
- func (s *Store) Candles(res Resolution, symbol string, from, to time.Time) ([]*Candle, error)
- func (s *Store) Close()
- func (s *Store) CreateNote(name, content string) error
- func (s *Store) DeleteNote(name string) error
- func (s *Store) GetNote(name string) (*Note, error)
- func (s *Store) ListNotes() ([]*Note, error)
- func (s *Store) Peers(symbol string) ([]string, error)
- func (s *Store) Quote(symbol string) (*Candle, error)
- func (s *Store) RecommendationTrends(symbol string) (*RecommendationTrends, error)
- func (s *Store) UpdateNote(name, content string) error
- type Yahoo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeTimestamp ¶ added in v0.8.4
func NormalizeTimestamp(res Resolution, t time.Time) time.Time
Types ¶
type Candle ¶
type Candle struct { Symbol string `json:"symbol,omitempty" gorm:"index:idx_unique_candle,unique"` Timestamp time.Time `json:"timestamp,omitempty" gorm:"index:idx_unique_candle,unique"` Resolution Resolution `json:"resolution,omitempty" gorm:"index:idx_unique_candle,unique"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"low"` Close float64 `json:"close"` PrevClose float64 `json:"prevClose,omitempty"` Volume float64 `json:"volume,omitempty"` }
func NormalizeCandles ¶ added in v0.8.4
type Combined ¶ added in v0.6.42
type Combined struct {
// contains filtered or unexported fields
}
func (*Combined) RecommendationTrends ¶ added in v0.6.42
func (c *Combined) RecommendationTrends(symbol string) (*RecommendationTrends, error)
type Finnhub ¶
type Finnhub struct {
// contains filtered or unexported fields
}
func (*Finnhub) RecommendationTrends ¶
func (f *Finnhub) RecommendationTrends(symbol string) (*RecommendationTrends, error)
type NOP ¶ added in v0.6.42
type NOP struct { }
func (*NOP) RecommendationTrends ¶ added in v0.6.42
func (nop *NOP) RecommendationTrends(symbol string) (*RecommendationTrends, error)
type RecommendationTrends ¶
type RecommendationTrends struct { Buy int64 `json:"buy"` StrongBuy int64 `json:"strongBuy"` Sell int64 `json:"sell"` StrongSell int64 `json:"strongSell"` Hold int64 `json:"hold"` }
func (*RecommendationTrends) Bytes ¶
func (rt *RecommendationTrends) Bytes() []byte
func (*RecommendationTrends) FromBytes ¶
func (rt *RecommendationTrends) FromBytes(b []byte)
type Source ¶
type Source interface { Quote(symbol string) (*Candle, error) Candles(res Resolution, symbol string, from, to time.Time) ([]*Candle, error) RecommendationTrends(symbol string) (*RecommendationTrends, error) Peers(symbol string) ([]string, error) }
func NewCombined ¶ added in v0.6.42
func NewFinnhub ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewTestStore ¶
func NewTestStore() *Store
func (*Store) CreateNote ¶ added in v0.7.1
func (*Store) DeleteNote ¶ added in v0.7.1
func (*Store) RecommendationTrends ¶
func (s *Store) RecommendationTrends(symbol string) (*RecommendationTrends, error)
func (*Store) UpdateNote ¶ added in v0.7.1
type Yahoo ¶ added in v0.6.42
func (*Yahoo) RecommendationTrends ¶ added in v0.6.42
func (y *Yahoo) RecommendationTrends(symbol string) (*RecommendationTrends, error)
Click to show internal directories.
Click to hide internal directories.