Documentation
¶
Index ¶
- Variables
- func IsAPIError(err error) bool
- type APIError
- type ActiveListing
- type BoolString
- type Client
- func (c *Client) GetLatestActiveListingStatus(ctx context.Context) (*[]ActiveListing, error)
- func (c *Client) GetNewsSentiment(ctx context.Context, options *NewsSentimentOptions) (*NewsSentimentResponse, error)
- func (c *Client) GetTimeSeriesStockData(ctx context.Context, options *CoreStockSharedInputOptions) (*CoreStockResponse, error)
- func (c *Client) GetTopGainersLosers(ctx context.Context) (*RankingResponse, error)
- type CoreStockData
- type CoreStockResponse
- type CoreStockSharedInputOptions
- type DataType
- type Function
- type GlobalQuote
- type Interval
- type MetaData
- type NewsFeed
- type NewsSentimentOptions
- type NewsSentimentResponse
- type OutputSize
- type RankedStock
- type RankingResponse
- type Sort
- type TickerSentiment
- type Topic
- type TopicRelevance
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InValidInputError = errors.New("invalid input provided")
)
Functions ¶
func IsAPIError ¶ added in v0.0.3
Types ¶
type ActiveListing ¶
type BoolString ¶ added in v0.0.4
type BoolString string
func (BoolString) Valid ¶ added in v0.0.4
func (b BoolString) Valid() bool
type Client ¶
type Client struct { BaseURL string HTTPClient *http.Client // contains filtered or unexported fields }
func (*Client) GetLatestActiveListingStatus ¶
func (c *Client) GetLatestActiveListingStatus(ctx context.Context) (*[]ActiveListing, error)
func (*Client) GetNewsSentiment ¶
func (c *Client) GetNewsSentiment(ctx context.Context, options *NewsSentimentOptions) (*NewsSentimentResponse, error)
func (*Client) GetTimeSeriesStockData ¶ added in v0.0.4
func (c *Client) GetTimeSeriesStockData(ctx context.Context, options *CoreStockSharedInputOptions) (*CoreStockResponse, error)
func (*Client) GetTopGainersLosers ¶
func (c *Client) GetTopGainersLosers(ctx context.Context) (*RankingResponse, error)
type CoreStockData ¶ added in v0.0.4
type CoreStockData struct { Open *string `json:"1. open"` High *string `json:"2. high"` Low *string `json:"3. low"` Close *string `json:"4. close"` Volume *string `json:"5. volume,omitempty"` AdjustedClose *string `json:"5. adjusted close,omitempty"` VolumeForAdjustedCall *string `json:"6. volume,omitempty"` DividendAmount *string `json:"7. dividend amount,omitempty"` }
type CoreStockResponse ¶ added in v0.0.4
type CoreStockResponse struct { MetaData *MetaData `json:"Meta Data,omitempty"` LatestQuote *GlobalQuote `json:"Global Quote,omitempty"` MonthlyAdjustedTimeSeries map[string]*CoreStockData `json:"Monthly Adjusted Time Series,omitempty"` MonthlyTimeSeries map[string]*CoreStockData `json:"Monthly Time Series,omitempty"` OneMinTimeSeries map[string]*CoreStockData `json:"Time Series (1min),omitempty"` FiveMinTimeSeries map[string]*CoreStockData `json:"Time Series (5min),omitempty"` FifteenMinTimeSeries map[string]*CoreStockData `json:"Time Series (15min),omitempty"` ThirtyMinTimeSeries map[string]*CoreStockData `json:"Time Series (30min),omitempty"` HourTimeSeries map[string]*CoreStockData `json:"Time Series (60min),omitempty"` DailyTimeSeries map[string]*CoreStockData `json:"Time Series (Daily),omitempty"` WeeklyTimeSeries map[string]*CoreStockData `json:"Weekly Time Series,omitempty"` WeeklyAdjustedTimeSeries map[string]*CoreStockData `json:"Weekly Adjusted Time Series,omitempty"` }
type CoreStockSharedInputOptions ¶ added in v0.0.4
type CoreStockSharedInputOptions struct {}
func (CoreStockSharedInputOptions) Valid ¶ added in v0.0.4
func (c CoreStockSharedInputOptions) Valid() bool
type GlobalQuote ¶ added in v0.0.4
type GlobalQuote struct { Symbol *string `json:"01. symbol"` Open *string `json:"02. open"` High *string `json:"03. high"` Low *string `json:"04. low"` Price *string `json:"05. price"` Volume *string `json:"06. volume"` LatestTradingDay *string `json:"07. latest trading day"` PreviousClose *string `json:"08. previous close"` Change *string `json:"09. change"` ChangePercent *string `json:"10. change percent"` }
type MetaData ¶ added in v0.0.4
type MetaData struct { Information *string `json:"1. Information,omitempty"` Symbol *string `json:"2. Symbol,omitempty"` LastRefreshed *string `json:"3. Last Refreshed,omitempty"` Interval *string `json:"4. Interval,omitempty"` OutputSize *string `json:"5. Output Size,omitempty"` TimeZone *string `json:"6. Time Zone,omitempty"` }
type NewsFeed ¶
type NewsFeed struct { Title *string `json:"title"` URL *string `json:"url"` TimePublished *string `json:"time_published"` Authors []*string `json:"authors"` Summary *string `json:"summary"` BannerImage *string `json:"banner_image"` Source *string `json:"source"` CategoryWithinSource *string `json:"category_within_source"` SourceDomain *string `json:"source_domain"` Topics []*TopicRelevance `json:"topics"` OverallSentimentScore *float64 `json:"overall_sentiment_score"` OverallSentimentLabel *string `json:"overall_sentiment_label"` TickerSentiment []*TickerSentiment `json:"ticker_sentiment"` }
type NewsSentimentOptions ¶
type NewsSentimentOptions struct { Tickers []string `url:"tickers,omitempty"` Topics []Topic `url:"topics,omitempty"` TimeFrom string `url:"time_from,omitempty"` TimeTo string `url:"time_to,omitempty"` Sort Sort `url:"sort,omitempty"` Limit int `url:"limit,omitempty"` }
func (NewsSentimentOptions) Valid ¶ added in v0.0.4
func (n NewsSentimentOptions) Valid() bool
type NewsSentimentResponse ¶
type OutputSize ¶ added in v0.0.4
type OutputSize string
func (OutputSize) Valid ¶ added in v0.0.4
func (o OutputSize) Valid() bool
type RankedStock ¶
type RankingResponse ¶
type RankingResponse struct { Metadata *string `json:"metadata"` LastUpdated *string `json:"last_updated"` TopGainers []*RankedStock `json:"top_gainers"` TopLosers []*RankedStock `json:"top_losers"` MostActivelyTraded []*RankedStock `json:"most_actively_traded"` }
type TickerSentiment ¶
type TopicRelevance ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.