iexcloud: github.com/goinvest/iexcloud Index | Files

package iex

import "github.com/goinvest/iexcloud"

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

Package Files

account.go altdata.go client.go forex.go getjson.go helpers.go historical.go iexdata.go refdata.go status.go stocks.go

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,
    "":    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.

type AccountMetadata Uses

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 AnnounceTime Uses

type AnnounceTime int

AnnounceTime refers to the time of earnings announcement.

func (*AnnounceTime) MarshalJSON Uses

func (a *AnnounceTime) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaler interface for AnnounceTime.

func (*AnnounceTime) Set Uses

func (a *AnnounceTime) Set(s string) error

Set sets the issue type using a string.

func (AnnounceTime) String Uses

func (a AnnounceTime) String() string

String implements the Stringer interface for AnnounceTime.

func (*AnnounceTime) UnmarshalJSON Uses

func (a *AnnounceTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the Unmarshaler interface for AnnounceTime.

type BalanceSheet Uses

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"`
    PropertyPlanetEquipment 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"`
    ShareholderEquity       float64 `json:"shareholderEquity"`
    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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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"`
    Investment              float64 `json:"investments"`
    InvestingActivityOther  float64 `json:"investingActivityOther"`
    TotalInvestingCashFloes float64 `json:"totalInvestingCashFlows"`
    DividensPaid            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 Uses

type CashFlows struct {
    Symbol     string     `json:"symbol"`
    Statements []CashFlow `json:"cashflow"`
}

CashFlows pulls cash flow data. Available quarterly (4 quarters) or annually (4 years).

type Client Uses

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

Client models a client to consume the IEX Cloud API.

func NewClient Uses

func NewClient(token string, baseURL string) *Client

NewClient creates a client with the given authorization toke.

func (Client) AccountMetadata Uses

func (c Client) AccountMetadata() (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) AnnualBalanceSheets Uses

func (c Client) AnnualBalanceSheets(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 Uses

func (c Client) AnnualCashFlows(symbol string, num int) (CashFlows, error)

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 Uses

func (c Client) AnnualFinancials(symbol string, num int) (Financials, error)

AnnualFinancials returns the specified number of most recent annual financials from the IEX Cloud endpoint for the given stock symbol.

func (Client) AnnualIncomeStatements Uses

func (c Client) AnnualIncomeStatements(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) Book Uses

func (c Client) Book(symbol string) (Book, error)

Book returns the quote, bids, asks, and trades for a given stock symbol.

func (Client) CEOCompensation Uses

func (c Client) CEOCompensation(symbol string) (CEOCompensation, error)

CEOCompensation provides CEO compensation for the given stock symbol.

func (Client) Company Uses

func (c Client) Company(symbol string) (Company, error)

Company returns the copmany data from the IEX Cloud endpoint for the given stock symbol.

func (Client) Crypto Uses

func (c Client) Crypto(symbol string) (CryptoQuote, error)

Crypto provides a quote for a given cryptocurrency symbol.

func (Client) CryptoSymbols Uses

func (c Client) CryptoSymbols() ([]CryptoSymbol, error)

CryptoSymbols returns a list of cryptocurrencies that are supported by IEX Cloud.

func (Client) DelayedQuote Uses

func (c Client) DelayedQuote(symbol string) (DelayedQuote, error)

DelayedQuote returns the 15 minute delayed market quote from the IEX Cloud endpoint for the given stock symbol.

func (Client) Dividends Uses

func (c Client) Dividends(symbol string, r PathRange) ([]Dividend, error)

Dividends returns the dividends from the IEX Cloud endpoint for the given stock symbol and the given date range.

func (Client) Earnings Uses

func (c Client) Earnings(symbol string, num int) (Earnings, error)

Earnings returns the specified number of most recent earnings data from the IEX Cloud endpoint for the given stock symbol.

func (Client) EarningsToday Uses

func (c Client) EarningsToday() (EarningsToday, error)

EarningsToday returns the earnings that will be reported today before the open and after the market closes.

func (Client) EffectiveSpreads Uses

func (c Client) EffectiveSpreads(symbol string) ([]EffectiveSpread, error)

EffectiveSpreads returns the effective spreads from the IEX Cloud endpoint for the given stock symbol.

func (Client) Estimates Uses

func (c Client) Estimates(symbol string, num int) (Estimates, error)

Estimates returns the latest consensue estimates for the next fiscal period.

func (Client) ExchangeRate Uses

func (c Client) ExchangeRate(from, to string) (ExchangeRate, error)

ExchangeRate returns an end of day exchange rate of a given currency pair.

func (Client) FXSymbols Uses

func (c Client) FXSymbols() (FXSymbols, error)

FXSymbols returns a list of currencies and a list of foreign exchange currency pairs that are available supported by IEX Cloud.

func (Client) FundOwnership Uses

func (c Client) FundOwnership(symbol string) ([]FundOwner, error)

FundOwnership returns the ten top holders of the given stock.

func (Client) Gainers Uses

func (c Client) Gainers() ([]Quote, error)

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 Uses

func (c *Client) GetFloat64(endpoint string) (float64, error)

GetFloat64 gets the number from the given endpoint.

func (*Client) GetJSON Uses

func (c *Client) GetJSON(endpoint string, v interface{}) error

GetJSON gets the JSON data from the given endpoint.

func (*Client) GetJSONWithoutToken Uses

func (c *Client) GetJSONWithoutToken(endpoint string, v interface{}) error

GetJSONWithoutToken gets the JSON data from the given endpoint without adding a token to the URL.

func (Client) HistoricalPrices Uses

func (c Client) HistoricalPrices(symbol string, timeframe HistoricalTimeFrame, options *HistoricalOptions) ([]HistoricalDataPoint, error)

HistoricalPrices retrieves historically adjusted market-wide data

func (Client) HistoricalPricesByDay Uses

func (c Client) HistoricalPricesByDay(symbol string, day time.Time, options *HistoricalOptions) ([]HistoricalDataPoint, error)

HistoricalPricesByDay retrieves historically adjusted market-wide data for a given day

func (Client) IEXPercent Uses

func (c Client) IEXPercent() ([]Quote, error)

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 Uses

func (c Client) IEXSymbols() ([]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 Uses

func (c Client) IEXVolume() ([]Quote, error)

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 Uses

func (c Client) InFocus() ([]Quote, error)

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 Uses

func (c Client) InsiderRoster(symbol string) ([]InsiderRoster, error)

InsiderRoster returns the top 10 insiders with the most recent information for the given stock symbol.

func (Client) InsiderSummary Uses

func (c Client) InsiderSummary(symbol string) ([]InsiderSummary, error)

InsiderSummary returns the insiders summary with the most recent information for the given stock symbol.

func (Client) InsiderTransactions Uses

func (c Client) InsiderTransactions(symbol string) ([]InsiderTransaction, error)

InsiderTransactions returns a list of insider transactions for the given stock symbol.

func (Client) InstitutionalOwnership Uses

func (c Client) InstitutionalOwnership(symbol string) ([]InstitutionalOwner, error)

InstitutionalOwnership returns the top 10 holders with the most recent information.

func (Client) IntradayHistoricalPrices Uses

func (c Client) IntradayHistoricalPrices(symbol string, options *IntradayHistoricalOptions) ([]IntradayHistoricalDataPoint, error)

IntradayHistoricalPrices retrieves intraday historical market-wide data

func (Client) IntradayHistoricalPricesByDay Uses

func (c Client) IntradayHistoricalPricesByDay(symbol string, day time.Time, options *IntradayHistoricalOptions) ([]IntradayHistoricalDataPoint, error)

IntradayHistoricalPricesByDay retrieves intraday historical market-wide data for a given day

func (Client) IntradayStats Uses

func (c Client) IntradayStats(symbol string) (IntradayStats, error)

IntradayStats retrieves the intraday stats on IEX.

func (Client) KeyStats Uses

func (c Client) KeyStats(symbol string) (KeyStats, error)

KeyStats returns the key stats from the IEX Cloud endpoint for the given stock symbol.

func (Client) LargestTrades Uses

func (c Client) LargestTrades(symbol string) ([]LargestTrade, error)

LargestTrades returns the 15 minute delayed, last sale eligible trade from the IEX Cloud endpoint for the given stock symbol.

func (Client) Last Uses

func (c Client) Last(symbols []string) ([]Last, error)

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 (c Client) Logo(symbol string) (Logo, error)

Logo returns the logo data from the IEX Cloud endpoint for the given stock symbol.

func (Client) Losers Uses

func (c Client) Losers() ([]Quote, error)

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 Uses

func (c Client) MarketNews(num int) ([]News, error)

MarketNews retrieves the given number of news articles for the market.

func (Client) Markets Uses

func (c Client) Markets() ([]Market, error)

Markets returns real time traded volume on U.S. markets.

func (Client) MostActive Uses

func (c Client) MostActive() ([]Quote, error)

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 Uses

func (c Client) MutualFundSymbols() ([]Symbol, error)

MutualFundSymbols returns an array of mutual funds that IEX Cloud supports for API calls.

func (Client) News Uses

func (c Client) News(symbol string, num int) ([]News, error)

News retrieves the given number of news articles for the given stock symbol.

func (Client) NextHoliday Uses

func (c Client) NextHoliday() (TradeHolidayDate, error)

NextHoliday returns the date of the next holiday.

func (Client) NextHolidays Uses

func (c Client) NextHolidays(numDays int) (TradeHolidayDate, error)

NextHolidays returns the dates of the next holidays for the given number of days.

func (Client) NextTradingDay Uses

func (c Client) NextTradingDay() (TradeHolidayDate, error)

NextTradingDay returns the date of the next trading day.

func (Client) NextTradingDays Uses

func (c Client) NextTradingDays(numDays int) (TradeHolidayDate, error)

NextTradingDays returns the dates of the next trading days for the given number of days.

func (Client) OHLC Uses

func (c Client) OHLC(symbol string) (OHLC, error)

OHLC returns the OHLC data from the IEX Cloud endpoint for the given stock symbol.

func (Client) OTCSymbols Uses

func (c Client) OTCSymbols() ([]Symbol, error)

OTCSymbols returns an array of Over-the-Counter (OTC) stocks that IEX Cloud supports for API calls.

func (Client) OneLast Uses

func (c Client) OneLast(symbol string) ([]Last, error)

OneLast provides the last trade data executions for one stock symbol.

func (Client) OneTOPS Uses

func (c Client) OneTOPS(symbol string) ([]TOPS, error)

OneTOPS returns TOPS for one stock symbol.

func (Client) Peers Uses

func (c Client) Peers(symbol string) ([]string, error)

Peers returns a slice of peer stock symbols from the IEX Cloud endpoint for the given stock symbol.

func (Client) PreviousDay Uses

func (c Client) PreviousDay(symbol string) (PreviousDay, error)

PreviousDay returns the previous day adjusted price data from the IEX Cloud endpoint for the given stock symbol.

func (Client) PreviousHoliday Uses

func (c Client) PreviousHoliday() (TradeHolidayDate, error)

PreviousHoliday returns the date of the previous holiday.

func (Client) PreviousTradingDay Uses

func (c Client) PreviousTradingDay() (TradeHolidayDate, error)

PreviousTradingDay returns the date of the previous trading day.

func (Client) Price Uses

func (c Client) Price(symbol string) (float64, error)

Price returns the current stock price from the IEX Cloud endpoint for the given stock symbol.

func (Client) PriceTarget Uses

func (c Client) PriceTarget(symbol string) (PriceTarget, error)

PriceTarget returns the latest average, high, and low analyst price target for a given stock symbol.

func (Client) QuarterlyBalanceSheets Uses

func (c Client) QuarterlyBalanceSheets(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 Uses

func (c Client) QuarterlyCashFlows(symbol string, num int) (CashFlows, error)

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 Uses

func (c Client) QuarterlyFinancials(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 Uses

func (c Client) QuarterlyIncomeStatements(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 Uses

func (c Client) Quote(symbol string) (Quote, error)

Quote returns the quote data from the IEX Cloud endpoint for the given stock symbol.

func (Client) RecommendationTrends Uses

func (c Client) RecommendationTrends(symbol string) ([]Recommendation, error)

RecommendationTrends provides a list of recommendations with the start and end date for each rating.

func (Client) RelevantStocks Uses

func (c Client) RelevantStocks(symbol string) (RelevantStocks, error)

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 Uses

func (c Client) SectorPerformance() ([]Sector, error)

SectorPerformance returns the performance of each sector for the current trading day. Performance is based on each sector ETF.

func (Client) Status Uses

func (c Client) Status() (Status, error)

Status returns the IEX Cloud system status.

func (Client) Symbols Uses

func (c Client) Symbols() ([]Symbol, error)

Symbols returns an array of symbols that IEX Cloud supports for API calls.

func (Client) TOPS Uses

func (c Client) TOPS(symbols []string) ([]TOPS, error)

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 Uses

func (c Client) USExchanges() ([]USExchange, error)

USExchanges returns an array of U.S. Exchanges.

type Company Uses

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   IssueType `json:"issueType"`
    Sector      string    `json:"sector"`
    Employees   int       `json:"employees"`
    Tags        []string  `json:"tags"`
}

Company models the company data from the /company endpoint.

type CryptoQuote Uses

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          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"`
    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 Uses

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 Currency Uses

type Currency struct {
    Code string `json:"code"`
    Name string `json:"name"`
}

Currency models the code and name for a currency.

type CurrencyPair Uses

type CurrencyPair struct {
    From string `json:"fromCurrency"`
    To   string `json:"toCurrency"`
}

CurrencyPair models an available currency pair listing both the from currency and the to currency codes.

type Date Uses

type Date time.Time

Date models a report date

func (*Date) MarshalJSON Uses

func (d *Date) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaler interface for Date.

func (*Date) UnmarshalJSON Uses

func (d *Date) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the Unmarshaler interface for Date.

type DelayedQuote Uses

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 Uses

type Dividend struct {
    ExDate       Date    `json:"exDate"`
    PaymentDate  Date    `json:"paymentDate"`
    RecordDate   Date    `json:"recordDate"`
    DeclaredDate Date    `json:"declaredDate"`
    Amount       float64 `json:"amount"`
    Flag         string  `json:"flag"`
}

Dividend models one dividend.

type Earning Uses

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 Uses

type Earnings struct {
    Symbol   string    `json:"symbol"`
    Earnings []Earning `json:"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 Uses

type EarningsToday struct {
    BeforeOpen []TodayEarning `json:"bto"`
    AfterClose []TodayEarning `json:"amc"`
}

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 EffectiveSpread Uses

type EffectiveSpread struct {
    Volume           int     `json:"volume"`
    Venue            string  `json:"venue"`
    VenueName        string  `json:"venueName"`
    EffectiveSpread  float64 `json:"effectiveSpread"`
    EffectiveQuoted  float64 `json:"effectiveQuoted"`
    PriceImprovement float64 `json:"priceImprovement"`
}

EffectiveSpread models the effective spread, eligible volume, and price improvement of a stock by market.

type EpochTime Uses

type EpochTime time.Time

EpochTime refers to unix timestamps used for some fields in the API

func (EpochTime) MarshalJSON Uses

func (e EpochTime) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaler interface for EpochTime.

func (EpochTime) String Uses

func (e EpochTime) String() string

String implements the Stringer interface for EpochTime.

func (*EpochTime) UnmarshalJSON Uses

func (e *EpochTime) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the Unmarshaler interface for EpochTime.

type Estimate Uses

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 Estimates Uses

type Estimates struct {
    Symbol    string     `json:"symbol"`
    Estimates []Estimate `json:"estimates"`
}

Estimates models the latest consensus esimtate for the next fiscal period.

type ExchangeRate Uses

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 Uses

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 Uses

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"`
    TotalCash              float64 `json:"totalCash"`
    TotalDebt              float64 `json:"totalDebt"`
    ShareholderEquity      float64 `json:"shareholderEquity"`
    CashChange             float64 `json:"cashChange"`
    CashFlow               float64 `json:"cashFlow"`
    OperatingGainsLosses   string  `json:"operatingGainsLosses"`
}

Financial pulls income statement, balance sheet, and cash flow data from the most recent reported quarter.

type Financials Uses

type Financials struct {
    Symbol     string      `json:"symbol"`
    Financials []Financial `json:"financials"`
}

Financials models income statement, balance sheet, and cash flow data from the most recent reported quarter.

type FundOwner Uses

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 Uses

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 Uses

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 Uses

type HistoricalPrice struct {
    Date string `json:"date"`
}

HistoricalPrice models the data for a historical stock price.

type HistoricalTimeFrame Uses

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 Uses

func (htf HistoricalTimeFrame) Valid() bool

Valid Determines if HistoricalTimeFrame is a defined constant

type IncomeStatement Uses

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 Uses

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 Uses

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 Uses

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 Uses

type InsiderTransaction struct {
    EffectiveDate EpochTime `json:"effectiveDate"`
    Name          string    `json:"fullName"`
    ReportedTitle string    `json:"reportedTitle"`
    Price         float64   `json:"tranPrice"`
    Shares        int       `json:"tranShares"`
    Value         float64   `json:"tranValue"`
}

InsiderTransaction models a buy or sell transaction made by an insider of a company.

type InstitutionalOwner Uses

type InstitutionalOwner struct {
    EntityName          string    `json:"entityProperName"`
    AdjustedHolding     float64   `json:"adjHolding"`
    AdjustedMarketValue float64   `json:"adjMv"`
    ReportDate          EpochTime `json:"reportDate"`
    ReportedHolding     float64   `json:"reportedHolding"`
}

InstitutionalOwner models an institutional owner of a stock.

type IntradayHistoricalDataPoint Uses

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 Uses

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 IntradayStats Uses

type IntradayStats struct {
    Volume        Stat `json:"volume"`
    SymbolsTraded Stat `json:"symbolsTraded"`
    RoutedVolume  Stat `json:"routedVolume"`
    Notional      Stat `json:"notional"`
    MarketShare   Stat `json:"marketShare"`
}

IntradayStats models the intraday stats on IEX.

type IssueType Uses

type IssueType int

IssueType refers to the common issue type of the stock.

func (*IssueType) MarshalJSON Uses

func (i *IssueType) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaler interface for IssueType.

func (*IssueType) Set Uses

func (i *IssueType) Set(s string) error

Set sets the issue type using a string.

func (IssueType) String Uses

func (i IssueType) String() string

String implements the Stringer interface for IssueType.

func (*IssueType) UnmarshalJSON Uses

func (i *IssueType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the Unmarshaler interface for IssueType.

type KeyStats Uses

type KeyStats struct {
    Name                string  `json:"companyName"`
    MarketCap           int     `json:"marketCap"`
    Week52High          float64 `json:"week52High"`
    Week52Low           float64 `json:"week52Low"`
    Week52Change        float64 `json:"week52Change"`
    SharesOutstanding   int     `json:"sharesOutstanding"`
    Avg30Volume         int     `json:"avg30Volume"`
    Avg10Volume         int     `json:"avg10Volume"`
    Float               int     `json:"float"`
    Symbol              string  `json:"symbol"`
    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"`
    Day200MovingAvg     float64 `json:"day200MovingAvg"`
    Day50MovingAvg      float64 `json:"day50MovingAvg"`
    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 Uses

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 Uses

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 Logo struct {
    URL string `json:"url"`
}

Logo models the /logo endpoint.

type Market Uses

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 Uses

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 Uses

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 OpenClose Uses

type OpenClose struct {
    Price float64 `json:"price"`
    Time  int     `json:"Time"`
}

OpenClose provides the price and time for either the open or close price of a stock.

type PathRange Uses

type PathRange int

PathRange refers to the date range used in the path of an endpoint.

const (
    Mo1 PathRange = iota
    Mo3
    Mo6
    Yr1
    Yr2
    Yr5
    YTD
    Next
)

Enum values for PathRange.

func (*PathRange) MarshalJSON Uses

func (p *PathRange) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaler interface for PathRange.

func (*PathRange) Set Uses

func (p *PathRange) Set(s string) error

Set sets the issue type using a string.

func (PathRange) String Uses

func (p PathRange) String() string

String implements the Stringer interface for PathRange.

func (*PathRange) UnmarshalJSON Uses

func (p *PathRange) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the Unmarshaler interface for PathRange.

type PreviousDay Uses

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 Uses

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 Uses

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 Uses

type Recommendation struct {
    ConsensusEndDate   EpochTime `json:"consensusEndDate"`
    ConsensusStartDate EpochTime `json:"consensusStartDate"`
    BuyRatings         int       `json:"ratingBuy"`
    HoldRatings        int       `json:"ratingHold"`
    NoRatings          int       `json:"ratingNone"`
    OverweightRatings  int       `json:"ratingOverweight"`
    SellRatings        int       `json:"ratingSell"`
    UnderweightRatings int       `json:"ratingUnderweight"`
    ConsensusRating    float64   `json:"ratingScaleMark"`
}

Recommendation models the buy, hold, sell recommendations for a stock.

type Records Uses

type Records struct {
    Volume VolumeRecord `json:"volume"`
}

Records models the stats records.

type RelevantStocks Uses

type RelevantStocks struct {
    Peers   bool     `json:"peers"`
    Symbols []string `json:"symbols"`
}

RelevantStocks models a list of relevant stocks that may or may not be peers.

type Sector Uses

type Sector struct {
    Type        string    `json:"sector"`
    Name        string    `json:"name"`
    Performance float64   `json:"performance"`
    LastUpdated EpochTime `json:"lastUpdated"`
}

Sector models the performance based on each sector ETF.

type Split Uses

type Split struct {
    ExDate       Date    `json:"exDate"`
    DeclaredDate Date    `json:"declaredDate"`
    Ratio        float64 `json:"ratio"`
    FromFactor   float64 `json:"fromFactor"`
    Description  string  `json:"description"`
}

Split models the a stock split.

type Stat Uses

type Stat struct {
    Value       float64   `json:"value"`
    LastUpdated EpochTime `json:"lastUpdated"`
}

Stat models a single stat.

type Status Uses

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 Uses

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 Uses

type SystemEvent struct {
    Type      string    `json:"systemEvent"`
    Timestamp EpochTime `json:"timestamp"`
}

SystemEvent models a system event for a quote.

type TOPS Uses

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 TodayEarning Uses

type TodayEarning struct {
    Earning
    EstimatedChangePercent float64 `json:"estimatedChangePercent"`
    SymbolID               int     `json:"symbolId"`
    Symbol                 string  `json:"symbol"`
    Quote                  Quote   `json:"quote"`
    Headline               string  `json:"headline"`
}

TodayEarning models a single earning being reported today containing all keys from earnings, a quote object, and a headline.

type Trade Uses

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 Uses

type TradeHolidayDate struct {
    Date           Date `json:"date"`
    SettlementDate Date `json:"settlementDate"`
}

TradeHolidayDate models either a trade date or a holiday.

type TradedSymbol Uses

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 USExchange Uses

type USExchange struct {
    Name     string `json:"name"`
    MarketID int    `json:"mic"`
    TapeID   string `json:"tapeId"`
    OATSID   string `json:"oatsId"`
    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 Volume Uses

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.

type VolumeRecord Uses

type VolumeRecord struct {
    Value            float64 `json:"recordValue"`
    Date             Date    `json:"recordDate"`
    PreviousDayValue float64 `json:"previousDayValue"`
    Avg30Value       float64 `json:"avg30Value"`
}

VolumeRecord models the record volume.

Package iex imports 10 packages (graph). Updated 2019-03-13. Refresh now. Tools for package owners.