Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAssetQuotes ¶
func GetAssetQuotes(client resty.Client, symbols []string) func() []c.AssetQuote
GetAssetQuotes issues a HTTP request to retrieve quotes from the API and process the response
func GetCurrencyRates ¶
func GetCurrencyRates(client resty.Client, symbols []string, targetCurrency string) (c.CurrencyRates, error)
GetCurrencyRates retrieves the currency rates to convert from each currency for the given symbols to the target currency
Types ¶
type Response ¶
type Response struct { QuoteResponse struct { Quotes []ResponseQuote `json:"result"` Error interface{} `json:"error"` } `json:"quoteResponse"` }
Response represents the container object from the API response
type ResponseFieldFloat ¶
type ResponseFieldString ¶
type ResponseQuote ¶
type ResponseQuote struct { ShortName string `json:"shortName"` Symbol string `json:"symbol"` MarketState string `json:"marketState"` Currency string `json:"currency"` ExchangeName string `json:"fullExchangeName"` ExchangeDelay float64 `json:"exchangeDataDelayedBy"` RegularMarketChange ResponseFieldFloat `json:"regularMarketChange"` RegularMarketChangePercent ResponseFieldFloat `json:"regularMarketChangePercent"` RegularMarketPrice ResponseFieldFloat `json:"regularMarketPrice"` RegularMarketPreviousClose ResponseFieldFloat `json:"regularMarketPreviousClose"` RegularMarketOpen ResponseFieldFloat `json:"regularMarketOpen"` RegularMarketDayRange ResponseFieldString `json:"regularMarketDayRange"` RegularMarketDayHigh ResponseFieldFloat `json:"regularMarketDayHigh"` RegularMarketDayLow ResponseFieldFloat `json:"regularMarketDayLow"` RegularMarketVolume ResponseFieldFloat `json:"regularMarketVolume"` PostMarketChange ResponseFieldFloat `json:"postMarketChange"` PostMarketChangePercent ResponseFieldFloat `json:"postMarketChangePercent"` PostMarketPrice ResponseFieldFloat `json:"postMarketPrice"` PreMarketChange ResponseFieldFloat `json:"preMarketChange"` PreMarketChangePercent ResponseFieldFloat `json:"preMarketChangePercent"` PreMarketPrice ResponseFieldFloat `json:"preMarketPrice"` FiftyTwoWeekHigh ResponseFieldFloat `json:"fiftyTwoWeekHigh"` FiftyTwoWeekLow ResponseFieldFloat `json:"fiftyTwoWeekLow"` QuoteType string `json:"quoteType"` MarketCap ResponseFieldFloat `json:"marketCap"` }
ResponseQuote represents a quote of a single security from the API response
Click to show internal directories.
Click to hide internal directories.