Documentation ¶
Index ¶
- type Client
- func (m *Client) GetHistoricalDividends(symbol, exchange string, opts map[string]string) ([]*Dividend, error)
- func (m *Client) GetHistoricalShortInterest(symbol, exchange string, opts map[string]string) ([]*ShortInterest, error)
- func (m *Client) GetHistoricalSplits(symbol, exchange string, opts map[string]string) ([]*Split, error)
- func (m *Client) GetIntradayData(symbol, exchange string, opts map[string]string) ([]*IntradayData, error)
- func (m *Client) GetOptionData(symbol, exchange string, opts map[string]string) (*OptionData, error)
- func (m *Client) GetPrice(symbol, exchange string) (*Price, error)
- func (m *Client) GetPriceEOD(symbol, exchange string, opts map[string]string) ([]*PriceEOD, error)
- func (m *Client) GetSymbolsForExchange(exchange string) ([]*Symbol, error)
- func (m *Client) GetTechnicalIndicator(symbol, exchange, function string, period int, opts map[string]string) ([]*TechnicalIndicator, error)
- type Dividend
- type IntradayData
- type OptionContract
- type OptionData
- type Price
- type PriceEOD
- type ShortInterest
- type Split
- type Symbol
- type TechnicalIndicator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps eodhistoricaldata.com REST endpoints.
func (*Client) GetHistoricalDividends ¶
func (m *Client) GetHistoricalDividends(symbol, exchange string, opts map[string]string) ([]*Dividend, error)
GetHistoricalDividends for symbol on exchange. https://eodhistoricaldata.com/knowledgebase/api-splits-dividends/
func (*Client) GetHistoricalShortInterest ¶
func (m *Client) GetHistoricalShortInterest(symbol, exchange string, opts map[string]string) ([]*ShortInterest, error)
GetHistoricalShortInterest for symbol on exchange. https://eodhistoricaldata.com/knowledgebase/api-splits-dividends/
func (*Client) GetHistoricalSplits ¶
func (m *Client) GetHistoricalSplits(symbol, exchange string, opts map[string]string) ([]*Split, error)
GetHistoricalSplits for symbol on exchange. https://eodhistoricaldata.com/knowledgebase/api-splits-dividends/
func (*Client) GetIntradayData ¶
func (m *Client) GetIntradayData(symbol, exchange string, opts map[string]string) ([]*IntradayData, error)
GetIntradayData for symbol on exchange. https://eodhistoricaldata.com/knowledgebase/intraday-historical-data-api/
func (*Client) GetOptionData ¶
func (m *Client) GetOptionData(symbol, exchange string, opts map[string]string) (*OptionData, error)
GetOptionData gets option data for symbol on exchange. https://eodhistoricaldata.com/knowledgebase/stock-options-data/
func (*Client) GetPrice ¶
GetPrice of symbol on exchange. (20 minute delay) https://eodhistoricaldata.com/knowledgebase/live-realtime-stocks-api/
func (*Client) GetPriceEOD ¶
GetPriceEOD get end of day prices for symbol on exchange. https://eodhistoricaldata.com/knowledgebase/api-for-historical-data-and-volumes/
func (*Client) GetSymbolsForExchange ¶
GetSymbolsForExchange gets a list of symbols for exchange. https://eodhistoricaldata.com/knowledgebase/list-symbols-exchange/
func (*Client) GetTechnicalIndicator ¶
func (m *Client) GetTechnicalIndicator(symbol, exchange, function string, period int, opts map[string]string) ([]*TechnicalIndicator, error)
GetTechnicalIndicator for symbol on exchange. https://eodhistoricaldata.com/knowledgebase/technical-indicators-api/
type Dividend ¶
type Dividend struct { Date string `json:"date"` DeclarationDate string `json:"declarationDate"` PaymentDate string `json:"paymentDate"` RecordDate string `json:"recordDate"` Value string `json:"value"` }
Dividend models a response from /api/div/:symbol
type IntradayData ¶
type IntradayData struct { AdjustedClose float64 `json:"adjusted_close"` Close float64 `json:"close"` Datetime string `json:"datetime"` Gmtoffset int `json:"gmtoffset"` High float64 `json:"high"` Low float64 `json:"low"` Open float64 `json:"open"` Timestamp int `json:"timestamp"` Volume int `json:"volume"` }
IntradayData models a response from /api/intraday/:symbol
type OptionContract ¶
type OptionContract struct { ContractName string `json:"contractName"` ContractSize string `json:"contractSize"` Currency string `json:"currency"` Type string `json:"type"` InTheMoney string `json:"inTheMoney"` LastTradeDateTime string `json:"lastTradeDateTime"` ExpirationDate string `json:"expirationDate"` Strike string `json:"strike"` LastPrice string `json:"lastPrice"` Bid string `json:"bid"` Ask string `json:"ask"` Change string `json:"change"` ChangePercent string `json:"changePercent"` Volume int `json:"volume"` OpenInterest int `json:"openInterest"` ImpliedVolatility string `json:"impliedVolatility"` Delta string `json:"delta"` Gamma string `json:"gamma"` Theta string `json:"theta"` Vega string `json:"vega"` Rho string `json:"rho"` Theoretical string `json:"theoretical"` IntrinsicValue string `json:"intrinsicValue"` TimeValue string `json:"timeValue"` UpdatedAt string `json:"updatedAt"` }
OptionContract holds data about an option contract.
type OptionData ¶
type OptionData struct { Code string `json:"code"` Exchange string `json:"exchange"` Data []*struct { ExpirationDate string `json:"expirationDate"` Options struct { Put []*OptionContract `json:"PUT"` Call []*OptionContract `json:"CALL"` } `json:"options"` } `json:"data"` }
OptionData models a response from /api/options/:symbol
type Price ¶
type Price struct { Change float64 `json:"change"` ChangePercentage float64 `json:"change_p"` Close float64 `json:"close"` Code string `json:"code"` GMTOffset int `json:"gmtoffset"` High float64 `json:"high"` Low float64 `json:"low"` Open float64 `json:"open"` PreviousClose float64 `json:"previousClose"` Timestamp int `json:"timestamp"` Volume int `json:"volume"` }
Price models a response from /api/real-time/:symbol
type PriceEOD ¶
type PriceEOD struct { AdjustedClose float64 `json:"adjusted_close"` Close float64 `json:"close"` Date string `json:"date"` High float64 `json:"high"` Low float64 `json:"low"` Open float64 `json:"open"` Volume int `json:"volume"` }
PriceEOD models a response from /api/eod/:symbol
type ShortInterest ¶
type ShortInterest struct { Date string `json:"date"` Short int `json:"short"` Volume int `json:"volume"` }
ShortInterest models a response from /api/shorts/:symbol