api

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseURL

func BaseURL() *url.URL

Types

type EndOfDay

type EndOfDay struct {
	Data []struct {
		Open        float64     `json:"open"`
		High        float64     `json:"high"`
		Low         float64     `json:"low"`
		Close       float64     `json:"close"`
		Volume      float64     `json:"volume"`
		AdjHigh     interface{} `json:"adj_high"`
		AdjLow      interface{} `json:"adj_low"`
		AdjClose    float64     `json:"adj_close"`
		AdjOpen     interface{} `json:"adj_open"`
		AdjVolume   interface{} `json:"adj_volume"`
		SplitFactor float64     `json:"split_factor"`
		Dividend    float64     `json:"dividend"`
		Symbol      string      `json:"symbol"`
		Exchange    string      `json:"exchange"`
		Date        string      `json:"date"`
	} `json:"data"`
	Error struct {
		Code    string `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
}

func EndOfDayRequest

func EndOfDayRequest(symbols []string, date string) (EndOfDay, error)

type Intraday

type Intraday struct {
	Data []struct {
		Open     float64 `json:"open"`
		High     float64 `json:"high"`
		Low      float64 `json:"low"`
		Last     float64 `json:"last"`
		Close    float64 `json:"close"`
		Volume   float64 `json:"volume"`
		Date     string  `json:"date"`
		Symbol   string  `json:"symbol"`
		Exchange string  `json:"exchange"`
	} `json:"data"`
	Error struct {
		Code    string `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
}

func IntradayRequest

func IntradayRequest(symbols []string) (Intraday, error)

type Ticker

type Ticker struct {
	Data []struct {
		Name          string      `json:"name"`
		Symbol        string      `json:"symbol"`
		HasIntraday   bool        `json:"has_intraday"`
		HasEod        bool        `json:"has_eod"`
		Country       interface{} `json:"country"`
		StockExchange struct {
			Name        string `json:"name"`
			Acronym     string `json:"acronym"`
			Mic         string `json:"mic"`
			Country     string `json:"country"`
			CountryCode string `json:"country_code"`
			City        string `json:"city"`
			Website     string `json:"website"`
		} `json:"stock_exchange"`
	} `json:"data"`
}

func TickerRequest

func TickerRequest(name string) (Ticker, error)

Jump to

Keyboard shortcuts

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