Documentation
¶
Index ¶
- type EODInfo
- type EODMapping
- type EODTicker
- type EODhd
- func (d *EODhd) FetchEOD(ctx context.Context, info chan EODInfo, exchange *exchanges.Exchange, ...) error
- func (d *EODhd) FetchEODForTicker(ctx context.Context, info chan EODInfo, code, exchange string) error
- func (d *EODhd) FetchFundamentals(ctx context.Context, fundamentals chan Fundamentals, ...) error
- func (d *EODhd) FetchSingleFundamental(ctx context.Context, ticker string) ([]byte, error)
- func (d *EODhd) FetchTickers(ctx context.Context, info chan EODTicker, exchange *exchanges.Exchange) error
- func (d *EODhd) LoadEtfs(info chan EODMapping) error
- type Fundamentals
- type General
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EODInfo ¶
type EODInfo struct {
Code string `json:"code,omitempty" bson:"code"`
ExchangeShortName string `json:"exchange_short_name,omitempty" bson:"exchange_short_name"`
Date time.Time `json:"date,omitempty" bson:"date"`
Open float64 `json:"open,omitempty" bson:"open"`
High float64 `json:"hig,omitemptyh" bson:"high"`
Low float64 `json:"low,omitempty" bson:"low"`
Close float64 `json:"close,omitempty" bson:"close"`
AdjustedClose float64 `json:"adjusted_close,omitempty" bson:"adjusted_close"`
Volume float64 `json:"volume,omitempty" bson:"volume"`
Ticker string `json:"tickers,omitempty" bson:"ticker"`
}
EODInfo is the price information for a single Asset
type EODMapping ¶
type EODMapping struct {
Code string `json:"code" bson:"code"`
Exchange string `json:"exchange" bson:"exchange"`
Country string `json:"country" bson:"country"`
Isin string `json:"isin" bson:"isin"`
Name string `json:"name" bson:"name"`
Ticker string `json:"ticker" bson:"ticker"`
}
The EODMapping does map a ticker to an isin
type EODTicker ¶
type EODTicker struct {
Code string `json:"code" bson:"code"`
Name string `json:"name" bson:"name"`
Country string `json:"country" bson:"country"`
Exchange string `json:"exchange" bson:"exchange"`
Currency string `json:"currency" bson:"currency"`
Type string `json:"type" bson:"type"`
Ticker string `json:"ticker" bson:"ticker"`
ExchangeShortName string `json:"exchange_short_name" bson:"exchange_short_name"`
OpenfigiTickers []string `json:"openfigi_tickers" bson:"openfigi_tickers"`
}
EODTicker Ticker Info
type EODhd ¶
type EODhd struct {
// contains filtered or unexported fields
}
EODhd is an EOD Historical Data Client Info
func NewEOD ¶
func NewEOD(eodHdURL, eodHdToken string, transport http.RoundTripper) *EODhd
NewEOD initializes a new eod historical data client
func (*EODhd) FetchEOD ¶
func (d *EODhd) FetchEOD(ctx context.Context, info chan EODInfo, exchange *exchanges.Exchange, date time.Time) error
FetchEOD Fetches End of day for the exchange
func (*EODhd) FetchEODForTicker ¶
func (d *EODhd) FetchEODForTicker(ctx context.Context, info chan EODInfo, code, exchange string) error
FetchEODForTicker Fetches End of day for a single ticker
func (*EODhd) FetchFundamentals ¶
func (d *EODhd) FetchFundamentals(ctx context.Context, fundamentals chan Fundamentals, exchange *exchanges.Exchange) error
FetchFundamentals Fetches Fundamentals for the exchange
func (*EODhd) FetchSingleFundamental ¶
FetchSingleFundamental Fetches Fundamentals for the exchange
func (*EODhd) FetchTickers ¶
func (d *EODhd) FetchTickers(ctx context.Context, info chan EODTicker, exchange *exchanges.Exchange) error
FetchTickers Fetches End of day for the exchange
func (*EODhd) LoadEtfs ¶
func (d *EODhd) LoadEtfs(info chan EODMapping) error
LoadEtfs Loads the ETFS into a EODMappings
type Fundamentals ¶
type Fundamentals struct {
Ticker string `bson:"ticker"`
LastUpdate time.Time `bson:"last_update"`
General General `bson:"general"`
Data map[string]string `bson:"data"`
}
Fundamentals for a ticker
type General ¶
type General struct {
Code string `bson:"code"`
Type string `bson:"type"`
Name string `bson:"name"`
Exchange string `bson:"exchange"`
CurrencyCode string `bson:"currency_code"`
CurrencyName string `bson:"currency_name"`
CurrencySymbol string `bson:"currency_symbol"`
CountryName string `bson:"country_name"`
CountryISO string `bson:"country_iso"`
ISIN string `bson:"isin"`
CUSIP string `bson:"cusip"`
Sector string `bson:"sector"`
Industry string `bson:"industry"`
Description string `bson:"description"`
FullTimeEmployees int `bson:"full_time_employees"`
UpdatedAt string `bson:"updated_at"`
}
General information about an asset
Click to show internal directories.
Click to hide internal directories.