Versions in this module Expand all Collapse all v1 v1.6.0 Sep 16, 2020 v1.5.1 Sep 6, 2020 Changes in this version + const MaxConnectionAttempts + const Message + const MinuteAggs + const Quotes + const SecondAggs + const Status + const Trades + var DefaultClient = NewClient(common.Credentials()) + type APIError struct + Code string + Message string + func (e *APIError) Error() string + type AggTick struct + Close float64 + EpochMilliseconds int64 + High float64 + Items int64 + Low float64 + Open float64 + Volume float64 + type AggTickV2 struct + Close float64 + High float64 + Low float64 + Open float64 + StartTimestamp int64 + Symbol string + VWAP float64 + Volume float64 + type AggType string + const Day + const Minute + type Client struct + func NewClient(credentials *common.APIKey) *Client + func (c *Client) GetHistoricAggregates(symbol string, resolution AggType, from, to *time.Time, limit *int) (*HistoricAggregates, error) + func (c *Client) GetHistoricAggregatesV2(symbol string, multiplier int, resolution AggType, from, to *time.Time, ...) (*HistoricAggregatesV2, error) + func (c *Client) GetHistoricQuotes(symbol, date string) (totalQuotes *HistoricQuotes, err error) + func (c *Client) GetHistoricQuotesV2(ticker string, date string, opts *HistoricTicksV2Params) (*HistoricQuotesV2, error) + func (c *Client) GetHistoricTrades(symbol string, date string, opts *GetHistoricTradesParams) (totalTrades *HistoricTrades, err error) + func (c *Client) GetHistoricTradesV2(ticker string, date string, opts *HistoricTicksV2Params) (*HistoricTradesV2, error) + func (c *Client) GetPreviousClose(symbol string) (*PreviousCloseV2, error) + func (c *Client) GetSnapshot(symbol string) (*Snapshot, error) + func (c *Client) GetStockExchanges() ([]StockExchange, error) + type GetHistoricTradesParams struct + Limit int64 + Offset int64 + type HistoricAggregates struct + AggregateType AggType + Map struct{ ... } + Symbol string + Ticks []AggTick + func GetHistoricAggregates(symbol string, resolution AggType, from, to *time.Time, limit *int) (*HistoricAggregates, error) + type HistoricAggregatesV2 struct + Adjusted bool + QueryCount int + ResultsCount int + Symbol string + Ticks []AggTick + type HistoricQuotes struct + Day string + Map struct{ ... } + MsLatency int + Status string + Symbol string + Ticks []QuoteTick + Type string + func GetHistoricQuotes(symbol, date string) (totalQuotes *HistoricQuotes, err error) + type HistoricQuotesV2 struct + Map map[string]MapItem + Results []QuoteTickV2 + ResultsCount int64 + Ticker string + type HistoricTicksV2Params struct + Limit int64 + Reverse bool + Timestamp int64 + TimestampLimit int64 + type HistoricTrades struct + Day string + Map struct{ ... } + MsLatency int + Status string + Symbol string + Ticks []TradeTick + Type string + func GetHistoricTrades(symbol string, date string, opts *GetHistoricTradesParams) (totalTrades *HistoricTrades, err error) + type HistoricTradesV2 struct + Map map[string]MapItem + Results []TradeTickV2 + ResultsCount int64 + Ticker string + type MapItem struct + Name string + Type string + type PolgyonServerMsg struct + Event string + type PolygonAuthMsg struct + Event string + Message string + Status string + type PolygonClientMsg struct + Action string + Params string + type PreviousCloseV2 struct + Adjusted bool + QueryCount int + ResultsCount int + Status string + Symbol string + Ticks []AggTickV2 + type QuoteTick struct + AskExchange string + AskPrice float64 + AskSize int + BidExchange string + BidPrice float64 + BidSize int + Condition int + Timestamp int64 + type QuoteTickV2 struct + AskExchange *int + AskPrice *float64 + AskSize *int + BidExchange *int + BidPrice *float64 + BidSize *int + Conditions *[]int + Indicators *[]int + ParticipantTimestamp *int64 + SIPTimestamp *int64 + SequenceNumber *int + Size *int + TRFID *int + TRFTimestamp *int64 + Tape *int + type Snapshot struct + Status string + Ticker TickerSnapshot + type StockExchange struct + Id int64 + Market string + Mic string + Name string + Tape string + Type string + func GetStockExchanges() ([]StockExchange, error) + type Stream struct + func GetStream() *Stream + func (s *Stream) Close() error + func (s *Stream) Subscribe(channel string, handler func(msg interface{})) (err error) + type StreamAggregate struct + AccumulatedVolume int + Average float64 + ClosePrice float64 + EndTimestamp int64 + Event string + HighPrice float64 + LowPrice float64 + OpenPrice float64 + OpeningPrice float64 + StartTimestamp int64 + Symbol string + VWAP float64 + Volume int + type StreamQuote struct + AskExchange int + AskPrice float64 + AskSize int64 + BidExchange int + BidPrice float64 + BidSize int64 + Condition int + Symbol string + Timestamp int64 + type StreamTrade struct + Conditions []int + Exchange int + Price float64 + Size int64 + Symbol string + Timestamp int64 + TradeID string + type SymbolsMetadata struct + Symbols []struct{ ... } + type TickerSnapshot struct + Day AggTickV2 + LastQuote QuoteTickV2 + LastTrade TradeTickV2 + Min StreamAggregate + PrevDay AggTickV2 + Symbol string + TodaysChange float64 + TodaysChangePercent float64 + UpdatedNS int64 + type TradeTick struct + Condition1 int + Condition2 int + Condition3 int + Condition4 int + Exchange string + Price float64 + Size int + Timestamp int64 + type TradeTickV2 struct + Conditions *[]int + Correction *int + Exchange *int + ID *string + OrigID *string + ParticipantTimestamp *int64 + Price *float64 + SIPTimestamp *int64 + SequenceNumber *int + Size *int + TRFID *int + TRFTimestamp *int64 + Tape *int