api

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(symbols []string) map[string]Result

Call makes HTTP request for stock data

Types

type AutoGenerated

type AutoGenerated struct {
	QuoteResponse QuoteResponse `json:"quoteResponse"`
}

AutoGenerated struct from API response https://mholt.github.io/json-to-go/

type QuoteResponse

type QuoteResponse struct {
	Result []Result    `json:"result"`
	Error  interface{} `json:"error"`
}

QuoteResponse autogenerated

type Result

type Result struct {
	Language                   string  `json:"language"`
	Region                     string  `json:"region"`
	QuoteType                  string  `json:"quoteType"`
	QuoteSourceName            string  `json:"quoteSourceName"`
	Triggerable                bool    `json:"triggerable"`
	SourceInterval             int     `json:"sourceInterval"`
	ExchangeDataDelayedBy      int     `json:"exchangeDataDelayedBy"`
	FirstTradeDateMilliseconds int64   `json:"firstTradeDateMilliseconds"`
	PriceHint                  int     `json:"priceHint"`
	PreMarketChangePercent     float64 `json:"preMarketChangePercent"`
	PreMarketTime              int     `json:"preMarketTime"`
	PreMarketPrice             float64 `json:"preMarketPrice"`
	PreMarketChange            float64 `json:"preMarketChange"`
	PostMarketChangePercent    float64 `json:"postMarketChangePercent"`
	PostMarketTime             int     `json:"postMarketTime"`
	PostMarketPrice            float64 `json:"postMarketPrice"`
	PostMarketChange           float64 `json:"postMarketChange"`
	RegularMarketChange        float64 `json:"regularMarketChange"`
	RegularMarketChangePercent float64 `json:"regularMarketChangePercent"`
	RegularMarketTime          int     `json:"regularMarketTime"`
	RegularMarketPrice         float64 `json:"regularMarketPrice"`
	RegularMarketPreviousClose float64 `json:"regularMarketPreviousClose"`
	FullExchangeName           string  `json:"fullExchangeName"`
	ExchangeTimezoneName       string  `json:"exchangeTimezoneName"`
	ExchangeTimezoneShortName  string  `json:"exchangeTimezoneShortName"`
	GmtOffSetMilliseconds      int     `json:"gmtOffSetMilliseconds"`
	Market                     string  `json:"market"`
	EsgPopulated               bool    `json:"esgPopulated"`
	MarketState                string  `json:"marketState"`
	Exchange                   string  `json:"exchange"`
	Tradeable                  bool    `json:"tradeable"`
	Symbol                     string  `json:"symbol"`
}

Result autogenerated

Jump to

Keyboard shortcuts

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