yahoo

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() models.Source

Types

type Yahoo

type Yahoo struct {
	http.Client
}

func (*Yahoo) Candles

func (y *Yahoo) Candles(res models.Resolution, symbol string, from, to time.Time) ([]*models.Candle, error)

func (*Yahoo) Quote

func (y *Yahoo) Quote(symbol string) (*models.Quote, error)

type YahooChart

type YahooChart struct {
	Chart struct {
		Result []struct {
			Timestamp  []int64 `json:"timestamp"`
			Indicators struct {
				Quote []struct {
					Volume []float64 `json:"volume"`
					High   []float64 `json:"high"`
					Close  []float64 `json:"close"`
					Low    []float64 `json:"low"`
					Open   []float64 `json:"open"`
				} `json:"quote"`
			} `json:"indicators"`
		} `json:"result"`
		Error any `json:"error"`
	} `json:"chart"`
}

type YahooFinancialData

type YahooFinancialData struct {
	QuoteSummary struct {
		Result []struct {
			FinancialData struct {
				CurrentPrice struct {
					Raw float64 `json:"raw"`
				} `json:"currentPrice"`
			} `json:"financialData"`
			RecommendationTrend struct {
				Trend []struct {
					Period     string `json:"period"`
					StrongBuy  int64  `json:"strongBuy"`
					Buy        int64  `json:"buy"`
					Sell       int64  `json:"sell"`
					Hold       int64  `json:"hold"`
					StrongSell int64  `json:"strongSell"`
				} `json:"trend"`
			} `json:"recommendationTrend"`
		} `json:"result"`
		Error any `json:"error"`
	} `json:"quoteSummary"`
}

Jump to

Keyboard shortcuts

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