Documentation
¶
Index ¶
- Constants
- type BalanceSheet
- type BalanceSheetInfo
- type CashFlow
- type CashFlowInfo
- 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) FetchTickers(ctx context.Context, info chan EODTicker, exchange *exchanges.Exchange) error
- func (d *EODhd) LoadEtfs(info chan EODMapping) error
- type Earnings
- type EarningsInfo
- type Financials
- type Fundamentals
- type General
- type Highlights
- type IncomeStatement
- type IncomeStatementInfo
- type SplitsDividends
- type Technicals
- type Valuation
Constants ¶
View Source
const DefaultURL = "https://eodhistoricaldata.com/api"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceSheet ¶ added in v0.3.0
type BalanceSheet struct {
CurrencySymbol string `json:"currency_symbol"`
QuarterlyLast0 BalanceSheetInfo `json:"quarterly_last_0"`
QuarterlyLast1 BalanceSheetInfo `json:"quarterly_last_1"`
QuarterlyLast2 BalanceSheetInfo `json:"quarterly_last_2"`
QuarterlyLast3 BalanceSheetInfo `json:"quarterly_last_3"`
YearlyLast0 BalanceSheetInfo `json:"yearly_last_0"`
YearlyLast1 BalanceSheetInfo `json:"yearly_last_1"`
YearlyLast2 BalanceSheetInfo `json:"yearly_last_2"`
YearlyLast3 BalanceSheetInfo `json:"yearly_last_3"`
}
type BalanceSheetInfo ¶ added in v0.3.0
type BalanceSheetInfo struct {
Date string `json:"date"`
FilingDate *string `json:"filing_date"`
IntangibleAssets *float64 `json:"intangibleAssets"`
TotalLiab *float64 `json:"totalLiab"`
TotalStockholderEquity *float64 `json:"totalStockholderEquity"`
DeferredLongTermLiab *float64 `json:"deferredLongTermLiab"`
OtherCurrentLiab *float64 `json:"otherCurrentLiab"`
TotalAssets *float64 `json:"totalAssets"`
CommonStock *float64 `json:"commonStock"`
OtherCurrentAssets *float64 `json:"otherCurrentAssets"`
RetainedEarnings *float64 `json:"retainedEarnings"`
OtherLiab *float64 `json:"otherLiab"`
GoodWill *float64 `json:"goodWill"`
OtherAssets *float64 `json:"otherAssets"`
Cash *float64 `json:"cash"`
TotalCurrentLiabilities *float64 `json:"totalCurrentLiabilities"`
ShortLongTermDebt *float64 `json:"shortLongTermDebt"`
OtherStockholderEquity *float64 `json:"otherStockholderEquity"`
PropertyPlantEquipment *float64 `json:"propertyPlantEquipment"`
TotalCurrentAssets *float64 `json:"totalCurrentAssets"`
LongTermInvestments *float64 `json:"longTermInvestments"`
NetTangibleAssets *float64 `json:"netTangibleAssets"`
ShortTermInvestments *float64 `json:"shortTermInvestments"`
NetReceivables *float64 `json:"netReceivables"`
LongTermDebt *float64 `json:"longTermDebt"`
Inventory *float64 `json:"inventory"`
AccountsPayable *float64 `json:"accountsPayable"`
}
type CashFlow ¶ added in v0.3.0
type CashFlow struct {
CurrencySymbol string `json:"currency_symbol"`
QuarterlyLast0 CashFlowInfo `json:"quarterly_last_0"`
QuarterlyLast1 CashFlowInfo `json:"quarterly_last_1"`
QuarterlyLast2 CashFlowInfo `json:"quarterly_last_2"`
QuarterlyLast3 CashFlowInfo `json:"quarterly_last_3"`
YearlyLast0 CashFlowInfo `json:"yearly_last_0"`
YearlyLast1 CashFlowInfo `json:"yearly_last_1"`
YearlyLast2 CashFlowInfo `json:"yearly_last_2"`
YearlyLast3 CashFlowInfo `json:"yearly_last_3"`
}
type CashFlowInfo ¶ added in v0.3.0
type CashFlowInfo struct {
Date string `json:"date"`
FilingDate *string `json:"filing_date"`
Investments *float64 `json:"investments"`
ChangeToLiabilities *float64 `json:"changeToLiabilities"`
TotalCashflowsFromInvestingActivities *float64 `json:"totalCashflowsFromInvestingActivities"`
NetBorrowings *float64 `json:"netBorrowings"`
TotalCashFromFinancingActivities *float64 `json:"totalCashFromFinancingActivities"`
ChangeToOperatingActivities *float64 `json:"changeToOperatingActivities"`
NetIncome *float64 `json:"netIncome"`
ChangeInCash *float64 `json:"changeInCash"`
TotalCashFromOperatingActivities *float64 `json:"totalCashFromOperatingActivities"`
Depreciation *float64 `json:"depreciation"`
OtherCashflowsFromInvestingActivities *float64 `json:"otherCashflowsFromInvestingActivities"`
DividendsPaid *float64 `json:"dividendsPaid"`
ChangeToInventory *float64 `json:"changeToInventory"`
ChangeToAccountReceivables *float64 `json:"changeToAccountReceivables"`
SalePurchaseOfStock *float64 `json:"salePurchaseOfStock"`
OtherCashflowsFromFinancingActivities *float64 `json:"otherCashflowsFromFinancingActivities"`
ChangeToNetincome *float64 `json:"changeToNetincome"`
CapitalExpenditures *float64 `json:"capitalExpenditures"`
}
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 NewDefaultEOD ¶ added in v0.3.0
NewEOD initializes a new eod historical data client
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, pagesize int, lenient bool) error
FetchFundamentals 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 Earnings ¶ added in v0.3.0
type Earnings struct {
Last0 EarningsInfo `json:"Last_0"`
Last1 EarningsInfo `json:"Last_1"`
Last2 EarningsInfo `json:"Last_2"`
Last3 EarningsInfo `json:"Last_3"`
}
type EarningsInfo ¶ added in v0.3.0
type Financials ¶ added in v0.3.0
type Financials struct {
BalanceSheet BalanceSheet `json:"Balance_Sheet"`
CashFlow CashFlow `json:"Cash_Flow"`
IncomeStatement IncomeStatement `json:"Income_Statement"`
}
type Fundamentals ¶
type Fundamentals struct {
LastUpdate time.Time
Ticker string
General General `json:"General"`
Highlights Highlights `json:"Highlights"`
Valuation Valuation `json:"Valuation"`
Technicals Technicals `json:"Technicals"`
SplitsDividends SplitsDividends `json:"SplitsDividends"`
Earnings Earnings `json:"Earnings"`
Financials Financials `json:"Financials"`
}
Fundamentals for a ticker
type General ¶
type General struct {
Code string `json:"Code"`
Type string `json:"Type"`
Name string `json:"Name"`
Exchange string `json:"Exchange"`
CurrencyCode string `json:"CurrencyCode"`
CurrencyName string `json:"CurrencyName"`
CurrencySymbol string `json:"CurrencySymbol"`
CountryName string `json:"CountryName"`
CountryISO string `json:"CountryISO"`
ISIN *string `json:"ISIN"`
Sector string `json:"Sector"`
Industry string `json:"Industry"`
Description string `json:"Description"`
FullTimeEmployees *int `json:"FullTimeEmployees"`
UpdatedAt *string `json:"UpdatedAt"`
Cusip *string `json:"CUSIP"`
}
type Highlights ¶ added in v0.3.0
type Highlights struct {
MarketCapitalization *float64 `json:"MarketCapitalization"`
MarketCapitalizationMln string `json:"MarketCapitalizationMln"`
EBITDA *float64 `json:"EBITDA"`
PERatio *float64 `json:"PERatio"`
PEGRatio *float64 `json:"PEGRatio"`
WallStreetTargetPrice *float64 `json:"WallStreetTargetPrice"`
BookValue *float64 `json:"BookValue"`
DividendYield *float64 `json:"DividendYield"`
EPSEstimateCurrentYear *float64 `json:"EPSEstimateCurrentYear"`
EPSEstimateNextYear *float64 `json:"EPSEstimateNextYear"`
EPSEstimateNextQuarter *float64 `json:"EPSEstimateNextQuarter"`
MostRecentQuarter string `json:"MostRecentQuarter"`
ProfitMargin *float64 `json:"ProfitMargin"`
OperatingMarginTTM *float64 `json:"OperatingMarginTTM"`
ReturnOnAssetsTTM *float64 `json:"ReturnOnAssetsTTM"`
ReturnOnEquityTTM *float64 `json:"ReturnOnEquityTTM"`
RevenueTTM *float64 `json:"RevenueTTM"`
QuarterlyRevenueGrowthYOY *float64 `json:"QuarterlyRevenueGrowthYOY"`
GrossProfitTTM *float64 `json:"GrossProfitTTM"`
DilutedEpsTTM *float64 `json:"DilutedEpsTTM"`
QuarterlyEarningsGrowthYOY *float64 `json:"QuarterlyEarningsGrowthYOY"`
}
type IncomeStatement ¶ added in v0.3.0
type IncomeStatement struct {
CurrencySymbol string `json:"currency_symbol"`
QuarterlyLast0 IncomeStatementInfo `json:"quarterly_last_0"`
QuarterlyLast1 IncomeStatementInfo `json:"quarterly_last_1"`
QuarterlyLast2 IncomeStatementInfo `json:"quarterly_last_2"`
QuarterlyLast3 IncomeStatementInfo `json:"quarterly_last_3"`
YearlyLast0 IncomeStatementInfo `json:"yearly_last_0"`
YearlyLast1 IncomeStatementInfo `json:"yearly_last_1"`
YearlyLast2 IncomeStatementInfo `json:"yearly_last_2"`
YearlyLast3 IncomeStatementInfo `json:"yearly_last_3"`
}
type IncomeStatementInfo ¶ added in v0.3.0
type IncomeStatementInfo struct {
Date string `json:"date"`
FilingDate *string `json:"filing_date"`
ResearchDevelopment *float64 `json:"researchDevelopment"`
EffectOfAccountingCharges *float64 `json:"effectOfAccountingCharges"`
IncomeBeforeTax *float64 `json:"incomeBeforeTax"`
MinorityInterest *float64 `json:"minorityInterest"`
NetIncome *float64 `json:"netIncome"`
SellingGeneralAdministrative *float64 `json:"sellingGeneralAdministrative"`
GrossProfit *float64 `json:"grossProfit"`
Ebit *float64 `json:"ebit"`
OperatingIncome *float64 `json:"operatingIncome"`
OtherOperatingExpenses *float64 `json:"otherOperatingExpenses"`
InterestExpense *float64 `json:"interestExpense"`
ExtraordinaryItems *float64 `json:"extraordinaryItems"`
NonRecurring *float64 `json:"nonRecurring"`
OtherItems *float64 `json:"otherItems"`
IncomeTaxExpense *float64 `json:"incomeTaxExpense"`
TotalRevenue *float64 `json:"totalRevenue"`
TotalOperatingExpenses *float64 `json:"totalOperatingExpenses"`
CostOfRevenue *float64 `json:"costOfRevenue"`
TotalOtherIncomeExpenseNet *float64 `json:"totalOtherIncomeExpenseNet"`
DiscontinuedOperations *float64 `json:"discontinuedOperations"`
NetIncomeFromContinuingOps *float64 `json:"netIncomeFromContinuingOps"`
}
type SplitsDividends ¶ added in v0.3.0
type SplitsDividends struct {
ForwardAnnualDividendRate *float64 `json:"ForwardAnnualDividendRate"`
ForwardAnnualDividendYield *float64 `json:"ForwardAnnualDividendYield"`
PayoutRatio *float64 `json:"PayoutRatio"`
DividendDate string `json:"DividendDate"`
ExDividendDate string `json:"ExDividendDate"`
LastSplitFactor string `json:"LastSplitFactor"`
LastSplitDate string `json:"LastSplitDate"`
}
type Technicals ¶ added in v0.3.0
type Technicals struct {
Beta *float64 `json:"Beta"`
FiftyTwoWeekHigh *float64 `json:"52WeekHigh"`
FiftyTwoWeekLow *float64 `json:"52WeekLow"`
FiftyDayMA *float64 `json:"50DayMA"`
TwoHundredDayMA *float64 `json:"200DayMA"`
ShortRatio *float64 `json:"ShortRatio"`
ShortPercent *float64 `json:"ShortPercent"`
}
type Valuation ¶ added in v0.3.0
type Valuation struct {
TrailingPE *float64 `json:"TrailingPE"`
ForwardPE *float64 `json:"ForwardPE"`
PriceSalesTTM *float64 `json:"PriceSalesTTM"`
PriceBookMRQ *float64 `json:"PriceBookMRQ"`
EnterpriseValueRevenue *float64 `json:"EnterpriseValueRevenue"`
EnterpriseValueEbitda *float64 `json:"EnterpriseValueEbitda"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
diskcache
Package diskcache provides an implementation of httpcache.Cache that uses the diskv package to supplement an in-memory map with persistent storage
|
Package diskcache provides an implementation of httpcache.Cache that uses the diskv package to supplement an in-memory map with persistent storage |
Click to show internal directories.
Click to hide internal directories.