Polygon Options:aggregates API
The options:aggregates API from Polygon — 6 operation(s) for options:aggregates.
The options:aggregates API from Polygon — 6 operation(s) for options:aggregates.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/polygon-options-aggregates-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: The future of fintech.
title: Polygon Options:aggregates API
version: 1.0.0
servers:
- description: Polygon Platform API
url: https://api.polygon.io
- description: Polygon Platform API (Staging)
url: https://api.staging.polygon.io
security:
- apiKey: []
tags:
- name: options:aggregates
paths:
/v1/indicators/ema/{optionsTicker}:
x-polygon-ignore: true
get:
description: Get the exponential moving average (EMA) for a ticker symbol over a given time range.
operationId: OptionsEMA
parameters:
- description: The ticker symbol for which to get exponential moving average (EMA) data.
example: O:SPY241220P00720000
in: path
name: optionsTicker
required: true
schema:
type: string
x-polygon-go-id: Ticker
- description: Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.
in: query
name: timestamp
schema:
type: string
x-polygon-filter-field:
range: true
- description: The size of the aggregate time window.
example: day
in: query
name: timespan
schema:
default: day
enum:
- minute
- hour
- day
- week
- month
- quarter
- year
type: string
- description: 'Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.
Set this to false to get results that are NOT adjusted for splits.'
example: true
in: query
name: adjusted
schema:
default: true
type: boolean
- description: The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.
example: 50
in: query
name: window
schema:
default: 50
type: integer
- description: "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA)."
example: close
in: query
name: series_type
schema:
default: close
enum:
- open
- high
- low
- close
type: string
- description: Whether or not to include the aggregates used to calculate this indicator in the response.
in: query
name: expand_underlying
schema:
default: false
type: boolean
- description: The order in which to return the results, ordered by timestamp.
example: desc
in: query
name: order
schema:
default: desc
enum:
- asc
- desc
type: string
- description: Limit the number of results returned, default is 10 and max is 5000
in: query
name: limit
schema:
default: 10
maximum: 5000
type: integer
- description: Range by timestamp.
in: query
name: timestamp.gte
schema:
type: string
- description: Range by timestamp.
in: query
name: timestamp.gt
schema:
type: string
- description: Range by timestamp.
in: query
name: timestamp.lte
schema:
type: string
- description: Range by timestamp.
in: query
name: timestamp.lt
schema:
type: string
responses:
'200':
content:
application/json:
example:
next_url: https://api.polygon.io/v1/indicators/ema/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy
request_id: a47d1beb8c11b6ae897ab76cdbbf35a3
results:
underlying:
url: https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25
values:
- timestamp: 1517562000016
value: 140.139
status: OK
schema:
properties:
next_url:
description: If present, this value can be used to fetch the next page of data.
type: string
request_id:
description: A request id assigned by the server.
type: string
results:
description: The results of the EMA indicator calculation.
properties:
underlying:
description: The underlying aggregates used.
properties:
aggregates:
description: The array of aggregates used in the calculation of this indicator.
items:
properties:
c:
description: The close price for the symbol in the given time period.
format: float
type: number
h:
description: The highest price for the symbol in the given time period.
format: float
type: number
l:
description: The lowest price for the symbol in the given time period.
format: float
type: number
n:
description: The number of transactions in the aggregate window.
type: integer
o:
description: The open price for the symbol in the given time period.
format: float
type: number
otc:
description: Whether or not this aggregate is for an OTC ticker. This field will be left off if false.
type: boolean
t:
description: The Unix Msec timestamp for the start of the aggregate window.
format: float
type: number
v:
description: The trading volume of the symbol in the given time period.
format: float
type: number
vw:
description: The volume weighted average price.
format: float
type: number
required:
- v
- vw
- o
- c
- h
- l
- t
- n
type: object
x-polygon-go-type:
name: Aggregate
path: github.com/polygon-io/go-lib-models/v2/globals
type: array
url:
description: The URL which can be used to request the underlying aggregates used in this request.
type: string
type: object
values:
description: Timestamp or indicator value.
items:
properties:
timestamp:
description: The Unix Msec timestamp from the last aggregate used in this calculation.
format: int64
type: integer
x-polygon-go-type:
name: IMicroseconds
path: github.com/polygon-io/ptime
value:
description: The MACD line value, calculated as the difference between the short-term and long-term exponential moving averages (EMAs) based on the periods specified in the request parameters.
format: float
type: number
x-polygon-go-type:
name: '*float64'
type: object
type: array
type: object
x-polygon-go-type:
name: EMAResults
status:
description: The status of this request's response.
type: string
required:
- request_id
- status
- results
type: object
text/csv:
example: aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,286.1730473491824 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,285.60990642465924 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,285.023780156278 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,284.4137303667383 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,282.43007426223943 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.7141043158811 O:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,286.0778649309446 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,283.77878058578887 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,283.11791448724966 O:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.7544192473781
schema:
type: string
description: Exponential Moving Average (EMA) data for each period.
summary: Exponential Moving Average (EMA)
tags:
- options:aggregates
x-polygon-entitlement-data-type:
description: Aggregate data
name: aggregates
x-polygon-entitlement-market-type:
description: Options data
name: options
/v1/indicators/macd/{optionsTicker}:
x-polygon-ignore: true
get:
description: Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.
operationId: OptionsMACD
parameters:
- description: The ticker symbol for which to get MACD data.
example: O:SPY241220P00720000
in: path
name: optionsTicker
required: true
schema:
type: string
x-polygon-go-id: Ticker
- description: Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.
in: query
name: timestamp
schema:
type: string
x-polygon-filter-field:
range: true
- description: The size of the aggregate time window.
example: day
in: query
name: timespan
schema:
default: day
enum:
- minute
- hour
- day
- week
- month
- quarter
- year
type: string
- description: 'Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.
Set this to false to get results that are NOT adjusted for splits.'
example: true
in: query
name: adjusted
schema:
default: true
type: boolean
- description: The short window size used to calculate MACD data.
example: 12
in: query
name: short_window
schema:
default: 12
type: integer
- description: The long window size used to calculate MACD data.
example: 26
in: query
name: long_window
schema:
default: 26
type: integer
- description: The window size used to calculate the MACD signal line.
example: 9
in: query
name: signal_window
schema:
default: 9
type: integer
- description: "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD."
example: close
in: query
name: series_type
schema:
default: close
enum:
- open
- high
- low
- close
type: string
- description: Whether or not to include the aggregates used to calculate this indicator in the response.
in: query
name: expand_underlying
schema:
default: false
type: boolean
- description: The order in which to return the results, ordered by timestamp.
example: desc
in: query
name: order
schema:
default: desc
enum:
- asc
- desc
type: string
- description: Limit the number of results returned, default is 10 and max is 5000
in: query
name: limit
schema:
default: 10
maximum: 5000
type: integer
- description: Range by timestamp.
in: query
name: timestamp.gte
schema:
type: string
- description: Range by timestamp.
in: query
name: timestamp.gt
schema:
type: string
- description: Range by timestamp.
in: query
name: timestamp.lte
schema:
type: string
- description: Range by timestamp.
in: query
name: timestamp.lt
schema:
type: string
responses:
'200':
content:
application/json:
example:
next_url: https://api.polygon.io/v1/indicators/macd/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy
request_id: a47d1beb8c11b6ae897ab76cdbbf35a3
results:
underlying:
url: https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25
values:
- histogram: 38.3801666667
signal: 106.9811666667
timestamp: 1517562000016
value: 145.3613333333
- histogram: 41.098859136
signal: 102.7386283473
timestamp: 1517562001016
value: 143.8374874833
status: OK
schema:
properties:
next_url:
description: If present, this value can be used to fetch the next page of data.
type: string
request_id:
description: A request id assigned by the server.
type: string
results:
description: The results of the MACD indicator calculation.
properties:
underlying:
description: The underlying aggregates used.
properties:
aggregates:
description: The array of aggregates used in the calculation of this indicator.
items:
properties:
c:
description: The close price for the symbol in the given time period.
format: float
type: number
h:
description: The highest price for the symbol in the given time period.
format: float
type: number
l:
description: The lowest price for the symbol in the given time period.
format: float
type: number
n:
description: The number of transactions in the aggregate window.
type: integer
o:
description: The open price for the symbol in the given time period.
format: float
type: number
otc:
description: Whether or not this aggregate is for an OTC ticker. This field will be left off if false.
type: boolean
t:
description: The Unix Msec timestamp for the start of the aggregate window.
format: float
type: number
v:
description: The trading volume of the symbol in the given time period.
format: float
type: number
vw:
description: The volume weighted average price.
format: float
type: number
required:
- v
- vw
- o
- c
- h
- l
- t
- n
type: object
x-polygon-go-type:
name: Aggregate
path: github.com/polygon-io/go-lib-models/v2/globals
type: array
url:
description: The URL which can be used to request the underlying aggregates used in this request.
type: string
type: object
values:
description: 'Each entry in the values array represents MACD indicator data for a specific timestamp and includes:'
items:
properties:
histogram:
description: The difference between the MACD line (value) and the signal line (signal). Positive histogram values indicate upward (bullish) momentum, while negative histogram values indicate downward (bearish) momentum.
format: float
type: number
x-polygon-go-type:
name: '*float64'
signal:
description: The signal line value, calculated as the exponential moving average (EMA) of the MACD line (value) over the signal period defined in the request parameters. Traders typically use crossovers between the MACD and signal lines as trading signals.
format: float
type: number
x-polygon-go-type:
name: '*float64'
timestamp:
description: The Unix Msec timestamp from the last aggregate used in this calculation.
format: int64
type: integer
x-polygon-go-type:
name: IMicroseconds
path: github.com/polygon-io/ptime
value:
description: The MACD line value, calculated as the difference between the short-term and long-term exponential moving averages (EMAs) based on the periods specified in the request parameters.
format: float
type: number
x-polygon-go-type:
name: '*float64'
type: object
type: array
type: object
x-polygon-go-type:
name: MACDResults
status:
description: The status of this request's response.
type: string
required:
- request_id
- status
- results
type: object
text/csv:
example: 'aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram
O:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,-0.05105556065990413,3.5771695836806834,-3.6282251443405875
O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,4.047960862047148,5.247666286053219,-1.199705424006071
O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,5.255380647906861,6.466477305754766,-1.2110966578479045
O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,5.591072756938104,6.769251470216741,-1.178178713278637
O:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,1.4304642046162712,4.48422586976583,-3.053761665149559
O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,4.32835898317461,5.547592642054737,-1.2192336588801274
O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,4.623290999840208,5.852401056774768,-1.2291100569345605
O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,4.932483632022979,6.159678571008409,-1.2271949389854298
O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,5.93821326327344,7.063796148536399,-1.1255828852629595
O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,6.294916771166584,7.345191869852139,-1.050275098685555
'
schema:
type: string
description: Moving Average Convergence/Divergence (MACD) data for each period.
summary: Moving Average Convergence/Divergence (MACD)
tags:
- options:aggregates
x-polygon-entitlement-data-type:
description: Aggregate data
name: aggregates
x-polygon-entitlement-market-type:
description: Options data
name: options
/v1/indicators/rsi/{optionsTicker}:
x-polygon-ignore: true
get:
description: Get the relative strength index (RSI) for a ticker symbol over a given time range.
operationId: OptionsRSI
parameters:
- description: The ticker symbol for which to get relative strength index (RSI) data.
example: O:SPY241220P00720000
in: path
name: optionsTicker
required: true
schema:
type: string
x-polygon-go-id: Ticker
- description: Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.
in: query
name: timestamp
schema:
type: string
x-polygon-filter-field:
range: true
- description: The size of the aggregate time window.
example: day
in: query
name: timespan
schema:
default: day
enum:
- minute
- hour
- day
- week
- month
- quarter
- year
type: string
- description: 'Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.
Set this to false to get results that are NOT adjusted for splits.'
example: true
in: query
name: adjusted
schema:
default: true
type: boolean
- description: The window size used to calculate the relative strength index (RSI).
example: 14
in: query
name: window
schema:
default: 14
type: integer
- description: "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI)."
example: close
in: query
name: series_type
schema:
default: close
enum:
- open
- high
- low
- close
type: string
- description: Whether or not to include the aggregates used to calculate this indicator in the response.
in: query
name: expand_underlying
schema:
default: false
type: boolean
- description: The order in which to return the results, ordered by timestamp.
example: desc
in: query
name: order
schema:
default: desc
enum:
- asc
- desc
type: string
- description: Limit the number of results returned, default is 10 and max is 5000
in: query
name: limit
schema:
default: 10
maximum: 5000
type: integer
- description: Range by timestamp.
in: query
name: timestamp.gte
schema:
type: string
- description: Range by timestamp.
in: query
name: timestamp.gt
schema:
type: string
- description: Range by timestamp.
in: query
name: timestamp.lte
schema:
type: string
- description: Range by timestamp.
in: query
name: timestamp.lt
schema:
type: string
responses:
'200':
content:
application/json:
example:
next_url: https://api.polygon.io/v1/indicators/rsi/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy
request_id: a47d1beb8c11b6ae897ab76cdbbf35a3
results:
underlying:
url: https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25
values:
- timestamp: 1517562000016
value: 82.19
status: OK
schema:
properties:
next_url:
description: If present, this value can be used to fetch the next page of data.
type: string
request_id:
description: A request id assigned by the server.
type: string
results:
description: The results of the RSI indicator calculation.
properties:
underlying:
description: The underlying aggregates used.
properties:
aggregates:
description: The array of aggregates used in the calculation of this indicator.
items:
properties:
c:
description: The close price for the symbol in the given time period.
format: float
type: number
h:
description: The highest price for the symbol in the given time period.
format: float
type: number
l:
description: The lowest price for the symbol in the given time period.
format: float
type: number
n:
description: The number of transactions in the aggregate window.
type: integer
o:
description: The open price for the symbol in the given time period.
format: float
type: number
otc:
description: Whether or not this aggregate is for an OTC ticker. This field will be left off if false.
type: boolean
t:
description: The Unix Msec timestamp for the start of the aggregate window.
format: float
type: number
v:
description: The trading volume of the symbol in the given time period.
format: float
type: number
vw:
description: The volume weighted average price.
format: float
type: number
required:
- v
- vw
- o
- c
- h
- l
- t
- n
type: object
x-polygon-go-type:
name: Aggregate
path: github.com/polygon-io/go-lib-models/v2/globals
type: array
url:
description: The URL which can be used to request the underlying aggregates used in this request.
type: string
type: object
values:
# --- truncated at 32 KB (66 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/polygon/refs/heads/main/openapi/polygon-options-aggregates-api-openapi.yml