github.com/polygon-io/client-go@v1.16.4/rest/models/summaries.go (about) 1 package models 2 3 import "strings" 4 5 type GetSummaryParams struct { 6 // The ticker list to get summaries for 7 TickerAnyOf *string `query:"ticker.any_of"` 8 } 9 10 func (p GetSummaryParams) WithTickerAnyOf(tickers ...string) *GetSummaryParams { 11 q := strings.Join(tickers, ",") 12 p.TickerAnyOf = &q 13 return &p 14 } 15 16 type GetSummaryResponse struct { 17 BaseResponse 18 Results []SummaryResult `json:"results,omitempty"` 19 } 20 21 type SummaryResult struct { 22 Price float64 `json:"price,omitempty"` 23 Name string `json:"name,omitempty"` 24 Ticker string `json:"ticker,omitempty"` 25 Branding Branding `json:"branding,omitempty"` 26 MarketStatus string `json:"market_status,omitempty"` 27 Type string `json:"type,omitempty"` 28 Session Session `json:"session,omitempty"` 29 Options Options `json:"options,omitempty"` 30 Message string `json:"message,omitempty"` 31 Error string `json:"error,omitempty"` 32 } 33 34 type Session struct { 35 Change float64 `json:"change,omitempty"` 36 ChangePercent float64 `json:"change_percent,omitempty"` 37 EarlyTradingChange float64 `json:"early_trading_change,omitempty"` 38 EarlyTradingChangePercent float64 `json:"early_trading_change_percent,omitempty"` 39 LateTradingChange float64 `json:"late_trading_change,omitempty"` 40 LateTradingChangePercent float64 `json:"late_trading_change_percent,omitempty"` 41 Close float64 `json:"close,omitempty"` 42 High float64 `json:"high,omitempty"` 43 Low float64 `json:"low,omitempty"` 44 Open float64 `json:"open,omitempty"` 45 PreviousClose float64 `json:"previous_close,omitempty"` 46 Volume float64 `json:"volume,omitempty"` 47 Price float64 `json:"price,omitempty"` 48 } 49 50 //easyjson:json 51 type Options struct { 52 ContractType string `json:"contract_type,omitempty"` 53 ExerciseStyle string `json:"exercise_style,omitempty"` 54 ExpirationDate Date `json:"expiration_date,omitempty"` 55 SharesPerContract float64 `json:"shares_per_contract,omitempty"` 56 StrikePrice float64 `json:"strike_price,omitempty"` 57 UnderlyingTicker string `json:"underlying_ticker,omitempty"` 58 }