Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func SetEnvironment ¶ added in v0.1.9
func SetEnvironment(environment Environment)
SetEnvironment sets the desired environment within the IEXCloud API.
func SetToken ¶ added in v0.1.9
func SetToken(token string)
SetToken sets your API token for authentication with the IEXCloud API.
func Stream ¶ added in v0.1.1
func Stream(parameters *Parameters) chan *Message
Stream https://iexcloud.io/docs/api/#sse-streaming Requires the following parameters: endpoint, channels, symbols
Types ¶
type Data ¶ added in v0.1.3
type Data map[string]interface{}
Data https://iexcloud.io/docs/api/#sse-streaming
func (Data) ContainsKey ¶ added in v0.1.3
ContainsKey null
type Environment ¶ added in v0.1.1
type Environment int
Environment the IEXCloud API environment.
const ( Sandbox Environment = iota Production )
type Message ¶ added in v0.1.3
type Parameters ¶
type Parameters struct {
Ticker string `json:"ticker,omitempty" url:",omitempty"`
Symbols []string `json:"symbols,omitempty" url:",omitempty"`
Channels []string `json:"channels,omitempty" url:",omitempty"`
Endpoint string `json:"-" url:"-"`
ChartIEXOnly bool `json:"chartIEXOnly,omitempty" url:",omitempty"`
ChartReset bool `json:"chartReset,omitempty" url:",omitempty"`
ChartSimplify bool `json:"chartSimplify,omitempty" url:",omitempty"`
ChartInterval int64 `json:"chartInterval,omitempty" url:",omitempty"`
ChangeFromClose bool `json:"changeFromClose,omitempty" url:",omitempty"`
ChartLast int64 `json:"chartLast,omitempty" url:",omitempty"`
ExactDate string `json:"exactDate,omitempty" url:",omitempty"`
ChartIEXWhenNull bool `json:"chartIEXWhenNull,omitempty" url:",omitempty"`
}
Parameters possible for an IEXCloud API request.
type ResponseIntradayPrices ¶ added in v0.1.9
type ResponseIntradayPrices []struct {
Date string `json:"date"`
Minute string `json:"minute"`
Label string `json:"label"`
MarketOpen float64 `json:"marketOpen"`
MarketClose float64 `json:"marketClose"`
MarketHigh float64 `json:"marketHigh"`
MarketLow float64 `json:"marketLow"`
MarketAverage float64 `json:"marketAverage"`
MarketVolume int `json:"marketVolume"`
MarketNotional float64 `json:"marketNotional"`
MarketNumberOfTrades int `json:"marketNumberOfTrades"`
MarketChangeOverTime float64 `json:"marketChangeOverTime"`
High float64 `json:"high"`
Low float64 `json:"low"`
Open float64 `json:"open"`
Close float64 `json:"close"`
Average float64 `json:"average"`
Volume int `json:"volume"`
Notional float64 `json:"notional"`
NumberOfTrades int `json:"numberOfTrades"`
ChangeOverTime float64 `json:"changeOverTime"`
}
ResponseIntradayPrices https://iexcloud.io/docs/api/#intraday-prices
type ResponseLast ¶ added in v0.1.7
type ResponseLast []struct {
Symbol string `json:"symbol"`
Price float64 `json:"price"`
Size int `json:"size"`
Time int64 `json:"time"`
}
ResponseLast https://iexcloud.io/docs/api/#last
func IntradayPrices ¶ added in v0.1.9
func IntradayPrices(parameters *Parameters) (response ResponseLast, _ error)
IntradayPrices https://iexcloud.io/docs/api/#intraday-prices
func Last ¶ added in v0.1.7
func Last(parameters *Parameters) (response ResponseLast, _ error)
func Price ¶ added in v0.1.9
func Price(parameters *Parameters) (response ResponseLast, _ error)
type ResponsePrice ¶ added in v0.1.9
type ResponsePrice float64
ResponsePrice https://iexcloud.io/docs/api/#price-only
type ResponseQuote ¶ added in v0.1.7
type ResponseQuote struct {
Symbol string `json:"symbol"`
CompanyName string `json:"companyName"`
CalculationPrice string `json:"calculationPrice"`
Open float64 `json:"open"`
OpenTime int64 `json:"openTime"`
Close float64 `json:"close"`
CloseTime int64 `json:"closeTime"`
High float64 `json:"high"`
Low float64 `json:"low"`
LatestPrice float64 `json:"latestPrice"`
LatestSource string `json:"latestSource"`
LatestTime string `json:"latestTime"`
LatestUpdate int64 `json:"latestUpdate"`
LatestVolume int `json:"latestVolume"`
Volume int `json:"volume"`
IexRealtimePrice float64 `json:"iexRealtimePrice"`
IexRealtimeSize int `json:"iexRealtimeSize"`
IexLastUpdated int64 `json:"iexLastUpdated"`
DelayedPrice float64 `json:"delayedPrice"`
DelayedPriceTime int64 `json:"delayedPriceTime"`
OddLotDelayedPrice float64 `json:"oddLotDelayedPrice"`
OddLotDelayedPriceTime int64 `json:"oddLotDelayedPriceTime"`
ExtendedPrice float64 `json:"extendedPrice"`
ExtendedChange float64 `json:"extendedChange"`
ExtendedChangePercent float64 `json:"extendedChangePercent"`
ExtendedPriceTime int64 `json:"extendedPriceTime"`
PreviousClose float64 `json:"previousClose"`
PreviousVolume int `json:"previousVolume"`
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 int64 `json:"marketCap"`
Week52High float64 `json:"week52High"`
Week52Low float64 `json:"week52Low"`
YtdChange float64 `json:"ytdChange"`
PeRatio float64 `json:"peRatio"`
LastTradeTime int64 `json:"lastTradeTime"`
IsUSMarketOpen bool `json:"isUSMarketOpen"`
}
ResponseQuote https://iexcloud.io/docs/api/#quote
func Quote ¶ added in v0.1.7
func Quote(parameters *Parameters) (response ResponseQuote, _ error)