Documentation ¶
Overview ¶
Copyright (c) 2019 The iexcloud developers. All rights reserved. Project site: https://github.com/goinvest/iexcloud Use of this source code is governed by a MIT-style license that can be found in the LICENSE file for the project.
Index ¶
- Variables
- func WithBaseURL(baseURL string) func(*Client)
- func WithHTTPClient(httpClient *http.Client) func(*Client)
- type AccountMetadata
- type AdvancedStats
- type AnnounceTime
- type Auction
- type BalanceSheet
- type BalanceSheets
- type BidAsk
- type Book
- 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) 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) Book(ctx context.Context, symbol string) (Book, error)
- func (c Client) CEOCompensation(ctx context.Context, symbol string) (CEOCompensation, 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) Company(ctx context.Context, symbol string) (Company, error)
- func (c Client) Crypto(ctx context.Context, symbol string) (CryptoQuote, error)
- func (c Client) CryptoSymbols(ctx context.Context) ([]CryptoSymbol, 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) 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)
- func (c Client) FXSymbols(ctx context.Context) (FXSymbols, error)
- func (c Client) FundOwnership(ctx context.Context, symbol string) ([]FundOwner, error)
- func (c Client) Gainers(ctx context.Context) ([]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) 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) IEXPercent(ctx context.Context) ([]Quote, error)
- func (c Client) IEXSymbols(ctx context.Context) ([]TradedSymbol, error)
- func (c Client) IEXVolume(ctx context.Context) ([]Quote, error)
- func (c Client) InFocus(ctx context.Context) ([]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) IntradayStats(ctx context.Context, symbol string) (IntradayStats, 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) ([]Quote, error)
- func (c Client) MarketNews(ctx context.Context, num int) ([]News, error)
- func (c Client) Markets(ctx context.Context) ([]Market, error)
- func (c Client) MostActive(ctx context.Context) ([]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) 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) QuarterlyIncomeStatements(ctx context.Context, symbol string, num int) (IncomeStatements, error)
- func (c Client) Quote(ctx context.Context, symbol string) (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) 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) TOPS(ctx context.Context, symbols []string) ([]TOPS, error)
- func (c Client) Tags(ctx context.Context) ([]Tag, error)
- func (c Client) USExchanges(ctx context.Context) ([]USExchange, error)
- func (c Client) Usage(ctx context.Context) (Usage, error)
- type Company
- type CryptoQuote
- type CryptoSymbol
- type Currency
- type CurrencyPair
- type DEEP
- type DEEPBook
- type DataPoint
- type Date
- type DelayedQuote
- type Dividend
- type Earning
- type Earnings
- type EarningsToday
- type EpochTime
- type Estimate
- type Estimates
- type ExchangeRate
- type FXSymbols
- type Financial
- type Financials
- type FundOwner
- type HistoricalDataPoint
- type HistoricalOptions
- type HistoricalPrice
- type HistoricalTimeFrame
- type IncomeStatement
- type IncomeStatements
- type InsiderRoster
- type InsiderSummary
- type InsiderTransaction
- type InstitutionalOwner
- type IntradayHistoricalDataPoint
- type IntradayHistoricalOptions
- type IntradayStats
- 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 Sector
- type SectorPerformance
- type SecurityEvent
- type Split
- type Stat
- type Status
- type Symbol
- type SystemEvent
- type TOPS
- type Tag
- type TodayEarning
- type Trade
- type TradeHolidayDate
- type TradedSymbol
- type TradingStatus
- type USExchange
- type Usage
- type Volume
- 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 ¶
func WithBaseURL ¶
WithBaseURL sets the baseURL for a new IEX Client
func WithHTTPClient ¶
WithHTTPClient sets the http.Client for a new IEX Client
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 float64 `json:"week52highDate"` Week52LowDate float64 `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"` 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 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"` 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 (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 ¶
func (c Client) AnalystRecommendations(ctx context.Context, symbol string) ([]Recommendation, error)
AnalystRecommendations pulls data from the last four months.
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 from the IEX Cloud endpoint for the given stock symbol.
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 ¶
AvailableDataPoints returns a list of the available data points for a given symbol and the weight of each data point.
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) Company ¶
Company returns the copmany data from the IEX Cloud endpoint for the given stock symbol.
func (Client) CryptoSymbols ¶
func (c Client) CryptoSymbols(ctx context.Context) ([]CryptoSymbol, error)
CryptoSymbols returns a list of cryptocurrencies that are supported by IEX Cloud.
func (Client) DEEPTrades ¶
DEEPTrades provides DEEP trades data for multiple symbols.
func (Client) DataPoint ¶
DataPoint returns the plain text value for the requested data point key for 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 ¶
ExchangeRate returns an end of day exchange rate of a given currency pair.
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) 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 intrady, 15 minute delayed.
func (*Client) GetFloat64 ¶
GetFloat64 gets the number from the given endpoint.
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) IEXPercent ¶
IEXPercent returns a list of quotes for the top 10 IEX stocks by percent from the IEX Cloud endpoint updated intrady, 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 intrady, 15 minute delayed.
func (Client) InFocus ¶
InFocus returns a list of quotes for the top 10 in focus stocks from the IEX Cloud endpoint updated intrady, 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) IntradayStats ¶
IntradayStats retrieves the intraday stats on IEX.
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 intrady, 15 minute delayed.
func (Client) MarketNews ¶
MarketNews retrieves the given number of news articles for the market.
func (Client) MostActive ¶
MostActive returns a list of quotes for the top 10 most active stocks from the IEX Cloud endpoint updated intrady, 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) Peers ¶
Peers returns a slice of peer stock symbols from the IEX Cloud endpoint for the given stock symbol.
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) Price ¶
Price returns the current stock price from the IEX Cloud endpoint for the given stock symbol.
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.
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) 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) 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) 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) 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) USExchanges ¶
func (c Client) USExchanges(ctx context.Context) ([]USExchange, error)
USExchanges returns an array of U.S. Exchanges.
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 CryptoQuote ¶
type CryptoQuote struct { Symbol string `json:"symbol"` CompanyName string `json:"companyName"` PrimaryExchange string `json:"primaryExchange"` Sector string `json:"sector"` CalculationPrice string `json:"calculationPrice"` Open float64 `json:"open"` OpenTime EpochTime `json:"openTime"` Close float64 `json:"close"` CloseTime EpochTime `json:"closeTime"` High float64 `json:"high"` Low float64 `json:"low"` LatestPrice float64 `json:"latestPrice"` LatestSource string `json:"latestSource"` LatestTime string `json:"latestTime"` LatestUpdate EpochTime `json:"latestUpdate"` LatestVolume float64 `json:"latestVolume"` IEXRealtimePrice float64 `json:"iexRealtimePrice"` IEXRealtimeSize int `json:"iexRealtimeSize"` IEXLastUpdated EpochTime `json:"iexLastUpdated"` DelayedPrice float64 `json:"delayedPrice"` DelayedPriceTime EpochTime `json:"delayedPriceTime"` ExtendedPrice float64 `json:"extendedPrice"` ExtendedChange float64 `json:"extendedChange"` ExtendedChangePercent float64 `json:"extendedChangePercent"` ExtendedPriceTime EpochTime `json:"extendedPriceTime"` PreviousClose float64 `json:"previousClose"` Change float64 `json:"change"` ChangePercent float64 `json:"changePercent"` IEXMarketPercent float64 `json:"iexMarketPercent"` IEXVolume int `json:"iexVolume"` AvgTotalVolume int `json:"avgTotalVolume"` IEXBidPrice float64 `json:"iexBidPrice"` IEXBidSize int `json:"iexBidSize"` IEXAskPrice float64 `json:"iexAskPrice"` IEXAskSize int `json:"iexAskSize"` MarketCap int `json:"marketCap"` PERatio float64 `json:"peRatio"` Week52High float64 `json:"week52High"` Week52Low float64 `json:"week52Low"` YTDChange float64 `json:"ytdChange"` BidPrice float64 `json:"bidPrice"` BidSize float64 `json:"bidSize"` AskPrice float64 `json:"askPrice"` AskSize float64 `json:"askSize"` }
CryptoQuote models a quote for a cryptocurrency.
type CryptoSymbol ¶
type CryptoSymbol struct { Symbol string `json:"symbol"` Name string `json:"name"` Date Date `json:"date"` IsEnabled bool `json:"isEnabled"` Type string `json:"type"` IEXID string `json:"iexId"` }
CryptoSymbol models cryptocurrency symbol that IEX Cloud supports for API calls.
type CurrencyPair ¶
CurrencyPair models an available currency pair listing both the from currency and the to currency codes.
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 ¶
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,string"` 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 { ActualEPS float64 `json:"actualEPS"` ConsensusEPS float64 `json:"consensusEPS"` AnnounceTime AnnounceTime `json:"announcetime"` NumberOfEstimates int `json:"numberOfEstimates"` EPSSurpriseDollar float64 `json:"EPSSurpriseDollar"` EPSReportDate Date `json:"EPSReportDate"` FiscalPeriod string `json:"fiscalPeriod"` FiscalEndDate Date `json:"fiscalEndDate"` YearAgo float64 `json:"yearAgo"` YearAgoChangePercent float64 `json:"yearAgoChangePercent"` }
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 { ConsensusEPS float64 `json:"consensusEPS"` NumberOfEstimates int `json:"numberOfEstimates"` FiscalPeriod string `json:"fiscalPeriod"` FiscalEndDate Date `json:"fiscalEndDate"` ReportDate Date `json:"reportDate"` }
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"` 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 Financials ¶
Financials models income statement, balance sheet, and cash flow data from the most recent reported quarter.
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 { Date string `json:"date"` Open float64 `json:"open"` Close float64 `json:"close"` High float64 `json:"high"` Low float64 `json:"low"` Volume int `json:"volume"` 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"` ChangeOverTime float64 `json:"changeOverTime"` }
HistoricalDataPoint Represents a single historical data point for a stock
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"` }
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 ( // OneMonthHistorical One month (default) historically adjusted market-wide data OneMonthHistorical HistoricalTimeFrame = "1m" // 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 IncomeStatement ¶
type IncomeStatement struct { ReportDate Date `json:"reportDate"` 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 int `json:"position"` ReportDate Date `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"` }
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 string `json:"date"` Minute string `json:"minute"` Label string `json:"label"` High float64 `json:"high"` Low float64 `json:"low"` Average float64 `json:"average"` Volume int `json:"volume"` Notional float64 `json:"notional"` NumberOfTrades int `json:"numberOfTrades"` MarketHigh float64 `json:"marketHigh"` MarketLow float64 `json:"marketLow"` MarketAverage float64 `json:"marketAverage"` MarketVolume int `json:"marketVolume"` MarketNotional float64 `json:"marketNotional"` MarketNumberOfTrades int `json:"marketNumberOfTrades"` Open float64 `json:"open"` Close float64 `json:"close"` MarketOpen float64 `json:"marketOpen"` MarketClose float64 `json:"marketClose"` ChangeOverTime float64 `json:"changeOverTime"` MarketChangeOverTime float64 `json:"marketChangeOverTime"` }
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"` ExactDate string `url:"exactDate,omitempty"` }
IntradayHistoricalOptions optional query params to pass to intraday historical endpoint If values are false or 0 they aren't passed.
type IntradayStats ¶
type IntradayStats struct { Volume Stat `json:"volume"` SymbolsTraded Stat `json:"symbolsTraded"` RoutedVolume Stat `json:"routedVolume"` Notional Stat `json:"notional"` }
IntradayStats models the intraday stats on IEX.
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"` }
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"` }
PriceTarget models the latest average, high, and low analyst price target for a symbol.
type Quote ¶
type Quote struct { Symbol string `json:"symbol"` CompanyName string `json:"companyName"` CalculationPrice string `json:"calculationPrice"` Open float64 `json:"open"` OpenTime EpochTime `json:"openTime"` Close float64 `json:"close"` CloseTime EpochTime `json:"closeTime"` High float64 `json:"high"` Low float64 `json:"low"` LatestPrice float64 `json:"latestPrice"` LatestSource string `json:"latestSource"` LatestTime string `json:"latestTime"` LatestUpdate EpochTime `json:"latestUpdate"` LatestVolume int `json:"latestVolume"` IEXRealtimePrice float64 `json:"iexRealtimePrice"` IEXRealtimeSize int `json:"iexRealtimeSize"` IEXLastUpdated EpochTime `json:"iexLastUpdated"` DelayedPrice float64 `json:"delayedPrice"` DelayedPriceTime EpochTime `json:"delayedPriceTime"` ExtendedPrice float64 `json:"extendedPrice"` ExtendedChange float64 `json:"extendedChange"` ExtendedChangePercent float64 `json:"extendedChangePercent"` ExtendedPriceTime EpochTime `json:"extendedPriceTime"` PreviousClose float64 `json:"previousClose"` Change float64 `json:"change"` ChangePercent float64 `json:"changePercent"` IEXMarketPercent float64 `json:"iexMarketPercent"` IEXVolume int `json:"iexVolume"` AvgTotalVolume int `json:"avgTotalVolume"` IEXBidPrice float64 `json:"iexBidPrice"` IEXBidSize int `json:"iexBidSize"` IEXAskPrice float64 `json:"iexAskPrice"` IEXAskSize int `json:"iexAskSize"` MarketCap int `json:"marketCap"` Week52High float64 `json:"week52High"` Week52Low float64 `json:"week52Low"` YTDChange float64 `json:"ytdChange"` PERatio float64 `json:"peRatio"` }
Quote models the data returned from the IEX Cloud /quote endpoint.
type Recommendation ¶
type Recommendation struct { ConsensusEndDate EpochTime `json:"consensusEndDate"` ConsensusStartDate EpochTime `json:"consensusStartDate"` CorporateActionsAppliedDate EpochTime `json:"corporateActionsAppliedDate"` 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"` }
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 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 { 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 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 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 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 Volume ¶
type Volume 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"` }
Volume models the 15 minute delayed and 30 day average consolidated volume percentage of a stock by market.