diff --git a/rest/gen/client.gen.go b/rest/gen/client.gen.go index 80fd0fdc..138626d4 100644 --- a/rest/gen/client.gen.go +++ b/rest/gen/client.gen.go @@ -3623,24 +3623,6 @@ type GetOptionsVXOpenInterestParams struct { // RootLte Filter less than or equal to the value. RootLte *string `form:"root.lte,omitempty" json:"root.lte,omitempty"` - // UnderlyingTicker The ticker of the contract's underlying (e.g., SPX). Weekly and adjusted roots are folded in, so SPXW contracts report SPX and AMCR1 contracts report AMCR; see root to tell them apart. - UnderlyingTicker *string `form:"underlying_ticker,omitempty" json:"underlying_ticker,omitempty"` - - // UnderlyingTickerAnyOf Filter equal to any of the values. Multiple values can be specified by using a comma separated list. - UnderlyingTickerAnyOf *string `form:"underlying_ticker.any_of,omitempty" json:"underlying_ticker.any_of,omitempty"` - - // UnderlyingTickerGt Filter greater than the value. - UnderlyingTickerGt *string `form:"underlying_ticker.gt,omitempty" json:"underlying_ticker.gt,omitempty"` - - // UnderlyingTickerGte Filter greater than or equal to the value. - UnderlyingTickerGte *string `form:"underlying_ticker.gte,omitempty" json:"underlying_ticker.gte,omitempty"` - - // UnderlyingTickerLt Filter less than the value. - UnderlyingTickerLt *string `form:"underlying_ticker.lt,omitempty" json:"underlying_ticker.lt,omitempty"` - - // UnderlyingTickerLte Filter less than or equal to the value. - UnderlyingTickerLte *string `form:"underlying_ticker.lte,omitempty" json:"underlying_ticker.lte,omitempty"` - // ContractType The contract type. Possible values: call, put. ContractType *GetOptionsVXOpenInterestParamsContractType `form:"contract_type,omitempty" json:"contract_type,omitempty"` @@ -3662,21 +3644,6 @@ type GetOptionsVXOpenInterestParams struct { // ExpirationDateLte Filter less than or equal to the value. Value must be formatted 'yyyy-mm-dd'. ExpirationDateLte *string `form:"expiration_date.lte,omitempty" json:"expiration_date.lte,omitempty"` - // StrikePrice The strike price of the contract. Value must be a floating point number. - StrikePrice *float64 `form:"strike_price,omitempty" json:"strike_price,omitempty"` - - // StrikePriceGt Filter greater than the value. Value must be a floating point number. - StrikePriceGt *float64 `form:"strike_price.gt,omitempty" json:"strike_price.gt,omitempty"` - - // StrikePriceGte Filter greater than or equal to the value. Value must be a floating point number. - StrikePriceGte *float64 `form:"strike_price.gte,omitempty" json:"strike_price.gte,omitempty"` - - // StrikePriceLt Filter less than the value. Value must be a floating point number. - StrikePriceLt *float64 `form:"strike_price.lt,omitempty" json:"strike_price.lt,omitempty"` - - // StrikePriceLte Filter less than or equal to the value. Value must be a floating point number. - StrikePriceLte *float64 `form:"strike_price.lte,omitempty" json:"strike_price.lte,omitempty"` - // Date The trading date the open interest applies to (formatted as YYYY-MM-DD). Value must be formatted 'yyyy-mm-dd'. Date *string `form:"date,omitempty" json:"date,omitempty"` @@ -3692,21 +3659,6 @@ type GetOptionsVXOpenInterestParams struct { // DateLte Filter less than or equal to the value. Value must be formatted 'yyyy-mm-dd'. DateLte *string `form:"date.lte,omitempty" json:"date.lte,omitempty"` - // OpenInterest The number of outstanding contracts that have not been closed or exercised, as of the last open interest update of the day. Value must be an integer. - OpenInterest *int64 `form:"open_interest,omitempty" json:"open_interest,omitempty"` - - // OpenInterestGt Filter greater than the value. Value must be an integer. - OpenInterestGt *int64 `form:"open_interest.gt,omitempty" json:"open_interest.gt,omitempty"` - - // OpenInterestGte Filter greater than or equal to the value. Value must be an integer. - OpenInterestGte *int64 `form:"open_interest.gte,omitempty" json:"open_interest.gte,omitempty"` - - // OpenInterestLt Filter less than the value. Value must be an integer. - OpenInterestLt *int64 `form:"open_interest.lt,omitempty" json:"open_interest.lt,omitempty"` - - // OpenInterestLte Filter less than or equal to the value. Value must be an integer. - OpenInterestLte *int64 `form:"open_interest.lte,omitempty" json:"open_interest.lte,omitempty"` - // Limit Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '50000'. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` @@ -22865,102 +22817,6 @@ func NewGetOptionsVXOpenInterestRequest(server string, params *GetOptionsVXOpenI } - if params.UnderlyingTicker != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "underlying_ticker", runtime.ParamLocationQuery, *params.UnderlyingTicker); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UnderlyingTickerAnyOf != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "underlying_ticker.any_of", runtime.ParamLocationQuery, *params.UnderlyingTickerAnyOf); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UnderlyingTickerGt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "underlying_ticker.gt", runtime.ParamLocationQuery, *params.UnderlyingTickerGt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UnderlyingTickerGte != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "underlying_ticker.gte", runtime.ParamLocationQuery, *params.UnderlyingTickerGte); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UnderlyingTickerLt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "underlying_ticker.lt", runtime.ParamLocationQuery, *params.UnderlyingTickerLt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.UnderlyingTickerLte != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "underlying_ticker.lte", runtime.ParamLocationQuery, *params.UnderlyingTickerLte); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.ContractType != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "contract_type", runtime.ParamLocationQuery, *params.ContractType); err != nil { @@ -23073,86 +22929,6 @@ func NewGetOptionsVXOpenInterestRequest(server string, params *GetOptionsVXOpenI } - if params.StrikePrice != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "strike_price", runtime.ParamLocationQuery, *params.StrikePrice); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StrikePriceGt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "strike_price.gt", runtime.ParamLocationQuery, *params.StrikePriceGt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StrikePriceGte != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "strike_price.gte", runtime.ParamLocationQuery, *params.StrikePriceGte); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StrikePriceLt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "strike_price.lt", runtime.ParamLocationQuery, *params.StrikePriceLt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.StrikePriceLte != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "strike_price.lte", runtime.ParamLocationQuery, *params.StrikePriceLte); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.Date != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "date", runtime.ParamLocationQuery, *params.Date); err != nil { @@ -23233,86 +23009,6 @@ func NewGetOptionsVXOpenInterestRequest(server string, params *GetOptionsVXOpenI } - if params.OpenInterest != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "open_interest", runtime.ParamLocationQuery, *params.OpenInterest); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OpenInterestGt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "open_interest.gt", runtime.ParamLocationQuery, *params.OpenInterestGt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OpenInterestGte != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "open_interest.gte", runtime.ParamLocationQuery, *params.OpenInterestGte); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OpenInterestLt != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "open_interest.lt", runtime.ParamLocationQuery, *params.OpenInterestLt); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OpenInterestLte != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "open_interest.lte", runtime.ParamLocationQuery, *params.OpenInterestLte); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - if params.Limit != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil { @@ -50298,12 +49994,6 @@ type GetOptionsVXOpenInterestResponse struct { // OpenInterest The number of outstanding contracts that have not been closed or exercised, as of the last open interest update of the day. OpenInterest *int64 `json:"open_interest,omitempty"` - // OpenInterestChange The change in open interest from the previous trading day (open_interest - previous_open_interest). Null when previous_open_interest is null. - OpenInterestChange *int64 `json:"open_interest_change,omitempty"` - - // PreviousOpenInterest The contract's open interest on the previous trading day. Null if the contract had no open interest reported that day, such as a new listing. - PreviousOpenInterest *int64 `json:"previous_open_interest,omitempty"` - // Root The OCC root symbol of the contract (e.g., SPXW). Differs from the underlying for weekly roots and for contracts adjusted after a corporate action (e.g., AMCR1). Root *string `json:"root,omitempty"` @@ -58769,6 +58459,9 @@ type ListOptionsContractsResponse struct { // Cfi The 6 letter CFI code of the contract (defined in ISO 10962) Cfi *string `json:"cfi,omitempty"` + // CompanyTicker KPI binary options only. The ticker of the company the KPI belongs to, like NFLX. + CompanyTicker *string `json:"company_ticker,omitempty"` + // ContractType The type of contract. Can be "put", "call", or in some rare cases, "other". ContractType *string `json:"contract_type,omitempty"` @@ -58781,9 +58474,21 @@ type ListOptionsContractsResponse struct { // ExpirationDate The contract's expiration date in YYYY-MM-DD format. ExpirationDate *string `json:"expiration_date,omitempty"` + // Metric KPI binary options only. The KPI the contract settles on, like "Earnings Per Share ($/share)". + Metric *string `json:"metric,omitempty"` + // PrimaryExchange The MIC code of the primary exchange that this contract is listed on. PrimaryExchange *string `json:"primary_exchange,omitempty"` + // ReportTime KPI binary options only. AM if the company reports before the market opens, PM if after it closes. + ReportTime *ListOptionsContracts200ResultsReportTime `json:"report_time,omitempty"` + + // ReportingPeriod KPI binary options only. The fiscal period the KPI is for, like 2026Q3. + ReportingPeriod *string `json:"reporting_period,omitempty"` + + // Scale KPI binary options only. The KPI value divided by scale gives the strike price, like 1000000000 for a KPI in billions. A negative scale means an inverted KPI, like Loss Per Share. + Scale *int `json:"scale,omitempty"` + // SharesPerContract The number of shares per contract for this contract. SharesPerContract *float32 `json:"shares_per_contract,omitempty"` @@ -58793,8 +58498,14 @@ type ListOptionsContractsResponse struct { // Ticker The ticker for the option contract. Ticker *string `json:"ticker,omitempty"` + // Type The type of option contract: standard or binary. It can be missing, for example on contracts listed before this field was added, so a missing type says nothing about the contract. + Type *ListOptionsContracts200ResultsType `json:"type,omitempty"` + // UnderlyingTicker The underlying ticker that the option contract relates to. UnderlyingTicker *string `json:"underlying_ticker,omitempty"` + + // UnderlyingType What the contract is based on. For now only set on KPI binary options, as kpi. + UnderlyingType *ListOptionsContracts200ResultsUnderlyingType `json:"underlying_type,omitempty"` } `json:"results,omitempty"` // Status The status of this request's response. @@ -58802,6 +58513,9 @@ type ListOptionsContractsResponse struct { } } type ListOptionsContracts200ResultsExerciseStyle string +type ListOptionsContracts200ResultsReportTime string +type ListOptionsContracts200ResultsType string +type ListOptionsContracts200ResultsUnderlyingType string // Status returns HTTPResponse.Status func (r ListOptionsContractsResponse) Status() string { @@ -58844,6 +58558,9 @@ type GetOptionsContractResponse struct { // Cfi The 6 letter CFI code of the contract (defined in ISO 10962) Cfi *string `json:"cfi,omitempty"` + // CompanyTicker KPI binary options only. The ticker of the company the KPI belongs to, like NFLX. + CompanyTicker *string `json:"company_ticker,omitempty"` + // ContractType The type of contract. Can be "put", "call", or in some rare cases, "other". ContractType *string `json:"contract_type,omitempty"` @@ -58856,9 +58573,21 @@ type GetOptionsContractResponse struct { // ExpirationDate The contract's expiration date in YYYY-MM-DD format. ExpirationDate *string `json:"expiration_date,omitempty"` + // Metric KPI binary options only. The KPI the contract settles on, like "Earnings Per Share ($/share)". + Metric *string `json:"metric,omitempty"` + // PrimaryExchange The MIC code of the primary exchange that this contract is listed on. PrimaryExchange *string `json:"primary_exchange,omitempty"` + // ReportTime KPI binary options only. AM if the company reports before the market opens, PM if after it closes. + ReportTime *GetOptionsContract200ResultsReportTime `json:"report_time,omitempty"` + + // ReportingPeriod KPI binary options only. The fiscal period the KPI is for, like 2026Q3. + ReportingPeriod *string `json:"reporting_period,omitempty"` + + // Scale KPI binary options only. The KPI value divided by scale gives the strike price, like 1000000000 for a KPI in billions. A negative scale means an inverted KPI, like Loss Per Share. + Scale *int `json:"scale,omitempty"` + // SharesPerContract The number of shares per contract for this contract. SharesPerContract *float32 `json:"shares_per_contract,omitempty"` @@ -58868,8 +58597,14 @@ type GetOptionsContractResponse struct { // Ticker The ticker for the option contract. Ticker *string `json:"ticker,omitempty"` + // Type The type of option contract: standard or binary. It can be missing, for example on contracts listed before this field was added, so a missing type says nothing about the contract. + Type *GetOptionsContract200ResultsType `json:"type,omitempty"` + // UnderlyingTicker The underlying ticker that the option contract relates to. UnderlyingTicker *string `json:"underlying_ticker,omitempty"` + + // UnderlyingType What the contract is based on. For now only set on KPI binary options, as kpi. + UnderlyingType *GetOptionsContract200ResultsUnderlyingType `json:"underlying_type,omitempty"` } `json:"results,omitempty"` // Status The status of this request's response. @@ -58877,6 +58612,9 @@ type GetOptionsContractResponse struct { } } type GetOptionsContract200ResultsExerciseStyle string +type GetOptionsContract200ResultsReportTime string +type GetOptionsContract200ResultsType string +type GetOptionsContract200ResultsUnderlyingType string // Status returns HTTPResponse.Status func (r GetOptionsContractResponse) Status() string { @@ -59424,6 +59162,8 @@ type GetSnapshotsResponse struct { // Values describe the current trading session only; nothing carries over from the previous session apart from `previous_close`. For stocks snapshots, an asset that has not traded yet this session reports `volume: 0` with the price and change fields omitted rather than reported as 0. // // During early trading on stocks snapshots, `volume` and `price` track the session as it happens, but `open`, `high`, `low`, `close` and `vwap` are omitted until the regular session opens, as those report official session prices. They appear from the open and remain through late trading. + // + // For options snapshots, the early, regular and late trading changes use these sessions: early trading from 7:30 to 9:30 AM ET, the regular session from 9:30 AM to 4:00 PM ET (4:15 PM ET for some products, such as SPY and SPX options), and late trading from the end of the regular session to 5:00 PM ET. Only trades marked with the extended hours condition (EXHT, 248) count as early or late trading. Cboe's extended trading hours program covers selected equity options, so other contracts do not get an early or late trading change. Index options, such as SPX, SPXW and XSP, get the regular trading change only. A change field is omitted when the contract has no trade in that session on the current trading day, or when the price it is measured against is missing. A change of 0 is returned as 0. Session *struct { // Change The value of the price change for the asset from the previous trading day. Change *float64 `json:"change,omitempty"` @@ -59437,19 +59177,22 @@ type GetSnapshotsResponse struct { // DecimalVolume The trading volume for the asset for the day with decimal precision. This field provides support for fractional shares, representing volume as a decimal string. This field is only returned for stocks snapshots. DecimalVolume *string `json:"decimal_volume,omitempty"` - // EarlyTradingChange Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close. + // EarlyTradingChange Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close. For options, this is the price of the contract's last early trading trade today (7:30 to 9:30 AM ET, with the EXHT condition) minus `previous_close`. EarlyTradingChange *float64 `json:"early_trading_change,omitempty"` - // EarlyTradingChangePercent Today's early trading change as a percentage. + // EarlyTradingChangePercent Today's early trading change as a percentage of `previous_close`. EarlyTradingChangePercent *float64 `json:"early_trading_change_percent,omitempty"` // High The highest price of the asset for the day. High *float64 `json:"high,omitempty"` - // LateTradingChange Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close. + // LastUpdated The nanosecond timestamp of the last update to the session data. For stocks, it's set when the session resets at the start of each trading session and then advances with each trade; quotes don't update it. Returned for stocks, crypto, and forex snapshots, though it may be absent for inactive tickers. + LastUpdated *int64 `json:"last_updated,omitempty"` + + // LateTradingChange Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close. For options, this is the price of the contract's last late trading trade today (after the regular session and before 5:00 PM ET, with the EXHT condition) minus today's `close`. LateTradingChange *float64 `json:"late_trading_change,omitempty"` - // LateTradingChangePercent Today's late trading change as a percentage. + // LateTradingChangePercent Today's late trading change as a percentage of today's `close`. LateTradingChangePercent *float64 `json:"late_trading_change_percent,omitempty"` // Low The lowest price of the asset for the day. @@ -59464,14 +59207,17 @@ type GetSnapshotsResponse struct { // Price The price of the most recent trade or bid price for this asset. Price *float64 `json:"price,omitempty"` - // RegularTradingChange Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close. + // RegularTradingChange Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close. For options, while `market_status` is `open` this is the price of the contract's last regular session trade today minus `previous_close`. During late trading and after the close, it is today's `close` minus `previous_close`. It is omitted during early trading. RegularTradingChange *float64 `json:"regular_trading_change,omitempty"` - // RegularTradingChangePercent Today's regular trading change as a percentage. + // RegularTradingChangePercent Today's regular trading change as a percentage of `previous_close`. RegularTradingChangePercent *float64 `json:"regular_trading_change_percent,omitempty"` // Volume The trading volume for the asset for the day. A value of 0 means no trades have occurred yet in the current session. Volume *float64 `json:"volume,omitempty"` + + // Vwap The volume weighted average price of the asset for the day. Only returned for stocks, crypto, and forex snapshots, and omitted when there's no day bar yet, such as for stocks before the regular market open or for tickers that haven't traded today. + Vwap *float64 `json:"vwap,omitempty"` } `json:"session,omitempty"` // Ticker The ticker symbol for the asset. @@ -65225,12 +64971,6 @@ func ParseGetOptionsVXOpenInterestResponse(rsp *http.Response) (*GetOptionsVXOpe // OpenInterest The number of outstanding contracts that have not been closed or exercised, as of the last open interest update of the day. OpenInterest *int64 `json:"open_interest,omitempty"` - // OpenInterestChange The change in open interest from the previous trading day (open_interest - previous_open_interest). Null when previous_open_interest is null. - OpenInterestChange *int64 `json:"open_interest_change,omitempty"` - - // PreviousOpenInterest The contract's open interest on the previous trading day. Null if the contract had no open interest reported that day, such as a new listing. - PreviousOpenInterest *int64 `json:"previous_open_interest,omitempty"` - // Root The OCC root symbol of the contract (e.g., SPXW). Differs from the underlying for weekly roots and for contracts adjusted after a corporate action (e.g., AMCR1). Root *string `json:"root,omitempty"` @@ -74374,6 +74114,9 @@ func ParseListOptionsContractsResponse(rsp *http.Response) (*ListOptionsContract // Cfi The 6 letter CFI code of the contract (defined in ISO 10962) Cfi *string `json:"cfi,omitempty"` + // CompanyTicker KPI binary options only. The ticker of the company the KPI belongs to, like NFLX. + CompanyTicker *string `json:"company_ticker,omitempty"` + // ContractType The type of contract. Can be "put", "call", or in some rare cases, "other". ContractType *string `json:"contract_type,omitempty"` @@ -74386,9 +74129,21 @@ func ParseListOptionsContractsResponse(rsp *http.Response) (*ListOptionsContract // ExpirationDate The contract's expiration date in YYYY-MM-DD format. ExpirationDate *string `json:"expiration_date,omitempty"` + // Metric KPI binary options only. The KPI the contract settles on, like "Earnings Per Share ($/share)". + Metric *string `json:"metric,omitempty"` + // PrimaryExchange The MIC code of the primary exchange that this contract is listed on. PrimaryExchange *string `json:"primary_exchange,omitempty"` + // ReportTime KPI binary options only. AM if the company reports before the market opens, PM if after it closes. + ReportTime *ListOptionsContracts200ResultsReportTime `json:"report_time,omitempty"` + + // ReportingPeriod KPI binary options only. The fiscal period the KPI is for, like 2026Q3. + ReportingPeriod *string `json:"reporting_period,omitempty"` + + // Scale KPI binary options only. The KPI value divided by scale gives the strike price, like 1000000000 for a KPI in billions. A negative scale means an inverted KPI, like Loss Per Share. + Scale *int `json:"scale,omitempty"` + // SharesPerContract The number of shares per contract for this contract. SharesPerContract *float32 `json:"shares_per_contract,omitempty"` @@ -74398,8 +74153,14 @@ func ParseListOptionsContractsResponse(rsp *http.Response) (*ListOptionsContract // Ticker The ticker for the option contract. Ticker *string `json:"ticker,omitempty"` + // Type The type of option contract: standard or binary. It can be missing, for example on contracts listed before this field was added, so a missing type says nothing about the contract. + Type *ListOptionsContracts200ResultsType `json:"type,omitempty"` + // UnderlyingTicker The underlying ticker that the option contract relates to. UnderlyingTicker *string `json:"underlying_ticker,omitempty"` + + // UnderlyingType What the contract is based on. For now only set on KPI binary options, as kpi. + UnderlyingType *ListOptionsContracts200ResultsUnderlyingType `json:"underlying_type,omitempty"` } `json:"results,omitempty"` // Status The status of this request's response. @@ -74455,6 +74216,9 @@ func ParseGetOptionsContractResponse(rsp *http.Response) (*GetOptionsContractRes // Cfi The 6 letter CFI code of the contract (defined in ISO 10962) Cfi *string `json:"cfi,omitempty"` + // CompanyTicker KPI binary options only. The ticker of the company the KPI belongs to, like NFLX. + CompanyTicker *string `json:"company_ticker,omitempty"` + // ContractType The type of contract. Can be "put", "call", or in some rare cases, "other". ContractType *string `json:"contract_type,omitempty"` @@ -74467,9 +74231,21 @@ func ParseGetOptionsContractResponse(rsp *http.Response) (*GetOptionsContractRes // ExpirationDate The contract's expiration date in YYYY-MM-DD format. ExpirationDate *string `json:"expiration_date,omitempty"` + // Metric KPI binary options only. The KPI the contract settles on, like "Earnings Per Share ($/share)". + Metric *string `json:"metric,omitempty"` + // PrimaryExchange The MIC code of the primary exchange that this contract is listed on. PrimaryExchange *string `json:"primary_exchange,omitempty"` + // ReportTime KPI binary options only. AM if the company reports before the market opens, PM if after it closes. + ReportTime *GetOptionsContract200ResultsReportTime `json:"report_time,omitempty"` + + // ReportingPeriod KPI binary options only. The fiscal period the KPI is for, like 2026Q3. + ReportingPeriod *string `json:"reporting_period,omitempty"` + + // Scale KPI binary options only. The KPI value divided by scale gives the strike price, like 1000000000 for a KPI in billions. A negative scale means an inverted KPI, like Loss Per Share. + Scale *int `json:"scale,omitempty"` + // SharesPerContract The number of shares per contract for this contract. SharesPerContract *float32 `json:"shares_per_contract,omitempty"` @@ -74479,8 +74255,14 @@ func ParseGetOptionsContractResponse(rsp *http.Response) (*GetOptionsContractRes // Ticker The ticker for the option contract. Ticker *string `json:"ticker,omitempty"` + // Type The type of option contract: standard or binary. It can be missing, for example on contracts listed before this field was added, so a missing type says nothing about the contract. + Type *GetOptionsContract200ResultsType `json:"type,omitempty"` + // UnderlyingTicker The underlying ticker that the option contract relates to. UnderlyingTicker *string `json:"underlying_ticker,omitempty"` + + // UnderlyingType What the contract is based on. For now only set on KPI binary options, as kpi. + UnderlyingType *GetOptionsContract200ResultsUnderlyingType `json:"underlying_type,omitempty"` } `json:"results,omitempty"` // Status The status of this request's response. @@ -75075,6 +74857,8 @@ func ParseGetSnapshotsResponse(rsp *http.Response) (*GetSnapshotsResponse, error // Values describe the current trading session only; nothing carries over from the previous session apart from `previous_close`. For stocks snapshots, an asset that has not traded yet this session reports `volume: 0` with the price and change fields omitted rather than reported as 0. // // During early trading on stocks snapshots, `volume` and `price` track the session as it happens, but `open`, `high`, `low`, `close` and `vwap` are omitted until the regular session opens, as those report official session prices. They appear from the open and remain through late trading. + // + // For options snapshots, the early, regular and late trading changes use these sessions: early trading from 7:30 to 9:30 AM ET, the regular session from 9:30 AM to 4:00 PM ET (4:15 PM ET for some products, such as SPY and SPX options), and late trading from the end of the regular session to 5:00 PM ET. Only trades marked with the extended hours condition (EXHT, 248) count as early or late trading. Cboe's extended trading hours program covers selected equity options, so other contracts do not get an early or late trading change. Index options, such as SPX, SPXW and XSP, get the regular trading change only. A change field is omitted when the contract has no trade in that session on the current trading day, or when the price it is measured against is missing. A change of 0 is returned as 0. Session *struct { // Change The value of the price change for the asset from the previous trading day. Change *float64 `json:"change,omitempty"` @@ -75088,19 +74872,22 @@ func ParseGetSnapshotsResponse(rsp *http.Response) (*GetSnapshotsResponse, error // DecimalVolume The trading volume for the asset for the day with decimal precision. This field provides support for fractional shares, representing volume as a decimal string. This field is only returned for stocks snapshots. DecimalVolume *string `json:"decimal_volume,omitempty"` - // EarlyTradingChange Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close. + // EarlyTradingChange Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close. For options, this is the price of the contract's last early trading trade today (7:30 to 9:30 AM ET, with the EXHT condition) minus `previous_close`. EarlyTradingChange *float64 `json:"early_trading_change,omitempty"` - // EarlyTradingChangePercent Today's early trading change as a percentage. + // EarlyTradingChangePercent Today's early trading change as a percentage of `previous_close`. EarlyTradingChangePercent *float64 `json:"early_trading_change_percent,omitempty"` // High The highest price of the asset for the day. High *float64 `json:"high,omitempty"` - // LateTradingChange Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close. + // LastUpdated The nanosecond timestamp of the last update to the session data. For stocks, it's set when the session resets at the start of each trading session and then advances with each trade; quotes don't update it. Returned for stocks, crypto, and forex snapshots, though it may be absent for inactive tickers. + LastUpdated *int64 `json:"last_updated,omitempty"` + + // LateTradingChange Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close. For options, this is the price of the contract's last late trading trade today (after the regular session and before 5:00 PM ET, with the EXHT condition) minus today's `close`. LateTradingChange *float64 `json:"late_trading_change,omitempty"` - // LateTradingChangePercent Today's late trading change as a percentage. + // LateTradingChangePercent Today's late trading change as a percentage of today's `close`. LateTradingChangePercent *float64 `json:"late_trading_change_percent,omitempty"` // Low The lowest price of the asset for the day. @@ -75115,14 +74902,17 @@ func ParseGetSnapshotsResponse(rsp *http.Response) (*GetSnapshotsResponse, error // Price The price of the most recent trade or bid price for this asset. Price *float64 `json:"price,omitempty"` - // RegularTradingChange Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close. + // RegularTradingChange Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close. For options, while `market_status` is `open` this is the price of the contract's last regular session trade today minus `previous_close`. During late trading and after the close, it is today's `close` minus `previous_close`. It is omitted during early trading. RegularTradingChange *float64 `json:"regular_trading_change,omitempty"` - // RegularTradingChangePercent Today's regular trading change as a percentage. + // RegularTradingChangePercent Today's regular trading change as a percentage of `previous_close`. RegularTradingChangePercent *float64 `json:"regular_trading_change_percent,omitempty"` // Volume The trading volume for the asset for the day. A value of 0 means no trades have occurred yet in the current session. Volume *float64 `json:"volume,omitempty"` + + // Vwap The volume weighted average price of the asset for the day. Only returned for stocks, crypto, and forex snapshots, and omitted when there's no day bar yet, such as for stocks before the regular market open or for tickers that haven't traded today. + Vwap *float64 `json:"vwap,omitempty"` } `json:"session,omitempty"` // Ticker The ticker symbol for the asset. diff --git a/rest/scripts/openapi.json b/rest/scripts/openapi.json index ce7dd12e..4be79c32 100644 --- a/rest/scripts/openapi.json +++ b/rest/scripts/openapi.json @@ -18310,54 +18310,6 @@ "type": "string" } }, - { - "description": "The ticker of the contract's underlying (e.g., SPX). Weekly and adjusted roots are folded in, so SPXW contracts report SPX and AMCR1 contracts report AMCR; see root to tell them apart.", - "in": "query", - "name": "underlying_ticker", - "schema": { - "type": "string" - } - }, - { - "description": "Filter equal to any of the values. Multiple values can be specified by using a comma separated list.", - "in": "query", - "name": "underlying_ticker.any_of", - "schema": { - "type": "string" - } - }, - { - "description": "Filter greater than the value.", - "in": "query", - "name": "underlying_ticker.gt", - "schema": { - "type": "string" - } - }, - { - "description": "Filter greater than or equal to the value.", - "in": "query", - "name": "underlying_ticker.gte", - "schema": { - "type": "string" - } - }, - { - "description": "Filter less than the value.", - "in": "query", - "name": "underlying_ticker.lt", - "schema": { - "type": "string" - } - }, - { - "description": "Filter less than or equal to the value.", - "in": "query", - "name": "underlying_ticker.lte", - "schema": { - "type": "string" - } - }, { "description": "The contract type. Possible values: call, put.", "in": "query", @@ -18422,51 +18374,6 @@ "type": "string" } }, - { - "description": "The strike price of the contract. Value must be a floating point number.", - "in": "query", - "name": "strike_price", - "schema": { - "format": "double", - "type": "number" - } - }, - { - "description": "Filter greater than the value. Value must be a floating point number.", - "in": "query", - "name": "strike_price.gt", - "schema": { - "format": "double", - "type": "number" - } - }, - { - "description": "Filter greater than or equal to the value. Value must be a floating point number.", - "in": "query", - "name": "strike_price.gte", - "schema": { - "format": "double", - "type": "number" - } - }, - { - "description": "Filter less than the value. Value must be a floating point number.", - "in": "query", - "name": "strike_price.lt", - "schema": { - "format": "double", - "type": "number" - } - }, - { - "description": "Filter less than or equal to the value. Value must be a floating point number.", - "in": "query", - "name": "strike_price.lte", - "schema": { - "format": "double", - "type": "number" - } - }, { "description": "The trading date the open interest applies to (formatted as YYYY-MM-DD). Value must be formatted 'yyyy-mm-dd'.", "in": "query", @@ -18507,51 +18414,6 @@ "type": "string" } }, - { - "description": "The number of outstanding contracts that have not been closed or exercised, as of the last open interest update of the day. Value must be an integer.", - "in": "query", - "name": "open_interest", - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "description": "Filter greater than the value. Value must be an integer.", - "in": "query", - "name": "open_interest.gt", - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "description": "Filter greater than or equal to the value. Value must be an integer.", - "in": "query", - "name": "open_interest.gte", - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "description": "Filter less than the value. Value must be an integer.", - "in": "query", - "name": "open_interest.lt", - "schema": { - "format": "int64", - "type": "integer" - } - }, - { - "description": "Filter less than or equal to the value. Value must be an integer.", - "in": "query", - "name": "open_interest.lte", - "schema": { - "format": "int64", - "type": "integer" - } - }, { "description": "Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '50000'.", "in": "query", @@ -18586,8 +18448,6 @@ "date": "2026-01-22", "expiration_date": "2026-01-23", "open_interest": 9871, - "open_interest_change": 459, - "previous_open_interest": 9412, "root": "SPY", "strike_price": 687, "ticker": "O:SPY260123P00687000", @@ -18598,8 +18458,6 @@ "date": "2026-01-22", "expiration_date": "2026-01-23", "open_interest": 15234, - "open_interest_change": -776, - "previous_open_interest": 16010, "root": "SPY", "strike_price": 687, "ticker": "O:SPY260123C00687000", @@ -18641,16 +18499,6 @@ "format": "int64", "type": "integer" }, - "open_interest_change": { - "description": "The change in open interest from the previous trading day (open_interest - previous_open_interest). Null when previous_open_interest is null.", - "format": "int64", - "type": "integer" - }, - "previous_open_interest": { - "description": "The contract's open interest on the previous trading day. Null if the contract had no open interest reported that day, such as a new listing.", - "format": "int64", - "type": "integer" - }, "root": { "description": "The OCC root symbol of the contract (e.g., SPXW). Differs from the underlying for weekly roots and for contracts adjusted after a corporate action (e.g., AMCR1).", "type": "string" @@ -49228,6 +49076,10 @@ "description": "The 6 letter CFI code of the contract (defined in ISO 10962)", "type": "string" }, + "company_ticker": { + "description": "KPI binary options only. The ticker of the company the KPI belongs to, like NFLX.", + "type": "string" + }, "contract_type": { "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", "type": "string" @@ -49253,10 +49105,30 @@ "path": "github.com/polygon-io/ptime" } }, + "metric": { + "description": "KPI binary options only. The KPI the contract settles on, like \"Earnings Per Share ($/share)\".", + "type": "string" + }, "primary_exchange": { "description": "The MIC code of the primary exchange that this contract is listed on.", "type": "string" }, + "report_time": { + "description": "KPI binary options only. AM if the company reports before the market opens, PM if after it closes.", + "enum": [ + "AM", + "PM" + ], + "type": "string" + }, + "reporting_period": { + "description": "KPI binary options only. The fiscal period the KPI is for, like 2026Q3.", + "type": "string" + }, + "scale": { + "description": "KPI binary options only. The KPI value divided by scale gives the strike price, like 1000000000 for a KPI in billions. A negative scale means an inverted KPI, like Loss Per Share.", + "type": "integer" + }, "shares_per_contract": { "description": "The number of shares per contract for this contract.", "type": "number" @@ -49269,9 +49141,24 @@ "description": "The ticker for the option contract.", "type": "string" }, + "type": { + "description": "The type of option contract: standard or binary. It can be missing, for example on contracts listed before this field was added, so a missing type says nothing about the contract.", + "enum": [ + "standard", + "binary" + ], + "type": "string" + }, "underlying_ticker": { "description": "The underlying ticker that the option contract relates to.", "type": "string" + }, + "underlying_type": { + "description": "What the contract is based on. For now only set on KPI binary options, as kpi.", + "enum": [ + "kpi" + ], + "type": "string" } }, "type": "object", @@ -49419,6 +49306,10 @@ "description": "The 6 letter CFI code of the contract (defined in ISO 10962)", "type": "string" }, + "company_ticker": { + "description": "KPI binary options only. The ticker of the company the KPI belongs to, like NFLX.", + "type": "string" + }, "contract_type": { "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".", "type": "string" @@ -49444,10 +49335,30 @@ "path": "github.com/polygon-io/ptime" } }, + "metric": { + "description": "KPI binary options only. The KPI the contract settles on, like \"Earnings Per Share ($/share)\".", + "type": "string" + }, "primary_exchange": { "description": "The MIC code of the primary exchange that this contract is listed on.", "type": "string" }, + "report_time": { + "description": "KPI binary options only. AM if the company reports before the market opens, PM if after it closes.", + "enum": [ + "AM", + "PM" + ], + "type": "string" + }, + "reporting_period": { + "description": "KPI binary options only. The fiscal period the KPI is for, like 2026Q3.", + "type": "string" + }, + "scale": { + "description": "KPI binary options only. The KPI value divided by scale gives the strike price, like 1000000000 for a KPI in billions. A negative scale means an inverted KPI, like Loss Per Share.", + "type": "integer" + }, "shares_per_contract": { "description": "The number of shares per contract for this contract.", "type": "number" @@ -49460,9 +49371,24 @@ "description": "The ticker for the option contract.", "type": "string" }, + "type": { + "description": "The type of option contract: standard or binary. It can be missing, for example on contracts listed before this field was added, so a missing type says nothing about the contract.", + "enum": [ + "standard", + "binary" + ], + "type": "string" + }, "underlying_ticker": { "description": "The underlying ticker that the option contract relates to.", "type": "string" + }, + "underlying_type": { + "description": "What the contract is based on. For now only set on KPI binary options, as kpi.", + "enum": [ + "kpi" + ], + "type": "string" } }, "type": "object", @@ -50797,20 +50723,20 @@ "name": "NCLH $5 Call", "open_interest": 8921, "session": { - "change": -0.05, - "change_percent": -1.07, + "change": -0.06, + "change_percent": -0.894, "close": 6.65, "decimal_volume": "67.0", "early_trading_change": -0.01, - "early_trading_change_percent": -0.03, + "early_trading_change_percent": -0.149, "high": 7.01, - "late_trading_change": -0.4, - "late_trading_change_percent": -0.02, + "late_trading_change": 0.05, + "late_trading_change_percent": 0.752, "low": 5.42, "open": 6.7, "previous_close": 6.71, - "regular_trading_change": -0.6, - "regular_trading_change_percent": -0.5, + "regular_trading_change": -0.06, + "regular_trading_change_percent": -0.894, "volume": 67 }, "ticker": "O:NCLH221014C00005000", @@ -51232,7 +51158,7 @@ "type": "number" }, "session": { - "description": "Comprehensive trading session metrics, detailing price changes, trading volume, and key price points (open, close, high, low) for the asset within the current trading day. Includes specific changes during early, regular, and late trading periods to enable detailed performance analysis and trend tracking.\n\nValues describe the current trading session only; nothing carries over from the previous session apart from `previous_close`. For stocks snapshots, an asset that has not traded yet this session reports `volume: 0` with the price and change fields omitted rather than reported as 0.\n\nDuring early trading on stocks snapshots, `volume` and `price` track the session as it happens, but `open`, `high`, `low`, `close` and `vwap` are omitted until the regular session opens, as those report official session prices. They appear from the open and remain through late trading.", + "description": "Comprehensive trading session metrics, detailing price changes, trading volume, and key price points (open, close, high, low) for the asset within the current trading day. Includes specific changes during early, regular, and late trading periods to enable detailed performance analysis and trend tracking.\n\nValues describe the current trading session only; nothing carries over from the previous session apart from `previous_close`. For stocks snapshots, an asset that has not traded yet this session reports `volume: 0` with the price and change fields omitted rather than reported as 0.\n\nDuring early trading on stocks snapshots, `volume` and `price` track the session as it happens, but `open`, `high`, `low`, `close` and `vwap` are omitted until the regular session opens, as those report official session prices. They appear from the open and remain through late trading.\n\nFor options snapshots, the early, regular and late trading changes use these sessions: early trading from 7:30 to 9:30 AM ET, the regular session from 9:30 AM to 4:00 PM ET (4:15 PM ET for some products, such as SPY and SPX options), and late trading from the end of the regular session to 5:00 PM ET. Only trades marked with the extended hours condition (EXHT, 248) count as early or late trading. Cboe's extended trading hours program covers selected equity options, so other contracts do not get an early or late trading change. Index options, such as SPX, SPXW and XSP, get the regular trading change only. A change field is omitted when the contract has no trade in that session on the current trading day, or when the price it is measured against is missing. A change of 0 is returned as 0.", "properties": { "change": { "description": "The value of the price change for the asset from the previous trading day.", @@ -51254,12 +51180,12 @@ "type": "string" }, "early_trading_change": { - "description": "Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close.", + "description": "Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close. For options, this is the price of the contract's last early trading trade today (7:30 to 9:30 AM ET, with the EXHT condition) minus `previous_close`.", "format": "double", "type": "number" }, "early_trading_change_percent": { - "description": "Today's early trading change as a percentage.", + "description": "Today's early trading change as a percentage of `previous_close`.", "format": "double", "type": "number" }, @@ -51268,13 +51194,22 @@ "format": "double", "type": "number" }, + "last_updated": { + "description": "The nanosecond timestamp of the last update to the session data. For stocks, it's set when the session resets at the start of each trading session and then advances with each trade; quotes don't update it. Returned for stocks, crypto, and forex snapshots, though it may be absent for inactive tickers.", + "format": "int64", + "type": "integer", + "x-polygon-go-type": { + "name": "INanoseconds", + "path": "github.com/polygon-io/ptime" + } + }, "late_trading_change": { - "description": "Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close.", + "description": "Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close. For options, this is the price of the contract's last late trading trade today (after the regular session and before 5:00 PM ET, with the EXHT condition) minus today's `close`.", "format": "double", "type": "number" }, "late_trading_change_percent": { - "description": "Today's late trading change as a percentage.", + "description": "Today's late trading change as a percentage of today's `close`.", "format": "double", "type": "number" }, @@ -51299,12 +51234,12 @@ "type": "number" }, "regular_trading_change": { - "description": "Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close.", + "description": "Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close. For options, while `market_status` is `open` this is the price of the contract's last regular session trade today minus `previous_close`. During late trading and after the close, it is today's `close` minus `previous_close`. It is omitted during early trading.", "format": "double", "type": "number" }, "regular_trading_change_percent": { - "description": "Today's regular trading change as a percentage.", + "description": "Today's regular trading change as a percentage of `previous_close`.", "format": "double", "type": "number" }, @@ -51312,6 +51247,11 @@ "description": "The trading volume for the asset for the day. A value of 0 means no trades have occurred yet in the current session.", "format": "double", "type": "number" + }, + "vwap": { + "description": "The volume weighted average price of the asset for the day. Only returned for stocks, crypto, and forex snapshots, and omitted when there's no day bar yet, such as for stocks before the regular market open or for tickers that haven't traded today.", + "format": "double", + "type": "number" } }, "type": "object",