Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dividend ¶
type Dividend struct { Symbol string `json:"symbol,omitempty" gorm:"primaryKey;type:character varying"` Amount float64 `json:"amount,omitempty" gorm:"type:double precision"` Currency string `json:"currency,omitempty" gorm:"type:character varying"` DeclaredDate time.Time `json:"declaredDate,omitempty" gorm:"type:date"` Description string `json:"description,omitempty" gorm:"type:character varying"` ExDate time.Time `json:"exDate,omitempty" gorm:"primaryKey;type:date"` Flag string `json:"flag,omitempty" gorm:"type:character varying"` Frequency string `json:"frequency,omitempty" gorm:"type:character varying"` PaymentDate time.Time `json:"paymentDate,omitempty" gorm:"type:date"` RecordDate time.Time `json:"recordDate,omitempty" gorm:"type:date"` RefID float64 `json:"refid,omitempty" gorm:"-"` ID string `json:"id,omitempty" gorm:"-"` Source string `json:"source,omitempty" gorm:"-"` Key string `json:"key,omitempty" gorm:"-"` Subkey string `json:"subkey,omitempty" gorm:"-"` Date time.Time `json:"date,omitempty" gorm:"type:date"` Updated time.Time `json:"updated,omitempty"` }
Dividend represents a data point from the basic dividends endpoint. Note the refid field exists in the sample data but not in the schema docs. https://iexcloud.io/docs/api/#dividends-basic
func GoldenDividends ¶
func GoldenDividends() (d []Dividend)
GoldenDividends returns golden data for the Dividend type
func (*Dividend) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface. It undoes what UnmarshalJSON does.
func (*Dividend) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface. This function correctly translates the date fields, which are specified as "YYYY-MM-DD", into time.Times by using time.Parse(). It will return an error if the JSON cannot be unmarshaled, but NOT if the date parsing fails.
type Earning ¶
type Earning struct { Symbol string `json:"symbol,omitempty" gorm:"primaryKey;type:character varying"` EPSReportDate time.Time `json:"EPSReportDate,omitempty" gorm:"primaryKey;type:date"` EPSSurpriseDollar float64 `json:"EPSSurpriseDollar,omitempty" gorm:"type:double precision"` EPSSurpriseDollarPercent float64 `json:"EPSSurpriseDollarPercent,omitempty" gorm:"type:double precision"` ActualEPS *float64 `json:"actualEPS,omitempty" gorm:"type:double precision"` AnnounceTime string `json:"announceTime,omitempty" gorm:"type:character varying"` // TODO: BTO, DMT, AMC ConsensusEPS *float64 `json:"consensusEPS,omitempty" gorm:"type:double precision"` Currency string `json:"currency,omitempty" gorm:"type:character varying"` FiscalEndDate time.Time `json:"fiscalEndDate,omitempty" gorm:"type:date"` FiscalPeriod string `json:"fiscalPeriod,omitempty" gorm:"type:character varying"` NumberOfEstimates int `json:"numberOfEstimates,omitempty"` PeriodType string `json:"periodType,omitempty" gorm:"type:character varying"` YearAgo *float64 `json:"yearAgo,omitempty" gorm:"type:double precision"` YearAgoChangePercent float64 `json:"yearAgoChangePercent,omitempty" gorm:"type:double precision"` ID string `json:"id,omitempty" gorm:"-"` Source string `json:"source,omitempty" gorm:"-"` Key string `json:"key,omitempty" gorm:"-"` Subkey string `json:"subkey,omitempty" gorm:"-"` Date time.Time `json:"date,omitempty" gorm:"type:date"` Updated time.Time `json:"updated,omitempty"` }
Earning represents a data point from the Earnings endpoint. https://iexcloud.io/docs/api/#earnings
func GoldenEarnings ¶
func GoldenEarnings() (e []Earning)
GoldenEarnings returns golden data for the Earning type
func (*Earning) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface. It undoes what UnmarshalJSON does.
func (*Earning) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface. This function correctly translates the date fields, which are specified as "YYYY-MM-DD", into time.Times by using time.Parse(). It will return an error if the JSON cannot be unmarshaled, but NOT if the date parsing fails.
type Historical ¶
type Historical struct { Close float64 `json:"close,omitempty" gorm:"type:double precision"` High float64 `json:"high,omitempty" gorm:"type:double precision"` Low float64 `json:"low,omitempty" gorm:"type:double precision"` Open float64 `json:"open,omitempty" gorm:"type:double precision"` Symbol string `json:"symbol,omitempty" gorm:"primaryKey;type:character varying"` Volume *float64 `json:"volume,omitempty" gorm:"type:double precision"` ID string `json:"id,omitempty" gorm:"-"` Source string `json:"source,omitempty" gorm:"-"` Key string `json:"key,omitempty" gorm:"-"` Subkey string `json:"subkey,omitempty" gorm:"-"` Date time.Time `json:"-" gorm:"primaryKey"` Updated time.Time `json:"-"` ChangeOverTime *float64 `json:"changeOverTime,omitempty" gorm:"type:double precision"` MarketChangeOverTime *float64 `json:"marketChangeOverTime,omitempty" gorm:"type:double precision"` UOpen float64 `json:"uOpen,omitempty" gorm:"type:double precision"` UHigh float64 `json:"uHigh,omitempty" gorm:"type:double precision"` ULow float64 `json:"uLow,omitempty" gorm:"type:double precision"` UClose float64 `json:"uClose,omitempty" gorm:"type:double precision"` UVolume *float64 `json:"uVolume,omitempty" gorm:"type:double precision"` FOpen float64 `json:"fOpen,omitempty" gorm:"type:double precision"` FHigh float64 `json:"fHigh,omitempty" gorm:"type:double precision"` FLow float64 `json:"fLow,omitempty" gorm:"type:double precision"` FClose float64 `json:"fClose,omitempty" gorm:"type:double precision"` FVolume *float64 `json:"fVolume,omitempty" gorm:"type:double precision"` Label string `json:"label,omitempty" gorm:"type:character varying"` Change *float64 `json:"change,omitempty" gorm:"type:double precision"` ChangePercent *float64 `json:"changePercent,omitempty" gorm:"type:double precision"` }
Historical represents a data point from the Historical Prices endpoint. https://iexcloud.io/docs/api/#historical-prices
func GoldenHistorical ¶
func GoldenHistorical() (h []Historical)
GoldenHistorical retsurns golden data for the Historical type
func (*Historical) MarshalJSON ¶
func (h *Historical) MarshalJSON() ([]byte, error)
MarshalJSON satisfies the json.Marshaler interface. It undoes what UnmarshalJSON does.
func (*Historical) UnmarshalJSON ¶
func (h *Historical) UnmarshalJSON(data []byte) (err error)
UnmarshalJSON satisfies the json.Unmarshaler interface. This function correctly translates the date field, which is specified as "YYYY-MM-DD", into a time.Time by using time.Parse(). It will return an error if the JSON cannot be unmarshaled, but NOT if the date parsing fails.
func (*Historical) Validate ¶
func (h *Historical) Validate() error
Validate satisfies the Validator interface. It will return an error if the Date, Close or UClose fields are equal to their zero value.
type Intraday ¶
type Intraday struct { Symbol string `json:"symbol,omitempty" gorm:"primaryKey;type:character varying"` Date time.Time `json:"date,omitempty" gorm:"primaryKey"` Minute string `json:"minute,omitempty" gorm:"type:character varying"` Label string `json:"label,omitempty" gorm:"type:character varying"` MarketOpen float64 `json:"marketOpen,omitempty" gorm:"type:double precision"` MarketHigh float64 `json:"marketHigh,omitempty" gorm:"type:double precision"` MarketLow float64 `json:"marketLow,omitempty" gorm:"type:double precision"` MarketClose float64 `json:"marketClose,omitempty" gorm:"type:double precision"` MarketVolume int `json:"marketVolume,omitempty"` MarketAverage float64 `json:"marketAverage,omitempty" gorm:"type:double precision"` MarketNotional float64 `json:"marketNotional,omitempty" gorm:"type:double precision"` MarketNumberOfTrades int `json:"marketNumberOfTrades,omitempty"` MarketChangeOverTime float64 `json:"marketChangeOverTime,omitempty" gorm:"type:double precision"` Open float64 `json:"open,omitempty" gorm:"type:double precision"` High float64 `json:"high,omitempty" gorm:"type:double precision"` Low float64 `json:"low,omitempty" gorm:"type:double precision"` Close float64 `json:"close,omitempty" gorm:"type:double precision"` Volume int `json:"volume,omitempty"` Average float64 `json:"average,omitempty" gorm:"type:double precision"` Notional float64 `json:"notional,omitempty" gorm:"type:double precision"` NumberOfTrades int `json:"numberOfTrades,omitempty"` ChangeOverTime float64 `json:"changeOverTime,omitempty" gorm:"type:double precision"` }
Intraday represents a data point from the Intraday Prices endpoint. https://iexcloud.io/docs/api/#intraday-prices
func GoldenIntraday ¶
func GoldenIntraday() (i []Intraday)
GoldenIntraday returns golden data for the Intraday type
func (*Intraday) MarshalJSON ¶ added in v0.1.3
MarshalJSON satisfies the json.Marshaler interface. It undoes what UnmarshalJSON does.
func (*Intraday) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface. This function correctly translates the date field, which is specified as "YYYY-MM-DD", and the Minute field, which is `/\d{2}:\d{2}/` into a time.Time by using time.Parse(). It will return an error if the JSON cannot be unmarshaled or if the date parsing fails.
type Split ¶
type Split struct { DeclaredDate time.Time `json:"declaredDate,omitempty" gorm:"type:date"` Ratio float64 `json:"ratio,omitempty" gorm:"type:double precision"` ToFactor float64 `json:"toFactor,omitempty" gorm:"type:double precision"` FromFactor float64 `json:"fromFactor,omitempty" gorm:"type:double precision"` Description string `json:"description,omitempty" gorm:"type:character varying"` Symbol string `json:"symbol,omitempty" gorm:"primaryKey;type:character varying"` ExDate time.Time `json:"exDate,omitempty" gorm:"primaryKey;type:date"` ID string `json:"id,omitempty" gorm:"-"` Source string `json:"source,omitempty" gorm:"-"` Key string `json:"key,omitempty" gorm:"-"` Subkey string `json:"subkey,omitempty" gorm:"-"` Date time.Time `json:"date,omitempty" gorm:"type:date"` Updated time.Time `json:"updated,omitempty"` }
Split represents a data point from the basic splits endpoint. https://iexcloud.io/docs/api/#splits-basic
func GoldenSplit ¶
func GoldenSplit() (s []Split)
GoldenSplit returns golden data for the Split type
func (*Split) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface. It undoes what UnmarshalJSON does.
func (*Split) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface. This function correctly translates the date fields, which are specified as "YYYY-MM-DD", into time.Times by using time.Parse(). It will return an error if the JSON cannot be unmarshaled, but NOT if the date parsing fails.