Documentation
¶
Index ¶
- Variables
- type AccountMetadata
- type AdvancedStats
- type AnnounceTime
- type Auction
- type BalanceSheet
- type BalanceSheets
- type BidAsk
- type Book
- type CDRateType
- type CEOCompensation
- type CashFlow
- type CashFlows
- type Client
- func (c Client) AccountMetadata(ctx context.Context) (AccountMetadata, error)
- func (c Client) AdvancedStats(ctx context.Context, symbol string) (AdvancedStats, error)
- func (c Client) AnalystRecommendations(ctx context.Context, symbol string) ([]Recommendation, error)
- func (c Client) AnalystRecommendationsAndTargets(ctx context.Context, symbol string) (CoreEstimate, error)
- func (c Client) AnnualBalanceSheets(ctx context.Context, symbol string, num int) (BalanceSheets, error)
- func (c Client) AnnualCashFlows(ctx context.Context, symbol string, num int) (CashFlows, error)
- func (c Client) AnnualFinancials(ctx context.Context, symbol string, num int) (Financials, error)
- func (c Client) AnnualIncomeStatements(ctx context.Context, symbol string, num int) (IncomeStatements, error)
- func (c Client) AvailableDataPoints(ctx context.Context, symbol string) ([]DataPoint, error)
- func (c Client) BalanceSheets(ctx context.Context, symbol, period string, num int) (BalanceSheets, error)
- func (c Client) BatchPrevious(ctx context.Context, symbols []string) (map[string]PreviousDay, error)
- func (c Client) BatchQuote(ctx context.Context, symbols []string) (map[string]Quote, error)
- func (c Client) Book(ctx context.Context, symbol string) (Book, error)
- func (c Client) CDRate(ctx context.Context, cd CDRateType) (float64, error)
- func (c Client) CEOCompensation(ctx context.Context, symbol string) (CEOCompensation, error)
- func (c Client) CPI(ctx context.Context) (float64, error)
- func (c Client) CollectionBySector(ctx context.Context, sector Sector) ([]Quote, error)
- func (c Client) CollectionByTag(ctx context.Context, tag Tag) ([]Quote, error)
- func (c Client) CommodityPrice(ctx context.Context, ct CommodityType) (float64, error)
- func (c Client) Company(ctx context.Context, symbol string) (Company, error)
- func (c Client) CreditCardInterestRate(ctx context.Context) (float64, error)
- func (c Client) CurrencyRates(ctx context.Context, symbols []string) ([]CurrencyRate, error)
- func (c Client) DEEP(ctx context.Context, symbol string) (DEEP, error)
- func (c Client) DEEPBook(ctx context.Context, symbols []string) (map[string]DEEPBook, error)
- func (c Client) DEEPTrades(ctx context.Context, symbols []string) (map[string][]Trade, error)
- func (c Client) DataPoint(ctx context.Context, symbol, key string) ([]byte, error)
- func (c Client) DataPointNumber(ctx context.Context, symbol, key string) (float64, error)
- func (c Client) DelayedQuote(ctx context.Context, symbol string) (DelayedQuote, error)
- func (c Client) Dividends(ctx context.Context, symbol string, r PathRange) ([]Dividend, error)
- func (c Client) Earnings(ctx context.Context, symbol string, num int) (Earnings, error)
- func (c Client) EarningsToday(ctx context.Context) (EarningsToday, error)
- func (c Client) Estimates(ctx context.Context, symbol string, num int) (Estimates, error)
- func (c Client) ExchangeRate(ctx context.Context, from, to string) (ExchangeRate, error)deprecated
- func (c Client) FXSymbols(ctx context.Context) (FXSymbols, error)
- func (c Client) FederalFundsRate(ctx context.Context) (float64, error)
- func (c *Client) FetchURLToJSON(ctx context.Context, u *url.URL, v interface{}) error
- func (c Client) FundOwnership(ctx context.Context, symbol string) ([]FundOwner, error)
- func (c Client) Gainers(ctx context.Context, limit int) ([]Quote, error)
- func (c *Client) GetBytes(ctx context.Context, endpoint string) ([]byte, error)
- func (c *Client) GetFloat64(ctx context.Context, endpoint string) (float64, error)
- func (c *Client) GetJSON(ctx context.Context, endpoint string, v interface{}) error
- func (c *Client) GetJSONWithQueryParams(ctx context.Context, endpoint string, queryParams map[string]string, ...) error
- func (c *Client) GetJSONWithoutToken(ctx context.Context, endpoint string, v interface{}) error
- func (c Client) HistoricalPrices(ctx context.Context, symbol string, timeframe HistoricalTimeFrame, ...) ([]HistoricalDataPoint, error)
- func (c Client) HistoricalPricesByDay(ctx context.Context, symbol string, day time.Time, options *HistoricalOptions) ([]HistoricalDataPoint, error)
- func (c Client) Holidays(ctx context.Context, dir string, last int, startDate time.Time) ([]TradeHolidayDate, error)
- func (c Client) IEXPercent(ctx context.Context, limit int) ([]Quote, error)
- func (c Client) IEXSymbols(ctx context.Context) ([]TradedSymbol, error)
- func (c Client) IEXVolume(ctx context.Context, limit int) ([]Quote, error)
- func (c Client) IPOsToday(ctx context.Context) (IPOCalendar, error)
- func (c Client) ISINMapping(ctx context.Context, symbol string) ([]SymbolDetails, error)
- func (c Client) InFocus(ctx context.Context, limit int) ([]Quote, error)
- func (c Client) InsiderRoster(ctx context.Context, symbol string) ([]InsiderRoster, error)
- func (c Client) InsiderSummary(ctx context.Context, symbol string) ([]InsiderSummary, error)
- func (c Client) InsiderTransactions(ctx context.Context, symbol string) ([]InsiderTransaction, error)
- func (c Client) InstitutionalOwnership(ctx context.Context, symbol string) ([]InstitutionalOwner, error)
- func (c Client) IntradayHistoricalPrices(ctx context.Context, symbol string, options *IntradayHistoricalOptions) ([]IntradayHistoricalDataPoint, error)
- func (c Client) IntradayHistoricalPricesByDay(ctx context.Context, symbol string, day time.Time, ...) ([]IntradayHistoricalDataPoint, error)
- func (c Client) IntradayPrices(ctx context.Context, symbol string) ([]IntradayPrice, error)
- func (c Client) IntradayPricesWithOpts(ctx context.Context, symbol string, options *IntradayOptions) ([]IntradayPrice, error)
- func (c Client) KeyStats(ctx context.Context, symbol string) (KeyStats, error)
- func (c Client) LargestTrades(ctx context.Context, symbol string) ([]LargestTrade, error)
- func (c Client) Last(ctx context.Context, symbols []string) ([]Last, error)
- func (c Client) Logo(ctx context.Context, symbol string) (Logo, error)
- func (c Client) Losers(ctx context.Context, limit int) ([]Quote, error)
- func (c Client) MarketNews(ctx context.Context, num int) ([]News, error)
- func (c Client) MarketVolume(ctx context.Context) ([]Market, error)
- func (c Client) Markets(ctx context.Context) ([]Market, error)
- func (c Client) MostActive(ctx context.Context, limit int) ([]Quote, error)
- func (c Client) MutualFundSymbols(ctx context.Context) ([]Symbol, error)
- func (c Client) News(ctx context.Context, symbol string, num int) ([]News, error)
- func (c Client) NextHoliday(ctx context.Context) (TradeHolidayDate, error)
- func (c Client) NextHolidays(ctx context.Context, numDays int) ([]TradeHolidayDate, error)
- func (c Client) NextTradingDay(ctx context.Context) (TradeHolidayDate, error)
- func (c Client) NextTradingDays(ctx context.Context, numDays int) ([]TradeHolidayDate, error)
- func (c Client) OHLC(ctx context.Context, symbol string) (OHLC, error)
- func (c Client) OTCSymbols(ctx context.Context) ([]Symbol, error)
- func (c Client) OneLast(ctx context.Context, symbol string) ([]Last, error)
- func (c Client) OneTOPS(ctx context.Context, symbol string) ([]TOPS, error)
- func (c Client) OptionsSymbols(ctx context.Context) (map[string][]string, error)
- func (c Client) Peers(ctx context.Context, symbol string) ([]string, error)
- func (c Client) PreviousDay(ctx context.Context, symbol string) (PreviousDay, error)
- func (c Client) PreviousHoliday(ctx context.Context) (TradeHolidayDate, error)
- func (c Client) PreviousTradingDay(ctx context.Context) (TradeHolidayDate, error)
- func (c Client) Price(ctx context.Context, symbol string) (float64, error)
- func (c Client) PriceTarget(ctx context.Context, symbol string) (PriceTarget, error)
- func (c Client) QuarterlyBalanceSheets(ctx context.Context, symbol string, num int) (BalanceSheets, error)
- func (c Client) QuarterlyCashFlows(ctx context.Context, symbol string, num int) (CashFlows, error)
- func (c Client) QuarterlyFinancials(ctx context.Context, symbol string, num int) (Financials, error)
- func (c Client) QuarterlyFinancialsAsReported(ctx context.Context, symbol string, num int) (FinancialsAsReported, error)
- func (c Client) QuarterlyIncomeStatements(ctx context.Context, symbol string, num int) (IncomeStatements, error)
- func (c Client) Quote(ctx context.Context, symbol string) (Quote, error)
- func (c Client) QuoteStream(ctx context.Context, symbols []string, utp bool, callback func(quotes []Quote)) error
- func (c Client) RecommendationTrends(ctx context.Context, symbol string) ([]Recommendation, error)
- func (c Client) RelevantStocks(ctx context.Context, symbol string) (RelevantStocks, error)
- func (c Client) Search(ctx context.Context, fragment string) ([]SearchResult, error)
- func (c Client) SectorPerformance(ctx context.Context) ([]SectorPerformance, error)
- func (c Client) Sectors(ctx context.Context) ([]Sector, error)
- func (c Client) Status(ctx context.Context) (Status, error)
- func (c Client) Symbols(ctx context.Context) ([]Symbol, error)
- func (c Client) SymbolsByExchange(ctx context.Context, exchange string) ([]Symbol, error)
- func (c Client) SymbolsByRegion(ctx context.Context, region string) ([]Symbol, error)
- func (c Client) TOPS(ctx context.Context, symbols []string) ([]TOPS, error)
- func (c Client) Tags(ctx context.Context) ([]Tag, error)
- func (c Client) TradingDays(ctx context.Context, dir string, last int, startDate time.Time) ([]TradeHolidayDate, error)
- func (c Client) USExchanges(ctx context.Context) ([]USExchange, error)
- func (c Client) UpcomingDividends(ctx context.Context, symbol string) ([]Dividend, error)
- func (c Client) UpcomingEarnings(ctx context.Context, symbol string, fullUpcomingEarnings bool) ([]UpcomingEarning, error)
- func (c Client) UpcomingEvents(ctx context.Context, symbol string, fullUpcomingEarnings bool) (UpcomingEvents, error)
- func (c Client) UpcomingIPOs(ctx context.Context) (IPOCalendar, error)
- func (c Client) UpcomingSplits(ctx context.Context, symbol string) ([]Split, error)
- func (c Client) Usage(ctx context.Context) (Usage, error)
- func (c Client) VolumeByVenue(ctx context.Context, symbol string) ([]VenueVolume, error)
- type ClientOption
- type CommodityPrice
- type CommodityType
- type Company
- type CoreEstimate
- type Currency
- type CurrencyPair
- type CurrencyRate
- type DEEP
- type DEEPBook
- type DataPoint
- type Date
- type DelayedQuote
- type Dividend
- type Earning
- type Earnings
- type EarningsToday
- type EpochTime
- type Error
- type Estimate
- type Estimates
- type ExchangeRate
- type FXSymbols
- type Financial
- type FinancialAsReported
- type Financials
- type FinancialsAsReported
- type FundOwner
- type HistoricalDataPoint
- type HistoricalOptions
- type HistoricalPrice
- type HistoricalTimeFrame
- type HourMinute
- type IPO
- type IPOCalendar
- type IPOView
- type IncomeStatement
- type IncomeStatements
- type InsiderRoster
- type InsiderSummary
- type InsiderTransaction
- type InstitutionalOwner
- type IntradayHistoricalDataPoint
- type IntradayHistoricalOptions
- type IntradayOptions
- type IntradayPrice
- type IssueType
- type KeyStats
- type LargestTrade
- type Last
- type Logo
- type Market
- type News
- type OHLC
- type OpHaltStatus
- type OpenClose
- type PathRange
- type PreviousDay
- type PriceTarget
- type Quote
- type Recommendation
- type Records
- type RelevantStocks
- type SSRStatus
- type SearchResult
- type Sector
- type SectorPerformance
- type SecurityEvent
- type Split
- type Status
- type Symbol
- type SymbolDetails
- type SystemEvent
- type TOPS
- type Tag
- type TimeSeriesQueryParameters
- type TimeSeriesRange
- type TodayEarning
- type Trade
- type TradeHolidayDate
- type TradedSymbol
- type TradingStatus
- type USExchange
- type UpcomingEarning
- type UpcomingEvents
- type Usage
- type VenueVolume
- type VolumeRecord
Constants ¶
This section is empty.
Variables ¶
var AnnounceTimeJSON = map[AnnounceTime]string{ // contains filtered or unexported fields }
AnnounceTimeJSON maps an AnnounceTime to the string used in the JSON.
var AnnounceTimes = map[string]AnnounceTime{
"BTO": bto,
"DMT": dmt,
"AMC": amc,
}
AnnounceTimes maps the string keys from the JSON to the AnnounceType constant values.
var IssueTypeJSON = map[IssueType]string{ // contains filtered or unexported fields }
IssueTypeJSON maps an IssueType to the string used in the JSON.
var IssueTypes = map[string]IssueType{
"ad": ad,
"re": re,
"ce": ce,
"cef": ce,
"si": si,
"lp": lp,
"cs": cs,
"et": et,
"wt": wt,
"rt": rt,
"ut": ut,
"temp": temp,
"": blank,
}
IssueTypes maps the string keys from the JSON to the IssueType constant values.
var PathRangeJSON = map[PathRange]string{ Mo1: "1m", Mo3: "3m", Mo6: "6m", Yr1: "1y", Yr2: "2y", Yr5: "5y", YTD: "ytd", Next: "next", }
PathRangeJSON maps a PathRange to the string used in the JSON.
var PathRanges = map[string]PathRange{ "next": Next, "1m": Mo1, "3m": Mo3, "6m": Mo6, "5y": Yr5, "2y": Yr2, "1y": Yr1, "ytd": YTD, }
PathRanges maps the string keys from the JSON to the PathRange constant values.
Functions ¶
This section is empty.
Types ¶
type AccountMetadata ¶
type AccountMetadata struct { PayAsYouGo bool `json:"overagesEnabled"` EffectiveDate EpochTime `json:"effectiveDate"` EndDateEffective *EpochTime `json:"endDateEffective"` SubscriptionTerm string `json:"subscriptionTermType"` TierName string `json:"tierName"` MessageLimit int `json:"messageLimit"` MessagesUsed int `json:"messagesUsed"` }
AccountMetadata provides details about an IEX Cloud account.
type AdvancedStats ¶
type AdvancedStats struct { KeyStats Beta float64 `json:"beta"` TotalCash float64 `json:"totalCash"` CurrentDebt float64 `json:"currentDebt"` Revenue float64 `json:"revenue"` GrossProfit float64 `json:"grossProfit"` TotalRevenue float64 `json:"totalRevenue"` EBITDA float64 `json:"EBITDA"` RevenuePerEmployee float64 `json:"revenuePerEmployee"` DebtToEquity float64 `json:"debtToEquity"` ProfitMargin float64 `json:"profitMargin"` EnterpriseValue float64 `json:"enterpriseValue"` EnterpriseValueToRevenue float64 `json:"enterpriseValueToRevenue"` PriceToSales float64 `json:"priceToSales"` PriceToBook float64 `json:"priceToBook"` ForwardPERatio float64 `json:"forwardPERatio"` PEGRatio float64 `json:"pegRatio"` PEHigh float64 `json:"peHigh"` PELow float64 `json:"peLow"` Week52HighDate Date `json:"week52highDate"` Week52LowDate Date `json:"week52lowDate"` PutCallRatio float64 `json:"putCallRatio"` }
AdvancedStats provides everything in key stats plus additional advanced stats such as EBITDA, ratios, key financial data, and more.
type AnnounceTime ¶
type AnnounceTime int
AnnounceTime refers to the time of earnings announcement.
func (*AnnounceTime) MarshalJSON ¶
func (a *AnnounceTime) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaler interface for AnnounceTime.
func (*AnnounceTime) Set ¶
func (a *AnnounceTime) Set(s string) error
Set sets the issue type using a string.
func (AnnounceTime) String ¶
func (a AnnounceTime) String() string
String implements the Stringer interface for AnnounceTime.
func (*AnnounceTime) UnmarshalJSON ¶
func (a *AnnounceTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Unmarshaler interface for AnnounceTime.
type Auction ¶
type Auction struct { AuctionType string `json:"auctionType"` ReferencePrice float64 `json:"referencePrice"` IndicativePrice float64 `json:"indicativePrice"` AuctionBookPrice float64 `json:"auctionBookPrice"` CollarReferencePrice float64 `json:"collarReferencePrice"` LowerCollarPrice float64 `json:"lowerCollarPrice"` UpperCollarPrice float64 `json:"upperCollarPrice"` ExtensionNumber int `json:"extensionNumber"` StartTime EpochTime `json:"startTime"` LastUpdate EpochTime `json:"lastUpdate"` }
Auction models auction data for a security
type BalanceSheet ¶
type BalanceSheet struct { ReportDate Date `json:"reportDate"` FilingType string `json:"filingType"` FiscalDate Date `json:"fiscalDate"` FiscalQuarter int `json:"fiscalQuarter"` FiscalYear int `json:"fiscalYear"` Currency string `json:"currency"` CurrentCash float64 `json:"currentCash"` ShortTermInvestments float64 `json:"shortTermInvestments"` Receivables float64 `json:"receivables"` Inventory float64 `json:"inventory"` OtherCurrentAssets float64 `json:"otherCurrentAssets"` CurrentAssets float64 `json:"currentAssets"` LongTermInvestments float64 `json:"longTermInvestments"` PropertyPlantEquipment float64 `json:"propertyPlantEquipment"` Goodwill float64 `json:"goodwill"` IntangibleAssets float64 `json:"intangibleAssets"` OtherAssets float64 `json:"otherAssets"` TotalAssets float64 `json:"totalAssets"` AccountsPayable float64 `json:"accountsPayable"` CurrentLongTermDebt float64 `json:"currentLongTermDebt"` OtherCurrentLiabilities float64 `json:"otherCurrentLiabilities"` TotalCurrentLiabilities float64 `json:"totalCurrentLiabilities"` LongTermDebt float64 `json:"longTermDebt"` OtherLiablities float64 `json:"otherLiabilities"` MinorityInterest float64 `json:"minorityInterest"` TotalLiabilities float64 `json:"totalLiabilities"` CommonStock float64 `json:"commonStock"` RetainedEarnings float64 `json:"retainedEarnings"` TreasuryStock float64 `json:"treasuryStock"` CapitalSurplus float64 `json:"capitalSurplus"` NetTangibleAssets float64 `json:"netTangibleAssets"` }
BalanceSheet models one balance sheet statement. Normally the amounts returned are integers, although the currentCash for UBNT returned is a float; therefore, these are all floats.
type BalanceSheets ¶
type BalanceSheets struct { Symbol string `json:"symbol"` Statements []BalanceSheet `json:"balancesheet"` }
BalanceSheets pulls balance sheet data. Available quarterly (4 quarters) and annually (4 years).
type BidAsk ¶
type BidAsk struct { Price float64 `json:"price"` Size int `json:"size"` Timestamp EpochTime `json:"timestamp"` }
BidAsk models a bid or an ask for a quote.
type Book ¶
type Book struct { Quote Quote `json:"quote"` Bids []BidAsk `json:"bids"` Asks []BidAsk `json:"asks"` Trades []Trade `json:"trades"` SystemEvent SystemEvent `json:"systemEvent"` }
Book models the data returned from the /book endpoint.
type CDRateType ¶ added in v2.6.0
type CDRateType string
CDRateType indicates the type of CD Rate.
const ( NonJumboCD CDRateType = "MMNRNJ" JumboCD CDRateType = "MMNRJD" )
Available CD Rates.
func (CDRateType) String ¶ added in v2.6.0
func (cd CDRateType) String() string
String provides the Stringer interface for CDRateType.
type CEOCompensation ¶
type CEOCompensation struct { Symbol string `json:"symbol"` Name string `json:"name"` Company string `json:"companyName"` Location string `json:"location"` Salary int `json:"salary"` Bonus int `json:"bonus"` StockAwards int `json:"stockAwards"` OptionAwards int `json:"optionAwards"` NonEquityIncentives int `json:"nonEquityIncentives"` PensionAndDeferred int `json:"pensionAndDeferred"` OtherCompensation int `json:"otherComp"` Total int `json:"total"` Year int `json:"year"` }
CEOCompensation models the compensation for a company's CEO.
type CashFlow ¶
type CashFlow struct { ReportDate Date `json:"reportDate"` FilingType string `json:"filingType"` FiscalDate Date `json:"fiscalDate"` FiscalQuarter int `json:"fiscalQuarter"` FiscalYear int `json:"fiscalYear"` Currency string `json:"currency"` NetIncome float64 `json:"netIncome"` Depreciation float64 `json:"depreciation"` ChangesInReceivables float64 `json:"changesInReceivables"` ChangesInInventories float64 `json:"changesInInventories"` CashChange float64 `json:"cashChange"` CashFlow float64 `json:"cashFlow"` CapitalExpenditures float64 `json:"capitalExpenditures"` Investments float64 `json:"investments"` InvestingActivityOther float64 `json:"investingActivityOther"` TotalInvestingCashFlows float64 `json:"totalInvestingCashFlows"` DividendsPaid float64 `json:"dividendsPaid"` NetBorrowings float64 `json:"netBorrowings"` OtherFinancingCashFlows float64 `json:"otherFinancingCashFlows"` CashFlowFinancing float64 `json:"cashFlowFinancing"` ExchangeRateEffect float64 `json:"exchangeRateEffect"` }
CashFlow models one cash flow statement.
type CashFlows ¶
CashFlows pulls cash flow data. Available quarterly (4 quarters) or annually (4 years).
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client models a client to consume the IEX Cloud API.
func NewClient ¶
func NewClient(token string, opts ...ClientOption) *Client
NewClient creates a client with the given authorization token.
func (Client) AccountMetadata ¶
func (c Client) AccountMetadata(ctx context.Context) (AccountMetadata, error)
AccountMetadata returns information about an IEX Cloud account, such as current tier, payment status, message quote usage, etc. An SK token is required to access.
func (Client) AdvancedStats ¶
AdvancedStats returns the everything in key stats plus additional advanced stats such as EBITDA, ratios, key financial data, and more.
func (Client) AnalystRecommendations ¶ added in v2.2.2
func (c Client) AnalystRecommendations( ctx context.Context, symbol string, ) ([]Recommendation, error)
AnalystRecommendations pulls data from the last four months using premium data from Refinitiv.
func (Client) AnalystRecommendationsAndTargets ¶ added in v2.15.0
func (c Client) AnalystRecommendationsAndTargets( ctx context.Context, symbol string, ) (CoreEstimate, error)
AnalystRecommendationsAndTargets provides current and historical consensus analyst recommendations and price targets.
func (Client) AnnualBalanceSheets ¶
func (c Client) AnnualBalanceSheets( ctx context.Context, symbol string, num int, ) (BalanceSheets, error)
AnnualBalanceSheets returns the specified number of most recent annual balance sheets from the IEX Cloud endpoint for the given stock symbol.
func (Client) AnnualCashFlows ¶
AnnualCashFlows returns the specified number of most recent annual cash flow statements from the IEX Cloud endpoint for the given stock symbol.
func (Client) AnnualFinancials ¶
AnnualFinancials returns the specified number of most recent annual financials for the given stock symbol. This endpoint is carried over from the IEX 1.0 API and may be deprecated in the future.
func (Client) AnnualIncomeStatements ¶
func (c Client) AnnualIncomeStatements( ctx context.Context, symbol string, num int, ) (IncomeStatements, error)
AnnualIncomeStatements returns the specified number of most recent annual income statements from the IEX Cloud endpoint for the given stock symbol.
func (Client) AvailableDataPoints ¶ added in v2.2.0
AvailableDataPoints returns a list of the available data points for a given symbol and the weight of each data point.
func (Client) BalanceSheets ¶ added in v2.15.2
func (c Client) BalanceSheets( ctx context.Context, symbol, period string, num int, ) (BalanceSheets, error)
BalanceSheets returns the specified number of most recent balance sheets with the given period (either "annual" or "quarter").
func (Client) BatchPrevious ¶ added in v2.14.0
func (c Client) BatchPrevious( ctx context.Context, symbols []string, ) (map[string]PreviousDay, error)
BatchPrevious returns the previous day price for up to 100 stock symbols.
func (Client) BatchQuote ¶ added in v2.13.0
BatchQuote returns the quote data for up to 100 stock symbols.
func (Client) CDRate ¶ added in v2.6.0
CDRate returns the price for the given commodity not seasonally adjusted.
func (Client) CEOCompensation ¶
CEOCompensation provides CEO compensation for the given stock symbol.
func (Client) CollectionBySector ¶
CollectionBySector returns an array of quote objects for all symbols within the specified sector.
func (Client) CollectionByTag ¶
CollectionByTag returns an array of quote objects for all symbols within the specified tag collection.
func (Client) CommodityPrice ¶ added in v2.3.0
CommodityPrice returns the price for the given commodity not seasonally adjusted.
func (Client) Company ¶
Company returns the copmany data from the IEX Cloud endpoint for the given stock symbol.
func (Client) CreditCardInterestRate ¶ added in v2.6.0
CreditCardInterestRate returns the commercial bank credit card interest rate.
func (Client) CurrencyRates ¶ added in v2.15.0
CurrencyRates returns real-time foreign currency exchange rates data updated every 250 milliseconds.
func (Client) DEEPTrades ¶
DEEPTrades provides DEEP trades data for multiple symbols.
func (Client) DataPoint ¶ added in v2.2.0
DataPoint returns the plain text value for the requested data point key for the given symbol.
func (Client) DataPointNumber ¶ added in v2.3.0
DataPointNumber returns the float64 for the requested data point key and the given symbol.
func (Client) DelayedQuote ¶
DelayedQuote returns the 15 minute delayed market quote from the IEX Cloud endpoint for the given stock symbol.
func (Client) Dividends ¶
Dividends returns the dividends from the IEX Cloud endpoint for the given stock symbol and the given date range.
func (Client) Earnings ¶
Earnings returns the specified number of most recent earnings data from the IEX Cloud endpoint for the given stock symbol.
func (Client) EarningsToday ¶
func (c Client) EarningsToday(ctx context.Context) (EarningsToday, error)
EarningsToday returns the earnings that will be reported today before the open and after the market closes.
func (Client) Estimates ¶
Estimates returns the latest consensue estimates for the next fiscal period.
func (Client) ExchangeRate
deprecated
ExchangeRate returns an end of day exchange rate of a given currency pair.
Deprecated: This endpoint does no longer exist. See https://www.iexcloud.io/docs/api/#forex-currencies
func (Client) FXSymbols ¶
FXSymbols returns a list of currencies and a list of foreign exchange currency pairs that are available supported by IEX Cloud.
func (Client) FederalFundsRate ¶ added in v2.6.0
FederalFundsRate returns the effective federal funds rate.
func (*Client) FetchURLToJSON ¶ added in v2.15.1
Fetches JSON content from the given URL and unmarshals it into `v`.
func (Client) FundOwnership ¶
FundOwnership returns the ten top holders of the given stock.
func (Client) Gainers ¶
Gainers returns a list of quotes for the top 10 stock gainers from the IEX Cloud endpoint updated intraday, 15 minute delayed.
func (*Client) GetFloat64 ¶
GetFloat64 gets the number from the given endpoint.
func (*Client) GetJSONWithQueryParams ¶ added in v2.15.1
func (c *Client) GetJSONWithQueryParams(ctx context.Context, endpoint string, queryParams map[string]string, v interface{}) error
GetJSONWithQueryParams gets the JSON data from the given endpoint with the query parameters attached.
func (*Client) GetJSONWithoutToken ¶
GetJSONWithoutToken gets the JSON data from the given endpoint without adding a token to the URL.
func (Client) HistoricalPrices ¶
func (c Client) HistoricalPrices( ctx context.Context, symbol string, timeframe HistoricalTimeFrame, options *HistoricalOptions, ) ([]HistoricalDataPoint, error)
HistoricalPrices retrieves historically adjusted market-wide data
func (Client) HistoricalPricesByDay ¶
func (c Client) HistoricalPricesByDay( ctx context.Context, symbol string, day time.Time, options *HistoricalOptions, ) ([]HistoricalDataPoint, error)
HistoricalPricesByDay retrieves historically adjusted market-wide data for a given day
func (Client) Holidays ¶ added in v2.15.0
func (c Client) Holidays( ctx context.Context, dir string, last int, startDate time.Time, ) ([]TradeHolidayDate, error)
Holidays returns the last or next dates of holidays, for the given number of days, from the given start date.
func (Client) IEXPercent ¶
IEXPercent returns a list of quotes for the top 10 IEX stocks by percent from the IEX Cloud endpoint updated intraday, 15 minute delayed.
func (Client) IEXSymbols ¶
func (c Client) IEXSymbols(ctx context.Context) ([]TradedSymbol, error)
IEXSymbols returns an array of symbols the Investors Exchange supports for trading. This list is updated daily as of 7:45 a.m. ET. Symbols may be added or removed by the Investors Exchange after the list was produced.
func (Client) IEXVolume ¶
IEXVolume returns a list of quotes for the top 10 IEX stocks by volume from the IEX Cloud endpoint updated intraday, 15 minute delayed.
func (Client) IPOsToday ¶ added in v2.6.1
func (c Client) IPOsToday(ctx context.Context) (IPOCalendar, error)
IPOsToday returns the IPOs that are scheduled to occur today.
func (Client) ISINMapping ¶ added in v2.14.0
ISINMapping convert ISIN to IEX Cloud symbols.
func (Client) InFocus ¶
InFocus returns a list of quotes for the top 10 in focus stocks from the IEX Cloud endpoint updated intraday, 15 minute delayed.
func (Client) InsiderRoster ¶
InsiderRoster returns the top 10 insiders with the most recent information for the given stock symbol.
func (Client) InsiderSummary ¶
InsiderSummary returns the insiders summary with the most recent information for the given stock symbol.
func (Client) InsiderTransactions ¶
func (c Client) InsiderTransactions( ctx context.Context, symbol string, ) ([]InsiderTransaction, error)
InsiderTransactions returns a list of insider transactions for the given stock symbol.
func (Client) InstitutionalOwnership ¶
func (c Client) InstitutionalOwnership( ctx context.Context, symbol string, ) ([]InstitutionalOwner, error)
InstitutionalOwnership returns the top 10 holders with the most recent information.
func (Client) IntradayHistoricalPrices ¶
func (c Client) IntradayHistoricalPrices( ctx context.Context, symbol string, options *IntradayHistoricalOptions, ) ([]IntradayHistoricalDataPoint, error)
IntradayHistoricalPrices retrieves intraday historical market-wide data
func (Client) IntradayHistoricalPricesByDay ¶
func (c Client) IntradayHistoricalPricesByDay( ctx context.Context, symbol string, day time.Time, options *IntradayHistoricalOptions, ) ([]IntradayHistoricalDataPoint, error)
IntradayHistoricalPricesByDay retrieves intraday historical market-wide data for a given day
func (Client) IntradayPrices ¶ added in v2.4.0
IntradayPrices returns the aggregated intraday prices in one minute buckets.
func (Client) IntradayPricesWithOpts ¶ added in v2.7.0
func (c Client) IntradayPricesWithOpts( ctx context.Context, symbol string, options *IntradayOptions, ) ([]IntradayPrice, error)
IntradayPricesWithOpts returns the aggregated intraday prices in one minute buckets for the given options.
func (Client) KeyStats ¶
KeyStats returns the key stats from the IEX Cloud endpoint for the given stock symbol.
func (Client) LargestTrades ¶
LargestTrades returns the 15 minute delayed, last sale eligible trade from the IEX Cloud endpoint for the given stock symbol.
func (Client) Last ¶
Last provides trade data for executions on IEX. It is a near real time, intraday API that provides IEX last sale price, size and time. Last is ideal for developers that need a lightweight stock quote.
func (Client) Logo ¶
Logo returns the logo data from the IEX Cloud endpoint for the given stock symbol.
func (Client) Losers ¶
Losers returns a list of quotes for the top 10 stock losers from the IEX Cloud endpoint updated intraday, 15 minute delayed.
func (Client) MarketNews ¶
MarketNews retrieves the given number of news articles for the market.
func (Client) MarketVolume ¶ added in v2.4.0
MarketVolume returns the real time traded volume on U.S. markets.
func (Client) Markets ¶
Markets returns real time traded volume on U.S. markets. This may be deprecated in the future. Use MarketVolume instead.
func (Client) MostActive ¶
MostActive returns a list of quotes for the top 10 most active stocks from the IEX Cloud endpoint updated intraday, 15 minute delayed.
func (Client) MutualFundSymbols ¶
MutualFundSymbols returns an array of mutual funds that IEX Cloud supports for API calls.
func (Client) NextHoliday ¶
func (c Client) NextHoliday(ctx context.Context) (TradeHolidayDate, error)
NextHoliday returns the date of the next holiday.
func (Client) NextHolidays ¶
NextHolidays returns the dates of the next holidays for the given number of days.
func (Client) NextTradingDay ¶
func (c Client) NextTradingDay(ctx context.Context) (TradeHolidayDate, error)
NextTradingDay returns the date of the next trading day.
func (Client) NextTradingDays ¶
NextTradingDays returns the dates of the next trading days for the given number of days.
func (Client) OHLC ¶
OHLC returns the OHLC data from the IEX Cloud endpoint for the given stock symbol.
func (Client) OTCSymbols ¶
OTCSymbols returns an array of Over-the-Counter (OTC) stocks that IEX Cloud supports for API calls.
func (Client) OptionsSymbols ¶ added in v2.13.0
OptionsSymbols returns a map keyed by symbol with the value of each symbol being an slice of available contract dates
func (Client) PreviousDay ¶
PreviousDay returns the previous day adjusted price data from the IEX Cloud endpoint for the given stock symbol.
func (Client) PreviousHoliday ¶
func (c Client) PreviousHoliday(ctx context.Context) (TradeHolidayDate, error)
PreviousHoliday returns the date of the previous holiday.
func (Client) PreviousTradingDay ¶
func (c Client) PreviousTradingDay(ctx context.Context) (TradeHolidayDate, error)
PreviousTradingDay returns the date of the previous trading day.
func (Client) PriceTarget ¶
PriceTarget returns the latest average, high, and low analyst price target for a given stock symbol.
func (Client) QuarterlyBalanceSheets ¶
func (c Client) QuarterlyBalanceSheets( ctx context.Context, symbol string, num int, ) (BalanceSheets, error)
QuarterlyBalanceSheets returns the specified number of most recent quarterly balance sheets from the IEX Cloud endpoint for the given stock symbol. A quarterly balance sheet could come from a 10-K instead of a 10-Q if from the fiscal year end of the company.
func (Client) QuarterlyCashFlows ¶
QuarterlyCashFlows returns the specified number of most recent annual cash flow statements from the IEX Cloud endpoint for the given stock symbol.
func (Client) QuarterlyFinancials ¶
func (c Client) QuarterlyFinancials( ctx context.Context, symbol string, num int, ) (Financials, error)
QuarterlyFinancials returns the specified number of most recent quarterly financials from the IEX Cloud endpoint for the given stock symbol.
func (Client) QuarterlyFinancialsAsReported ¶ added in v2.12.0
func (c Client) QuarterlyFinancialsAsReported( ctx context.Context, symbol string, num int, ) (FinancialsAsReported, error)
QuarterlyFinancialsAsReported returns the specified number of most recent quarterly 10-Q filings from the IEX Cloud endpoint for the given stock symbol.
func (Client) QuarterlyIncomeStatements ¶
func (c Client) QuarterlyIncomeStatements( ctx context.Context, symbol string, num int, ) (IncomeStatements, error)
QuarterlyIncomeStatements returns the specified number of most recent annual income statements from the IEX Cloud endpoint for the given stock symbol.
func (Client) Quote ¶
Quote returns the quote data from the IEX Cloud endpoint for the given stock symbol.
func (Client) QuoteStream ¶ added in v2.16.0
func (c Client) QuoteStream( ctx context.Context, symbols []string, utp bool, callback func(quotes []Quote), ) error
QuoteStream streams quote data for the given symbols, until the context is finished. If UTP is true, then you must have an outstanding agreement for UTP otherwise the endpoint will fail with "unauthorized".
func (Client) RecommendationTrends ¶
RecommendationTrends provides a list of recommendations with the start and end date for each rating. Keep to not break API.
func (Client) RelevantStocks ¶
RelevantStocks is similar to the peers endpoint, except this will return most active market symbols when peers are not available. If the symbols returned are not peers, the peers key will be false. This is not intended to represent a definitive or accurate list of peers, and is subject to change at any time.
func (Client) Search ¶ added in v2.15.0
Search returns an array of search results for the given symbol fragment.
func (Client) SectorPerformance ¶
func (c Client) SectorPerformance(ctx context.Context) ([]SectorPerformance, error)
SectorPerformance returns the performance of each sector for the current trading day. Performance is based on each sector ETF.
func (Client) SymbolsByExchange ¶ added in v2.9.0
SymbolsByExchange returns an array of symbols from the defined market that IEX Cloud supports for API calls.
func (Client) SymbolsByRegion ¶ added in v2.9.0
SymbolsByRegion returns an array of symbols from the defined region that IEX Cloud supports for API calls.
func (Client) TOPS ¶
TOPS is used to receive real-time top of book quotations direct from IEX. The quotations received via TOPS provide an aggregated size and do not indicate the size or number of individual orders at the best bid or ask. Non-displayed orders and non-displayed portions of reserve orders are not represented in TOPS. TOPS also provides last trade price and size information. Trades resulting from either displayed or non-displayed orders matching on IEX will be reported. Routed executions will not be reported.
func (Client) TradingDays ¶ added in v2.15.0
func (c Client) TradingDays( ctx context.Context, dir string, last int, startDate time.Time, ) ([]TradeHolidayDate, error)
TradingDays returns the last or next dates of trading days, for the given number of days, from the given start date.
func (Client) USExchanges ¶
func (c Client) USExchanges(ctx context.Context) ([]USExchange, error)
USExchanges returns an array of U.S. Exchanges.
func (Client) UpcomingDividends ¶ added in v2.6.1
UpcomingDividends returns all upcoming dividends for a given symbol. If an empty string is passed in for the symbol, data for the entire market is returned.
func (Client) UpcomingEarnings ¶ added in v2.6.1
func (c Client) UpcomingEarnings( ctx context.Context, symbol string, fullUpcomingEarnings bool, ) ([]UpcomingEarning, error)
UpcomingEarnings returns all upcoming earnings for a given symbol. If an empty string is passed in for the symbol, data for the entire market is returned. If fullUpcomingEarnings is set to true, full estimates objects are returned; otherwise, earnings will only return Symbol and ReportDate.
func (Client) UpcomingEvents ¶ added in v2.6.1
func (c Client) UpcomingEvents( ctx context.Context, symbol string, fullUpcomingEarnings bool, ) (UpcomingEvents, error)
UpcomingEvents returns all upcoming events for a given symbol. If an empty string is passed in for the symbol, data for the entire market, including IPOs, is returned. If fullUpcomingEarnings is set to true, full estimates objects are returned; otherwise, earnings will only return Symbol and ReportDate.
func (Client) UpcomingIPOs ¶ added in v2.6.1
func (c Client) UpcomingIPOs(ctx context.Context) (IPOCalendar, error)
UpcomingIPOs returns all upcoming IPOs for the entire market.
func (Client) UpcomingSplits ¶ added in v2.6.1
UpcomingSplits returns all upcoming splits for a given symbol. If an empty string is passed in for the symbol, data for the entire market is returned.
func (Client) VolumeByVenue ¶ added in v2.5.0
VolumeByVenue returns the 15 minute delayed and 30 day average consolidated volume percentage of a stock by market. This will return 13 values sorted in ascending order by current day trading volume percentage.
type ClientOption ¶ added in v2.15.2
type ClientOption func(*Client)
ClientOption applies an option to the client.
func WithBaseURL ¶
func WithBaseURL(baseURL string) ClientOption
WithBaseURL sets the baseURL for a new IEX Client.
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) ClientOption
WithHTTPClient sets the http.Client for a new IEX Client.
func WithRateLimiter ¶ added in v2.17.0
func WithRateLimiter(duration time.Duration, numRequests int) ClientOption
WithRateLimiter sets the rate limiter.
func WithSSEBaseURL ¶ added in v2.16.0
func WithSSEBaseURL(url string) ClientOption
WithSSEBaseURL sets the sseBaseURL for a new IEX Client.
func WithSecureHTTPClient ¶ added in v2.15.0
func WithSecureHTTPClient() ClientOption
WithSecureHTTPClient sets a secure http.Client for a new IEX Client.
type CommodityPrice ¶ added in v2.3.0
type CommodityPrice struct { Value float64 `json:"value"` ID string `json:"id"` Source string `json:"source"` Key string `json:"key"` Subkey string `json:"subkey"` Date EpochTime `json:"date"` Updated EpochTime `json:"updated"` }
CommodityPrice models the price for a single commodity when returned using the time series endpoint.
type CommodityType ¶ added in v2.3.0
type CommodityType string
CommodityType indicates the type of commodity.
const ( WestTexasOil CommodityType = "DCOILWTICO" BrentEuropeOil CommodityType = "DCOILBRENTEU" HenryHubNG CommodityType = "DHHNGSP" NYHeatingOil CommodityType = "DHOILNYH" GulfCoastJetFuel CommodityType = "DJFUELUSGULF" USDiesel CommodityType = "GASDESW" USRegularGas CommodityType = "GASREGCOVW" USMidgradeGas CommodityType = "GASMIDCOVW" USPremiumGas CommodityType = "GASPRMCOVW" MontBelvieuPropane CommodityType = "DPROPANEMBTX" )
Available commodities.
func (CommodityType) String ¶ added in v2.3.0
func (ct CommodityType) String() string
String provides the Stringer interface for CommodityType.
type Company ¶
type Company struct { Symbol string `json:"symbol"` Name string `json:"companyName"` Exchange string `json:"exchange"` Industry string `json:"industry"` Website string `json:"website"` Description string `json:"description"` CEO string `json:"CEO"` IssueType string `json:"issueType"` Sector string `json:"sector"` Employees int `json:"employees"` Tags []string `json:"tags"` SecurityName string `json:"securityName"` PrimarySICCode int `json:"primarySicCode"` Address string `json:"address"` Address2 string `json:"address2"` State string `json:"state"` City string `json:"city"` Zip string `json:"zip"` Country string `json:"country"` Phone string `json:"phone"` }
Company models the company data from the /company endpoint.
type CoreEstimate ¶ added in v2.15.0
type CoreEstimate struct { ID string `json:"CORE_ESTIMATES"` Key string `json:"key"` Subkey string `json:"subkey"` Symbol string `json:"symbol"` AnalystCount int `json:"analystCount"` ConsensusDate Date `json:"consensusDate"` MarketConsensus float64 `json:"marketConsensus"` TargetPrice float64 `json:"marketConsensusTargetPrice"` Date EpochTime `json:"date"` Updated EpochTime `json:"updated"` }
CoreEstimate modules a current or historical consensus analyst recommendation and price target.
type CurrencyPair ¶
CurrencyPair models an available currency pair listing both the from currency and the to currency codes.
type CurrencyRate ¶ added in v2.15.0
type CurrencyRate struct { Symbol string `json:"symbol"` Rate float64 `json:"rate"` Timestamp EpochTime `json:"timestamp"` }
CurrencyRate returns real-time foreign currency exchange rates data.
type DEEP ¶
type DEEP struct { Symbol string `json:"symbol"` MarketPercent float64 `json:"marketPercent"` Volume int `json:"volume"` LastSalePrice float64 `json:"lastSalePrice"` LastSaleSize int `json:"lastSaleSize"` LastSaleTime EpochTime `json:"lastSaleTime"` LastUpdated EpochTime `json:"lastUpdated"` Bids []BidAsk `json:"bids"` Asks []BidAsk `json:"asks"` SystemEvent SystemEvent `json:"systemEvent"` TradingStatus TradingStatus `json:"tradingStatus"` OpHaltStatus OpHaltStatus `json:"opHaltStatus"` SSRStatus SSRStatus `json:"ssrStatus"` SecurityEvent SecurityEvent `json:"securityEvent"` Trades []Trade `json:"trades"` TradeBreaks []Trade `json:"tradeBreaks"` Auction Auction `json:"auction"` }
DEEP is used to receive real-time depth of book quotations direct from IEX. The depth of book quotations received via DEEP provide an aggregated size of resting displayed orders at a price and side, and do not indicate the size or number of individual orders at any price level.
type DataPoint ¶ added in v2.2.0
type DataPoint struct { Key string `json:"key"` Weight int `json:"weight"` Description string `json:"description"` LastUpdated time.Time `json:"lastUpdated"` }
DataPoint models a single data point.
type Date ¶
Date models a report date
func (*Date) MarshalJSON ¶
MarshalJSON implements the Marshaler interface for Date.
func (*Date) UnmarshalJSON ¶
UnmarshalJSON implements the Unmarshaler interface for Date.
type DelayedQuote ¶
type DelayedQuote struct { Symbol string `json:"symbol"` DelayedPrice float64 `json:"delayedPrice"` DelayedSize int `json:"delayedSize"` DelayedPriceTime int `json:"delayedPriceTime"` High float64 `json:"High"` Low float64 `json:"Low"` TotalVolume int `json:"totalVolume"` ProcessedTime int `json:"processedTime"` }
DelayedQuote returns the 15 minute delayed market quote.
type Dividend ¶
type Dividend struct { Symbol string `json:"symbol"` ExDate Date `json:"exDate"` PaymentDate Date `json:"paymentDate"` RecordDate Date `json:"recordDate"` DeclaredDate Date `json:"declaredDate"` Amount float64 `json:"amount"` Flag string `json:"flag"` Currency string `json:"currency"` Description string `json:"description"` Frequency string `json:"frequency"` }
Dividend models one dividend (basic) for the stock fundamentals.
type Earning ¶
type Earning struct { EPSReportDate Date `json:"EPSReportDate"` EPSSurpriseDollar float64 `json:"EPSSurpriseDollar"` EPSSurpriseDollarPercent float64 `json:"EPSSurpriseDollarPercent"` ActualEPS float64 `json:"actualEPS"` AnnounceTime AnnounceTime `json:"announceTime"` ConsensusEPS float64 `json:"consensusEPS"` Currency string `json:"currency"` FiscalEndDate Date `json:"fiscalEndDate"` FiscalPeriod string `json:"fiscalPeriod"` NumberOfEstimates int `json:"numberOfEstimates"` PeriodType string `json:"periodType"` Symbol string `json:"symbol"` YearAgo float64 `json:"yearAgo"` YearAgoChangePercent float64 `json:"yearAgoChangePercent"` ID string `json:"id"` Key string `json:"key"` SubKey string `json:"subkey"` Date uint64 `json:"date"` Updated uint64 `json:"updated"` }
Earning models the earnings for one date.
type Earnings ¶
Earnings provides earnings data for a given company including the actual EPS, consensus, and fiscal period. Earnings are available quarterly (last 4 quarters) and annually (last 4 years).
type EarningsToday ¶
type EarningsToday struct { BeforeOpen []TodayEarning `json:"bto"` AfterClose []TodayEarning `json:"amc"` DuringTrading []TodayEarning `json:"other"` }
EarningsToday models the earning that will be reported today as two arrays: before the open and after market close. Each array contains an object with all keys from earnings, a quote object, and a headline key.
type EpochTime ¶
EpochTime refers to unix timestamps used for some fields in the API
func (EpochTime) MarshalJSON ¶
MarshalJSON implements the Marshaler interface for EpochTime.
func (*EpochTime) UnmarshalJSON ¶
UnmarshalJSON implements the Unmarshaler interface for EpochTime.
type Estimate ¶
type Estimate struct { AnnounceTime string `json:"announceTime"` ConsensusEPS float64 `json:"consensusEPS"` CapitalExpenditures float64 `json:"consensusCPX"` EBIT float64 `json:"consensusEBI"` EBITDA float64 `json:"consensusEBT"` FundsFromOperations float64 `json:"consensusFFO"` EPSFullyReported float64 `json:"consensusGPS"` GrossMargin float64 `json:"consensusGRM"` NetAssetValue float64 `json:"consensusNAV"` NetIncome float64 `json:"consensusNET"` OperatingProfit float64 `json:"consensusOPR"` PreTaxProfit float64 `json:"consensusPRE"` ReturnOnAssets float64 `json:"consensusROA"` ReturnOnEquity float64 `json:"consensusROE"` Revenue float64 `json:"consensusSAL"` Currency string `json:"currency"` FiscalEndDate Date `json:"fiscalEndDate"` FiscalPeriod string `json:"fiscalPeriod"` NumberOfEstimates int `json:"numberOfEstimates"` NumEstEPS int `json:"numberOfEstimatesEPS"` NumEstCapitalExpenditures int `json:"numberOfEstimatesCPX"` NumEstEBIT int `json:"numberOfEstimatesEBI"` NumEstEBITDA int `json:"numberOfEstimatesEBT"` NumEstFundsFronOperations int `json:"numberOfEstimatesFFO"` NumEstEPSFullyReported int `json:"numberOfEstimatesGPS"` NumEstGrossMargin int `json:"numberOfEstimatesGRM"` NumEstNetAssetValue int `json:"numberOfEstimatesNAV"` NumEstNetIncome int `json:"numberOfEstimatesNET"` NumEstOperatingProfit int `json:"numberOfEstimatesOPR"` NumEstPreTaxProfit int `json:"numberOfEstimatesPRE"` NumEstReturnOnAssets int `json:"numberOfEstimatesROA"` NumEstReturnOnEquity int `json:"numberOfEstimatesROE"` NumEstRevenue int `json:"numberOfEstimatesSAL"` PeriodType string `json:"periodType"` ReportDate Date `json:"reportDate"` Symbol string `json:"symbol"` }
Estimate models one estimate.
type ExchangeRate ¶
type ExchangeRate struct { Date Date `json:"date"` FromCurrency string `json:"fromCurrency"` ToCurrency string `json:"toCurrency"` Rate float64 `json:"rate"` }
ExchangeRate models the exchange rate of a given currency pair.
type FXSymbols ¶
type FXSymbols struct { Currencies []Currency `json:"currencies"` Pairs []CurrencyPair `json:"pairs"` }
FXSymbols provides a list of the currencies and currency pairs available from IEX Cloud.
type Financial ¶
type Financial struct { ReportDate Date `json:"reportDate"` FiscalDate Date `json:"fiscalDate"` Currency string `json:"currency"` GrossProfit float64 `json:"grossProfit"` CostOfRevenue float64 `json:"costOfRevenue"` OperatingRevenue float64 `json:"operatingRevenue"` TotalRevenue float64 `json:"totalRevenue"` OperatingIncome float64 `json:"operatingIncome"` NetIncome float64 `json:"netIncome"` ResearchAndDevelopment float64 `json:"researchAndDevelopment"` OperatingExpense float64 `json:"operatingExpense"` CurrentAssets float64 `json:"currentAssets"` TotalAssets float64 `json:"totalAssets"` TotalLiabilities float64 `json:"totalLiabilities"` CurrentCash float64 `json:"currentCash"` CurrentDebt float64 `json:"currentDebt"` ShortTermDebt float64 `json:"shortTermDebt"` LongTermDebt float64 `json:"LongTermDebt"` TotalCash float64 `json:"totalCash"` TotalDebt float64 `json:"totalDebt"` CashChange float64 `json:"cashChange"` CashFlow float64 `json:"cashFlow"` }
Financial pulls income statement, balance sheet, and cash flow data from the most recent reported quarter. This endpoint is carried over from the IEX 1.0 API. Use the new cash-flow, income statement, and balance-sheet endpoints for new data.
type FinancialAsReported ¶ added in v2.12.0
type FinancialAsReported struct { ID string `json:"id"` Source string `json:"source"` Key string `json:"key"` Subkey string `json:"subkey"` Date EpochTime `json:"date"` Updated EpochTime `json:"updated"` FiscalYear int64 `json:"formFiscalYear"` Version string `json:"version"` PeriodStart EpochTime `json:"periodStart"` PeriodEnd EpochTime `json:"periodEnd"` DateFiled EpochTime `json:"dateFiled"` FiscalQuarter int64 `json:"formFiscalQuarter"` }
FinancialAsReported models an SEC financial filing.
type Financials ¶
Financials models income statement, balance sheet, and cash flow data from the most recent reported quarter.
type FinancialsAsReported ¶ added in v2.12.0
type FinancialsAsReported []FinancialAsReported
FinancialsAsReported models multiple SEC financial 10-K or 10-Q filings.
type FundOwner ¶
type FundOwner struct { AdjustedHolding float64 `json:"adjHolding"` AdjustedMarketValue float64 `json:"adjMv"` Name string `json:"entityProperName"` ReportDate EpochTime `json:"reportDate"` ReportedHolding float64 `json:"reportedHolding"` ReportedMarketValue float64 `json:"reportedMv"` }
FundOwner models a fund owning a stock.
type HistoricalDataPoint ¶
type HistoricalDataPoint struct { Close float64 `json:"close"` High float64 `json:"high"` Low float64 `json:"low"` Open float64 `json:"open"` Symbol string `json:"symbol"` Volume float64 `json:"volume"` ID string `json:"id"` Key string `json:"key"` Subkey string `json:"subkey"` Date Date `json:"date"` ChangeOverTime float64 `json:"changeOverTime"` Minute string `json:"minute"` UOpen float64 `json:"uOpen"` UClose float64 `json:"uClose"` UHigh float64 `json:"uHigh"` ULow float64 `json:"uLow"` UVolume int `json:"uVolume"` Change float64 `json:"change"` ChangePercent float64 `json:"changePercent"` Label string `json:"label"` }
HistoricalDataPoint Represents a single historical data point for a stock
func (HistoricalDataPoint) Time ¶ added in v2.15.2
func (p HistoricalDataPoint) Time() time.Time
Time merges HistoricalDataPoint's Date and Mintue field and get the exact time. Useful for "5dm" and "1mm" time frames
type HistoricalOptions ¶
type HistoricalOptions struct { ChartCloseOnly bool `url:"chartCloseOnly,omitempty"` ChartSimplify bool `url:"chartSimplify,omitempty"` ChartInterval int `url:"chartInterval,omitempty"` ChangeFromClose bool `url:"changeFromClose,omitempty"` ChartLast int `url:"chartLast,omitempty"` DisplayPercent bool `url:"displayPercent,omitempty"` Range string `url:"range,omitempty"` ExactDate string `url:"exactDate,omitempty"` Sort string `url:"sort,omitempty"` IncludeToday bool `url:"includeToday,omitempty"` }
HistoricalOptions optional query params to pass to historical endpoint If values are false or 0 they aren't passed.
type HistoricalPrice ¶
type HistoricalPrice struct {
Date string `json:"date"`
}
HistoricalPrice models the data for a historical stock price.
type HistoricalTimeFrame ¶
type HistoricalTimeFrame string
HistoricalTimeFrame enum for selecting time frame of historical data
const ( // FiveDayHistorical Five days historically adjusted market-wide data FiveDayHistorical HistoricalTimeFrame = "5d" // FiveDay10MinuteHistorical Five days historically adjusted market-wide data in 10 minute intervals FiveDay10MinuteHistorical HistoricalTimeFrame = "5dm" // OneMonthHistorical One month (default) historically adjusted market-wide data OneMonthHistorical HistoricalTimeFrame = "1m" // OneMonth30MinuteHistorical One month historically adjusted market-wide data in 30 minute intervals OneMonth30MinuteHistorical HistoricalTimeFrame = "1mm" // ThreeMonthHistorical Three months historically adjusted market-wide data ThreeMonthHistorical HistoricalTimeFrame = "3m" // SixMonthHistorical Six months historically adjusted market-wide data SixMonthHistorical HistoricalTimeFrame = "6m" // OneYearHistorical One year historically adjusted market-wide data OneYearHistorical HistoricalTimeFrame = "1y" // TwoYearHistorical Two year historically adjusted market-wide data TwoYearHistorical HistoricalTimeFrame = "2y" // FiveYearHistorical Five year historically adjusted market-wide data FiveYearHistorical HistoricalTimeFrame = "5y" // YearToDateHistorical Year to date historically adjusted market-wide data YearToDateHistorical HistoricalTimeFrame = "ytd" // MaxHistorical All available historically adjusted market-wide data up to 15 years MaxHistorical HistoricalTimeFrame = "max" )
func (HistoricalTimeFrame) Valid ¶
func (htf HistoricalTimeFrame) Valid() bool
Valid Determines if HistoricalTimeFrame is a defined constant
type HourMinute ¶ added in v2.4.0
HourMinute models a duration of hours and minutes.
func (*HourMinute) UnmarshalJSON ¶ added in v2.4.0
func (hm *HourMinute) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Unmarshaler interface for Date.
type IPO ¶ added in v2.6.1
type IPO struct { Symbol string `json:"symbol"` CompanyName string `json:"companyName"` ExpectedDate Date `json:"expectedDate"` LeadUnderwriters []string `json:"leadUnderwriters"` Underwriters []string `json:"underwriters"` CompanyCounsel []string `json:"companyCounsel"` UnderwriterCounsel []string `json:"underwriterCounsel"` Auditor string `json:"auditor"` Market string `json:"market"` CIK string `json:"cik"` Address string `json:"address"` City string `json:"city"` State string `json:"state"` Zip string `json:"zip"` Phone string `json:"phone"` CEO string `json:"ceo"` Employees int `json:"employees"` URL string `json:"url"` Status string `json:"status"` PriceLow float64 `json:"priceLow"` PriceHigh float64 `json:"priceHigh"` OfferAmount int `json:"offerAmount"` TotalExpenses int `json:"totalExpenses"` LockupPeriodExpiration string `json:"lockupPeriodExpiration"` QuietPeriodExpiration string `json:"quietPeriodExpiration"` Revenue int `json:"revenue"` NetIncome int `json:"netIncome"` TotalAssets int `json:"totalAssets"` TotalLiabilities int `json:"totalLiabilities"` StockholderEquity int `json:"stockholderEquity"` CompanyDescription string `json:"companyDescription"` BusinessDescription string `json:"businessDescription"` UseOfProceeds string `json:"useOfProceeds"` Competition string `json:"competition"` Amount int `json:"amount"` PercentOffered string `json:"percentOffered"` }
IPO is all available data for an IPO.
type IPOCalendar ¶ added in v2.6.1
IPOCalendar is a list of IPOs.
type IPOView ¶ added in v2.6.1
type IPOView struct { Company string `json:"Company"` Symbol string `json:"Symbol"` Price string `json:"Price"` Amount string `json:"Amount"` Float string `json:"Float"` Percent string `json:"Percent"` Market string `json:"Market"` Expected Date `json:"Expected"` }
IPOView is IPO data structured for display to a user.
type IncomeStatement ¶
type IncomeStatement struct { ReportDate Date `json:"reportDate"` FilingType string `json:"filingType"` FiscalDate Date `json:"fiscalDate"` FiscalQuarter int `json:"fiscalQuarter"` FiscalYear int `json:"fiscalYear"` Currency string `json:"currency"` TotalRevenue float64 `json:"totalRevenue"` CostOfRevenue float64 `json:"costOfRevenue"` GrossProfit float64 `json:"grossProfit"` ResearchAndDevelopment float64 `json:"researchAndDevelopment"` SellingGeneralAndAdmin float64 `json:"sellingGeneralAndAdmin"` OperatingExpense float64 `json:"operatingExpense"` OperatingIncome float64 `json:"operatingIncome"` OtherIncomeExpenseNet float64 `json:"otherIncomeExpenseNet"` EBIT float64 `json:"ebit"` InterestIncome float64 `json:"interestIncome"` PretaxIncome float64 `json:"pretaxIncome"` IncomeTax float64 `json:"incomeTax"` MinorityInterest float64 `json:"minorityInterest"` NetIncome float64 `json:"netIncome"` NetIncomeBasic float64 `json:"netIncomeBasic"` }
IncomeStatement models one income statement.
type IncomeStatements ¶
type IncomeStatements struct { Symbol string `json:"symbol"` Statements []IncomeStatement `json:"income"` }
IncomeStatements pulls income statement data. Available quarterly (4 quarters) and annually (4 years).
type InsiderRoster ¶
type InsiderRoster struct { EntityName string `json:"entityName"` Position float64 `json:"position"` ReportDate EpochTime `json:"reportDate"` }
InsiderRoster models the top 10 insiders with the most recent information.
type InsiderSummary ¶
type InsiderSummary struct { Name string `json:"fullName"` NetTransaction int `json:"netTransaction"` ReportedTitle string `json:"reportedTitle"` TotalBought int `json:"totalBought"` TotalSold int `json:"totalSold"` Updated EpochTime `json:"updated"` }
InsiderSummary models a summary of insider information.
type InsiderTransaction ¶
type InsiderTransaction struct { EffectiveDate EpochTime `json:"effectiveDate"` Name string `json:"fullName"` ReportedTitle string `json:"reportedTitle"` Price float64 `json:"tranPrice"` Value float64 `json:"tranValue"` }
InsiderTransaction models a buy or sell transaction made by an insider of a company.
type InstitutionalOwner ¶
type InstitutionalOwner struct { AdjustedHolding float64 `json:"adjHolding"` AdjustedMarketValue float64 `json:"adjMv"` EntityName string `json:"entityProperName"` ReportDate EpochTime `json:"reportDate"` ReportedHolding float64 `json:"reportedHolding"` }
InstitutionalOwner models an institutional owner of a stock.
type IntradayHistoricalDataPoint ¶
type IntradayHistoricalDataPoint struct { Date Date `json:"date"` Minute string `json:"minute"` Label string `json:"label"` MarketOpen float64 `json:"marketOpen"` MarketClose float64 `json:"marketClose"` MarketHigh float64 `json:"marketHigh"` MarketLow float64 `json:"marketLow"` MarketAverage float64 `json:"marketAverage"` MarketVolume int `json:"marketVolume"` MarketNotional float64 `json:"marketNotional"` MarketNumberOfTrades int `json:"marketNumberOfTrades"` MarketChangeOverTime float64 `json:"marketChangeOverTime"` High float64 `json:"high"` Low float64 `json:"low"` Open float64 `json:"open"` Close float64 `json:"close"` Average float64 `json:"average"` Volume float64 `json:"volume"` Notional float64 `json:"notional"` NumberOfTrades int `json:"numberOfTrades"` ChangeOverTime float64 `json:"changeOverTime"` }
IntradayHistoricalDataPoint represents a single intraday data point for a stock.
type IntradayHistoricalOptions ¶
type IntradayHistoricalOptions struct { ChartIEXOnly bool `url:"chartIEXOnly,omitempty"` ChartReset bool `url:"chartReset,omitempty"` ChartSimplify bool `url:"chartSimplify,omitempty"` ChartInterval int `url:"chartInterval,omitempty"` ChangeFromClose bool `url:"changeFromClose,omitempty"` ChartLast int `url:"chartLast,omitempty"` }
IntradayHistoricalOptions optional query params to pass to intraday historical endpoint If values are false or 0 they aren't passed.
type IntradayOptions ¶ added in v2.7.0
type IntradayOptions struct { ChartIEXOnly bool `url:"chartIEXOnly,omitempty"` ChartReset bool `url:"chartReset,omitempty"` ChartSimplify bool `url:"chartSimplify,omitempty"` ChartInterval int `url:"chartInterval,omitempty"` ChangeFromClose bool `url:"changeFromClose,omitempty"` ChartLast int `url:"chartLast,omitempty"` ExactDate string `url:"exactDate,omitempty"` // Formatted as YYYYMMDD ChartIEXWhenNull bool `url:"chartIEXWhenNull,omitempty"` }
IntradayOptions optional query params to pass to intraday endpoint If values are false or 0 they aren't passed.
func (*IntradayOptions) SetExactDate ¶ added in v2.7.0
func (opt *IntradayOptions) SetExactDate(day time.Time)
SetExactDate formats a given date as IEX expects
type IntradayPrice ¶ added in v2.4.0
type IntradayPrice struct { Date Date `json:"date"` Minute HourMinute `json:"minute"` Label string `json:"label"` MarketOpen float64 `json:"marketOpen"` MarketClose float64 `json:"marketClose"` MarketHigh float64 `json:"marketHigh"` MarketLow float64 `json:"marketLow"` MarketAverage float64 `json:"marketAverage"` MarketVolume int `json:"marketVolume"` MarketNotional float64 `json:"marketNotional"` MarketNumTrades int `json:"marketNumberOfTrades"` MarketChangeOverTime float64 `json:"marketChangeOverTime"` High float64 `json:"High"` Low float64 `json:"Low"` Open float64 `json:"Open"` Close float64 `json:"Close"` Average float64 `json:"average"` Volume int `json:"volume"` Notional float64 `json:"notional"` NumTrades int `json:"numberOfTrades"` ChangeOverTime float64 `json:"changeOverTime"` }
IntradayPrice models the data for an aggregated intraday price in one minute buckets.
type IssueType ¶
type IssueType int
IssueType refers to the common issue type of the stock.
func (*IssueType) MarshalJSON ¶
MarshalJSON implements the Marshaler interface for IssueType.
func (*IssueType) UnmarshalJSON ¶
UnmarshalJSON implements the Unmarshaler interface for IssueType.
type KeyStats ¶
type KeyStats struct { Name string `json:"companyName"` MarketCap float64 `json:"marketCap"` Week52High float64 `json:"week52High"` Week52Low float64 `json:"week52Low"` Week52Change float64 `json:"week52Change"` Float float64 `json:"float"` Avg10Volume float64 `json:"avg10Volume"` Avg30Volume float64 `json:"avg30Volume"` Day200MovingAvg float64 `json:"day200MovingAvg"` Day50MovingAvg float64 `json:"day50MovingAvg"` Employees int `json:"employees"` TTMEPS float64 `json:"ttmEPS"` TTMDividendRate float64 `json:"ttmDividendRate"` DividendYield float64 `json:"dividendYield"` NextDividendDate Date `json:"nextDividendDate"` ExDividendDate Date `json:"exDividendDate"` NextEarningsDate Date `json:"nextEarningsDate"` PERatio float64 `json:"peRatio"` Beta float64 `json:"beta"` MaxChangePercent float64 `json:"maxChangePercent"` Year5ChangePercent float64 `json:"year5ChangePercent"` Year2ChangePercent float64 `json:"year2ChangePercent"` Year1ChangePercent float64 `json:"year1ChangePercent"` YTDChangePercent float64 `json:"ytdChangePercent"` Month6ChangePercent float64 `json:"month6ChangePercent"` Month3ChangePercent float64 `json:"month3ChangePercent"` Month1ChangePercent float64 `json:"month1ChangePercent"` Day30ChangePercent float64 `json:"day30ChangePercent"` Day5ChangePercent float64 `json:"day5ChangePercent"` }
KeyStats models the data returned from IEX Cloud's /stats endpoint.
type LargestTrade ¶
type LargestTrade struct { Price float64 `json:"price"` Size int `json:"size"` Time int `json:"time"` TimeLabel string `json:"timeLabel"` Venue string `json:"venue"` VenueName string `json:"venueName"` }
LargestTrade models the 15 minute delayed, last sale eligible trades.
type Last ¶
type Last struct { Symbol string `json:"symbol"` Price float64 `json:"Price"` Size int `json:"Size"` Time EpochTime `json:"time"` }
Last provides trade data for executions on IEX. It is a near real time, intraday API that provides IEX last sale price, size and time. Last is ideal for developers that need a lightweight stock quote.
type Market ¶
type Market struct { MIC string `json:"mic"` TapeID string `json:"tapeId"` Venue string `json:"venueName"` Volume int `json:"volume"` TapeA int `json:"tapeA"` TapeB int `json:"tapeB"` TapeC int `json:"tapeC"` Percent float64 `json:"marketPercent"` LastUpdated EpochTime `json:"lastUpdated"` }
Market models the traded volume on U.S. markets.
type News ¶
type News struct { Time EpochTime `json:"datetime"` Headline string `json:"headline"` Source string `json:"source"` URL string `json:"url"` Summary string `json:"summary"` Related string `json:"related"` Image string `json:"image"` Language string `json:"lang"` HasPaywall bool `json:"hasPaywall,omitempty"` }
News models a news item either for the market or for an individual stock.
type OHLC ¶
type OHLC struct { Open OpenClose `json:"open"` Close OpenClose `json:"close"` High float64 `json:"high"` Low float64 `json:"low"` }
OHLC models the open, high, low, close for a stock.
type OpHaltStatus ¶
OpHaltStatus models the operational halt status of a security
type OpenClose ¶
OpenClose provides the price and time for either the open or close price of a stock.
type PathRange ¶
type PathRange int
PathRange refers to the date range used in the path of an endpoint.
func (*PathRange) MarshalJSON ¶
MarshalJSON implements the Marshaler interface for PathRange.
func (*PathRange) UnmarshalJSON ¶
UnmarshalJSON implements the Unmarshaler interface for PathRange.
type PreviousDay ¶
type PreviousDay struct { Symbol string `json:"symbol"` Date Date `json:"date"` Open float64 `json:"open"` High float64 `json:"high"` Low float64 `json:"Low"` Close float64 `json:"close"` Volume int `json:"volume"` UnadjustedVolume int `json:"unadjustedVolume"` Change float64 `json:"change"` ChangePercent float64 `json:"changePercent"` }
PreviousDay models the previous day adjusted price data.
type PriceTarget ¶
type PriceTarget struct { Symbol string `json:"symbol"` UpdatedDate Date `json:"updatedDate"` Average float64 `json:"priceTargetAverage"` High float64 `json:"priceTargetHigh"` Low float64 `json:"priceTargetLow"` NumAnalysts int `json:"numberOfAnalysts"` Currency string `json:"currency"` }
PriceTarget models the latest average, high, and low analyst price target for a symbol.
type Quote ¶
type Quote struct { Symbol string `json:"symbol,omitempty"` CompanyName string `json:"companyName,omitempty"` PrimaryExchange string `json:"primaryExchange,omitempty"` CalculationPrice string `json:"calculationPrice,omitempty"` Open float64 `json:"open,omitempty"` OpenTime EpochTime `json:"openTime,omitempty"` OpenSource string `json:"openSource,omitempty"` Close float64 `json:"close,omitempty"` CloseTime EpochTime `json:"closeTime,omitempty"` CloseSource string `json:"closeSource,omitempty"` High float64 `json:"high,omitempty"` HighTime EpochTime `json:"highTime,omitempty"` HighSource string `json:"highSource,omitempty"` Low float64 `json:"low,omitempty"` LowTime EpochTime `json:"lowTime,omitempty"` LowSource string `json:"lowSource,omitempty"` LatestPrice float64 `json:"latestPrice,omitempty"` LatestSource string `json:"latestSource,omitempty"` LatestTime string `json:"latestTime,omitempty"` LatestUpdate EpochTime `json:"latestUpdate,omitempty"` LatestVolume int `json:"latestVolume,omitempty"` IEXRealtimePrice float64 `json:"iexRealtimePrice,omitempty"` IEXRealtimeSize int `json:"iexRealtimeSize,omitempty"` IEXLastUpdated EpochTime `json:"iexLastUpdated,omitempty"` DelayedPrice float64 `json:"delayedPrice,omitempty"` DelayedPriceTime EpochTime `json:"delayedPriceTime,omitempty"` ExtendedPrice float64 `json:"extendedPrice,omitempty"` ExtendedChange float64 `json:"extendedChange,omitempty"` ExtendedChangePercent float64 `json:"extendedChangePercent,omitempty"` ExtendedPriceTime EpochTime `json:"extendedPriceTime,omitempty"` PreviousClose float64 `json:"previousClose,omitempty"` Change float64 `json:"change,omitempty"` ChangePercent float64 `json:"changePercent,omitempty"` IEXMarketPercent float64 `json:"iexMarketPercent,omitempty"` IEXVolume int `json:"iexVolume,omitempty"` AvgTotalVolume int `json:"avgTotalVolume,omitempty"` IEXBidPrice float64 `json:"iexBidPrice,omitempty"` IEXBidSize int `json:"iexBidSize,omitempty"` IEXAskPrice float64 `json:"iexAskPrice,omitempty"` IEXAskSize int `json:"iexAskSize,omitempty"` MarketCap int `json:"marketCap,omitempty"` Week52High float64 `json:"week52High,omitempty"` Week52Low float64 `json:"week52Low,omitempty"` YTDChange float64 `json:"ytdChange,omitempty"` PERatio float64 `json:"peRatio,omitempty"` }
Quote models the data returned from the IEX Cloud /quote endpoint.
type Recommendation ¶
type Recommendation struct { BuyRatings int `json:"ratingBuy"` OverweightRatings int `json:"ratingOverweight"` HoldRatings int `json:"ratingHold"` UnderweightRatings int `json:"ratingUnderweight"` SellRatings int `json:"ratingSell"` NoRatings int `json:"ratingNone"` ConsensusRating float64 `json:"ratingScaleMark"` ConsensusStartDate EpochTime `json:"consensusStartDate"` CorporateActionsAppliedDate EpochTime `json:"corporateActionsAppliedDate"` ConsensusEndDate EpochTime `json:"consensusEndDate"` ConsensusRatingOneToFive float64 `json:"ratingScaleMarkOneToFive"` }
Recommendation models the buy, hold, sell recommendations for a stock.
type Records ¶
type Records struct {
Volume VolumeRecord `json:"volume"`
}
Records models the stats records.
type RelevantStocks ¶
RelevantStocks models a list of relevant stocks that may or may not be peers.
type SSRStatus ¶
type SSRStatus struct { IsSSR bool `json:"isSSR"` Detail string `json:"detail"` Timestamp EpochTime `json:"timestamp"` }
SSRStatus models the short sale price test status for a security
type SearchResult ¶ added in v2.15.0
type SearchResult struct { Symbol string `json:"symbol"` SecurityName string `json:"securityName"` SecurityType string `json:"securityType"` Region string `json:"region"` Exchange string `json:"exchange"` Sector string `json:"sector"` CIK string `json:"cik"` }
SearchResult models the data for a single search result.
type Sector ¶
type Sector struct {
Name string `json:"name"`
}
Sector models an industry sector, as defined by IEX. i.e. "Technology", "Consumer Cyclical"
type SectorPerformance ¶
type SectorPerformance struct { Type string `json:"sector"` Name string `json:"name"` Performance float64 `json:"performance"` LastUpdated EpochTime `json:"lastUpdated"` }
SectorPerformance models the performance based on each sector ETF.
type SecurityEvent ¶
type SecurityEvent struct { SecurityEvent string `json:"securityEvent"` Timestamp EpochTime `json:"timestamp"` }
SecurityEvent models events which apply to a specific security
type Split ¶
type Split struct { Symbol string `json:"symbol"` ExDate Date `json:"exDate"` DeclaredDate Date `json:"declaredDate"` Ratio float64 `json:"ratio"` ToFactor float64 `json:"toFactor"` FromFactor float64 `json:"fromFactor"` Description string `json:"description"` }
Split models the a stock split.
type Status ¶
type Status struct { Status string `json:"status"` Version string `json:"version"` Time EpochTime `json:"time"` }
Status models the IEX Cloud API system status
type Symbol ¶
type Symbol struct { Symbol string `json:"symbol"` Exchange string `json:"exchange"` Name string `json:"name"` Date Date `json:"date"` Type string `json:"type"` IEXID string `json:"iexId"` Region string `json:"region"` Currency string `json:"currency"` IsEnabled bool `json:"isEnabled"` }
Symbol models the data for one stock, mutual fund, or OTC symbol that IEX Cloud supports for API calls.
type SymbolDetails ¶ added in v2.14.0
type SymbolDetails struct { Symbol string `json:"symbol"` Region string `json:"region"` Exchange string `json:"exchange"` IEXId string `json:"iexid"` }
SymbolDetails models the details of a symbol.
type SystemEvent ¶
type SystemEvent struct { SystemEvent string `json:"systemEvent"` Timestamp EpochTime `json:"timestamp"` }
SystemEvent models a system event for a quote.
type TOPS ¶
type TOPS struct { Symbol string `json:"symbol"` MarketPercent float64 `json:"marketPercent"` BidSize int `json:"bidSize"` BidPrice float64 `json:"bidPrice"` AskSize int `json:"AskSize"` AskPrice float64 `json:"AskPrice"` Volume int `json:"volume"` LastSalePrice float64 `json:"lastSalePrice"` LastSaleTime EpochTime `json:"lastSaleTime"` LastUpdated EpochTime `json:"lastUpdated"` Sector string `json:"sector"` SecurityType string `json:"securityType"` }
TOPS contains IEX's aggregated best quoted bid and offer position in near real time for all securities on IEX's displayed limit order book.
type Tag ¶
type Tag struct {
Name string `json:"name"`
}
Tag models the tag field specified for each symbol i.e. "Financial Services", "Industrials"
type TimeSeriesQueryParameters ¶ added in v2.18.0
type TimeSeriesQueryParameters struct { }
type TimeSeriesRange ¶ added in v2.18.0
type TimeSeriesRange string
const ( Today TimeSeriesRange = "today" Yesterday TimeSeriesRange = "yesterday" YearToDate TimeSeriesRange = "ytd" LastWeek TimeSeriesRange = "last-week" LastMonth TimeSeriesRange = "last-month" LastQuarter TimeSeriesRange = "last-quarter" )
type TodayEarning ¶
type TodayEarning struct { ConsensusEPS float64 `json:"consensusEPS"` AnnounceTime AnnounceTime `json:"announcetime"` NumberOfEstimates int `json:"numberOfEstimates"` FiscalPeriod string `json:"fiscalPeriod"` FiscalEndDate Date `json:"fiscalEndDate"` Symbol string `json:"symbol"` Quote Quote `json:"quote"` }
TodayEarning models a single earning being reported today containing all keys from earnings, a quote object, and a headline.
type Trade ¶
type Trade struct { Price float64 `json:"price"` Size int `json:"size"` TradeID int `json:"tradeId"` IsISO bool `json:"isISO"` IsOddLot bool `json:"isOddLot"` IsOutsideRegularHours bool `json:"isOutsideRegularHours"` IsSinglePriceCross bool `json:"isSinglePriceCross"` IsTradeThroughExempt bool `json:"isTradeThroughExempt"` Timestamp EpochTime `json:"timestamp"` }
Trade models a trade for a quote.
type TradeHolidayDate ¶
type TradeHolidayDate struct { Date Date `json:"date"` SettlementDate Date `json:"settlementDate"` }
TradeHolidayDate models either a trade date or a holiday.
type TradedSymbol ¶
type TradedSymbol struct { Symbol string `json:"symbol"` Date Date `json:"date"` IsEnabled bool `json:"isEnabled"` }
TradedSymbol models a stock symbol the Investors Exchange supports for trading.
type TradingStatus ¶
type TradingStatus struct { Status string `json:"status"` Reason string `json:"reason"` Timestamp EpochTime `json:"timestamp"` }
TradingStatus models the current trading status of a security
type USExchange ¶
type USExchange struct { Name string `json:"name"` LongName string `json:"longName"` MarketID string `json:"mic"` TapeID string `json:"tapeId"` OATSID string `json:"oatsId"` RefID string `json:"refId"` Type string `json:"type"` }
USExchange provides information about one U.S. exchange including the name, the Market identifier code, the ID used to identify the exchange on the consolidated tape, the FINRA OATS exchange participant ID, and the type of securities traded by the exchange.
type UpcomingEarning ¶ added in v2.6.1
type UpcomingEarning struct { Estimate Symbol string `json:"symbol"` SymbolID string `json:"symbolId"` }
UpcomingEarning is an upcoming earnings event.
type UpcomingEvents ¶ added in v2.6.1
type UpcomingEvents struct { IPOs IPOCalendar `json:"ipos"` Earnings []UpcomingEarning `json:"earnings"` Dividends []Dividend `json:"dividends"` Splits []Split `json:"splits"` }
UpcomingEvents is all of the upcoming events.
type Usage ¶
type Usage struct { MonthlyUsage int `json:"monthlyUsage"` MonthlyPayAsYouGo int `json:"monthlyPayAsYouGo"` DailyUsage map[string]int `json:"dailyUsage"` TokenUsage map[string]int `json:"tokenUsage"` KeyUsage map[string]int `json:"keyUsage"` }
Usage provides current month usage for your account.
type VenueVolume ¶ added in v2.5.0
type VenueVolume struct { Volume int `json:"volume"` Venue string `json:"venue"` VenueName string `json:"venueName"` Date Date `json:"date"` MarketPercent float64 `json:"marketPercent"` AverageMarketPercent float64 `json:"avgMarketPercent"` }
VenueVolume models the 15 minute delayed and 30 day average consolidated volume percentage of a stock by market.