alphavantage

package
v0.0.0-...-8df2434 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalQuote

type GlobalQuote struct {
	Symbol        string `json:"01. symbol"`
	Open          string `json:"02. open"`
	High          string `json:"03. high"`
	Low           string `json:"04. low"`
	Price         string `json:"05. price"`
	Volume        string `json:"06. volume"`
	PreviousClose string `json:"08. previous close"`
	Change        string `json:"09. change"`
	ChangePercent string `json:"10. change percent"`
}

func GetStockInfo

func GetStockInfo(ticker string) (quote GlobalQuote, err error)

type GlobalQuoteResponse

type GlobalQuoteResponse struct {
	Quote GlobalQuote `json:"Global Quote"`
}

type StockInfo

type StockInfo struct {
	// Ticker is the string of the ticker symbol
	Ticker string
	// Price is the current price of the stock
	Price float64
	// contains filtered or unexported fields
}

StockInfo represents the info about a stock ticker

type StockResponse

type StockResponse struct {
	MetaData   map[string]string          `json:"MetaData"`
	TimeSeries map[string]TimeSeriesPoint `json:"Time Series (60min)"`
}

type TimeSeriesPoint

type TimeSeriesPoint struct {
	Open   string `json:"1. open"`
	High   string `json:"2. high"`
	Low    string `json:"3. low"`
	Close  string `json:"4. close"`
	Volume string `json:"5. volume"`
}

Jump to

Keyboard shortcuts

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