eodhistoricaldata

package module
v0.0.0-...-bc7046c Latest Latest
Warning

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

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

README

Go API client for EOD Historical Data (eodhistoricaldata.com)

GitHub release (latest by date) GitHub GitHub go.mod Go version Go Report Card

License

MIT

Documentation

Index

Constants

View Source
const (
	APIURL = "https://eodhistoricaldata.com/api"
)

Core params

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	Stock       *Stock
	Exchange    *Exchange
	Fundamental *Fundamental
	Logger      *zap.Logger
	Debug       bool
}

APIClient ...

func NewAPIClient

func NewAPIClient(cfg Config) (*APIClient, error)

NewAPIClient creates a new API client

type Config

type Config struct {
	HTTPClient    *resty.Client
	Logger        *zap.Logger
	APIToken      string
	FMTFromat     string
	Debug         bool
	RetryCount    *int
	RetryWaitTime *time.Duration
	Timeout       int
}

Config for create new API client

type Exchange

type Exchange struct {
	Client *HTTPClient
}

Exchange client

func (*Exchange) ExchangeDetail

func (e *Exchange) ExchangeDetail(exchange string) (ex *objects.ExchangeDetail, err error)

ExchangeDetail - Get Exchange Details and Trading Hours

func (*Exchange) ExchangeList

func (e *Exchange) ExchangeList() (eList []objects.Exchange, err error)

ExchangeList - Get List of Exchanges

func (*Exchange) ExchangeSymbolList

func (e *Exchange) ExchangeSymbolList(exchange string) (sList []objects.Symbol, err error)

ExchangeSymbolList - Get List of Tickers (Exchange Symbols)

func (*Exchange) News

func (e *Exchange) News(from, to *time.Time, s, t *string, limit, offset int) (nList []objects.News, err error)

News - financial news

type Fundamental

type Fundamental struct {
	Client *HTTPClient
}

Fundamental client

func (*Fundamental) EconomicCalendar

func (e *Fundamental) EconomicCalendar(from, to *time.Time, country, comparison *string, offset, limit int) (eList []objects.EconomicEvent, err error)

EconomicCalendar - output for Economic Events Calendar

func (*Fundamental) InsiderTransactionList

func (e *Fundamental) InsiderTransactionList(from, to *time.Time, code *string, limit int) (iList []objects.InsiderTransaction, err error)

InsiderTransactionList - output for Insider Transaction list

func (*Fundamental) Profile

func (e *Fundamental) Profile(symbol string) (p *objects.Profile, err error)

Profile - get profile by symbol

type HTTPClient

type HTTPClient struct {
	// contains filtered or unexported fields
}

HTTPClient ...

func (*HTTPClient) Get

func (h *HTTPClient) Get(endpoint string, data map[string]string) (response *resty.Response, err error)

Get ...

type Stock

type Stock struct {
	Client *HTTPClient
}

Stock client

func (*Stock) BatchQuote

func (s *Stock) BatchQuote(symbolList []string) (qList []objects.Quote, err error)

BatchQuote - Live (Delayed) Stock Prices API (Batch)

func (*Stock) EOD

func (s *Stock) EOD(symbol string, period string, from, to *time.Time) (qList []objects.Candle, err error)

EOD - get historical stock price data

func (*Stock) Quote

func (s *Stock) Quote(symbol string) (q *objects.Quote, err error)

Quote - Live (Delayed) Stock Prices API

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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