openapi: 3.2.0
info:
description: The future of fintech.
title: Polygon Crypto:open Close 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: crypto:open-close
paths:
/v1/open-close/crypto/{from}/{to}/{date}:
get:
description: 'Get the open, close prices of a cryptocurrency symbol on a certain day.
'
operationId: GetCryptoOpenClose
parameters:
- description: The "from" symbol of the pair.
example: BTC
in: path
name: from
required: true
schema:
type: string
- description: The "to" symbol of the pair.
example: USD
in: path
name: to
required: true
schema:
type: string
- description: The date of the requested open/close in the format YYYY-MM-DD.
example: '2023-01-09'
in: path
name: date
required: true
schema:
format: date
type: string
- description: 'Whether or not the results are adjusted for splits. By default, results are adjusted.
Set this to false to get results that are NOT adjusted for splits.
'
example: true
in: query
name: adjusted
schema:
type: boolean
responses:
'200':
content:
application/json:
example:
close: 11050.64
closingTrades:
- c:
- 2
i: '973323250'
p: 11050.64
s: 0.006128
t: 1602287999795
x: 4
- c:
- 1
i: '105717893'
p: 11049.4
s: 0.014
t: 1602287999659
x: 17
day: '2020-10-09T00:00:00.000Z'
isUTC: true
open: 10932.44
openTrades:
- c:
- 2
i: '511235746'
p: 10932.44
s: 0.002
t: 1602201600056
x: 1
- c:
- 2
i: '511235751'
p: 10923.76
s: 0.02
t: 1602201600141
x: 4
symbol: BTC-USD
schema:
properties:
close:
description: The close price for the symbol in the given time period.
format: double
type: number
closingTrades:
description: An array of results containing the requested data.
items:
properties:
c:
description: 'A list of condition codes.
'
items:
description: 'The condition code. These are the conditions of this message. See
[Condition Mappings](https://massive.com/docs/rest/stocks/market-operations/condition-codes)
for a mapping to exchange conditions.
'
type: integer
type: array
i:
description: 'The Trade ID which uniquely identifies a trade. These are unique per
combination of ticker, exchange, and TRF. For example: A trade for AAPL
executed on NYSE and a trade for AAPL executed on NASDAQ could potentially
have the same Trade ID.
'
type: string
p:
description: 'The price of the trade. This is the actual dollar value per whole share of
this trade. A trade of 100 shares with a price of $2.00 would be worth a
total dollar value of $200.00.
'
format: double
type: number
s:
description: 'The size of a trade (also known as volume).
'
format: double
type: number
t:
description: The Unix millisecond timestamp for the start of the aggregate window.
type: integer
x:
description: "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
type: integer
required:
- p
- s
- x
- c
- t
- i
type: object
type: array
day:
description: The date requested.
format: date
type: string
isUTC:
description: Whether or not the timestamps are in UTC timezone.
type: boolean
open:
description: The open price for the symbol in the given time period.
format: double
type: number
openTrades:
description: An array of results containing the requested data.
items:
properties:
c:
description: 'A list of condition codes.
'
items:
description: 'The condition code. These are the conditions of this message. See
[Condition Mappings](https://massive.com/docs/rest/stocks/market-operations/condition-codes)
for a mapping to exchange conditions.
'
type: integer
type: array
i:
description: 'The Trade ID which uniquely identifies a trade. These are unique per
combination of ticker, exchange, and TRF. For example: A trade for AAPL
executed on NYSE and a trade for AAPL executed on NASDAQ could potentially
have the same Trade ID.
'
type: string
p:
description: 'The price of the trade. This is the actual dollar value per whole share of
this trade. A trade of 100 shares with a price of $2.00 would be worth a
total dollar value of $200.00.
'
format: double
type: number
s:
description: 'The size of a trade (also known as volume).
'
format: double
type: number
t:
description: The Unix millisecond timestamp for the start of the aggregate window.
type: integer
x:
description: "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n"
type: integer
required:
- p
- s
- x
- c
- t
- i
type: object
type: array
symbol:
description: The symbol pair that was evaluated from the request.
type: string
required:
- symbol
- isUTC
- day
- open
- close
- openTrades
- closingTrades
type: object
text/csv:
example: 'isUTC,day,open,close,openTrades,closingTrades
true,2020-10-09,10932.44,11050.64,"[{\"s\":0.002,\"p\":10932.44,\"x\":1,\"t\":1602201600056,\"c\":[2],\"i\":\"511235746\"},{\"s\":0.02,\"p\":10923.76,\"x\":4,\"t\":1602201600141,\"c\":[2],\"i\":\"511235751\"}]","[{\"s\":0.006128,\"p\":11050.64,\"x\":4,\"t\":1602287999795,\"c\":[2],\"i\":\"973323250\"},{\"s\":0.014,\"p\":11049.4,\"x\":17,\"t\":1602287999659,\"c\":[1],\"i\":\"105717893\"}]"
'
schema:
type: string
description: The open/close of this symbol.
default:
description: Unexpected error
summary: Daily Open/Close
tags:
- crypto:open-close
x-polygon-entitlement-data-type:
description: Aggregate data
name: aggregates
x-polygon-entitlement-market-type:
description: Crypto data
name: crypto
components:
securitySchemes:
apiKey:
in: query
name: apiKey
type: apiKey
x-polygon-order:
crypto:
market:
- launchpad: shared
paths:
- /v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}
- launchpad: exclusive
paths:
- /v1/summaries
- paths:
- /v2/aggs/grouped/locale/global/market/crypto/{date}
- paths:
- /v1/open-close/crypto/{from}/{to}/{date}
- paths:
- /v2/aggs/ticker/{cryptoTicker}/prev
- paths:
- /v3/trades/{cryptoTicker}
- paths:
- /v1/historic/crypto/{from}/{to}/{date}
- paths:
- /v1/last/crypto/{from}/{to}
- group: Snapshots
paths:
- /v2/snapshot/locale/global/markets/crypto/tickers
- /v2/snapshot/locale/global/markets/crypto/{direction}
- /v2/snapshot/locale/global/markets/crypto/tickers/{ticker}
- /v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book
- /v3/snapshot
- group: Technical Indicators
paths:
- /v1/indicators/sma/{cryptoTicker}
- /v1/indicators/ema/{cryptoTicker}
- /v1/indicators/macd/{cryptoTicker}
- /v1/indicators/rsi/{cryptoTicker}
reference:
- paths:
- /v3/reference/tickers
- paths:
- /v1/marketstatus/upcoming
- paths:
- /v1/marketstatus/now
- paths:
- /v3/reference/conditions
- paths:
- /v3/reference/exchanges
fx:
market:
- launchpad: shared
paths:
- /v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}
- launchpad: exclusive
paths:
- /v1/summaries
- paths:
- /v2/aggs/grouped/locale/global/market/fx/{date}
- paths:
- /v2/aggs/ticker/{forexTicker}/prev
- paths:
- /v3/quotes/{fxTicker}
- paths:
- /v1/historic/forex/{from}/{to}/{date}
- paths:
- /v1/last_quote/currencies/{from}/{to}
- paths:
- /v1/conversion/{from}/{to}
- group: Snapshots
paths:
- /v2/snapshot/locale/global/markets/forex/tickers
- /v2/snapshot/locale/global/markets/forex/{direction}
- /v2/snapshot/locale/global/markets/forex/tickers/{ticker}
- /v3/snapshot
- group: Technical Indicators
paths:
- /v1/indicators/sma/{fxTicker}
- /v1/indicators/ema/{fxTicker}
- /v1/indicators/macd/{fxTicker}
- /v1/indicators/rsi/{fxTicker}
reference:
- paths:
- /v3/reference/tickers
- paths:
- /v1/marketstatus/upcoming
- paths:
- /v1/marketstatus/now
- paths:
- /v3/reference/conditions
- paths:
- /v3/reference/exchanges
indices:
market:
- launchpad: shared
paths:
- /v2/aggs/ticker/{indicesTicker}/range/{multiplier}/{timespan}/{from}/{to}
- paths:
- /v2/aggs/ticker/{indicesTicker}/prev
- paths:
- /v1/open-close/{indicesTicker}/{date}
- group: Technical Indicators
paths:
- /v1/indicators/sma/{indicesTicker}
- /v1/indicators/ema/{indicesTicker}
- /v1/indicators/macd/{indicesTicker}
- /v1/indicators/rsi/{indicesTicker}
- group: Snapshots
paths:
- /v3/snapshot/indices
- /v3/snapshot
reference:
- paths:
- /v3/reference/tickers
- paths:
- /v3/reference/tickers/types
- paths:
- /v1/marketstatus/upcoming
- paths:
- /v1/marketstatus/now
options:
market:
- launchpad: shared
paths:
- /v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}
- launchpad: exclusive
paths:
- /v1/summaries
- paths:
- /v1/open-close/{optionsTicker}/{date}
- paths:
- /v2/aggs/ticker/{optionsTicker}/prev
- paths:
- /v3/trades/{optionsTicker}
- paths:
- /v2/last/trade/{optionsTicker}
- paths:
- /v3/quotes/{optionsTicker}
- group: Snapshots
paths:
- /v3/snapshot/options/{underlyingAsset}/{optionContract}
- /v3/snapshot/options/{underlyingAsset}
- /v3/snapshot
- group: Technical Indicators
paths:
- /v1/indicators/sma/{optionsTicker}
- /v1/indicators/ema/{optionsTicker}
- /v1/indicators/macd/{optionsTicker}
- /v1/indicators/rsi/{optionsTicker}
reference:
- paths:
- /v3/reference/options/contracts/{options_ticker}
- paths:
- /v3/reference/options/contracts
- paths:
- /v3/reference/tickers
- paths:
- /v1/meta/symbols/{stocksTicker}/company
- paths:
- /v3/reference/tickers/{ticker}
- paths:
- /v2/reference/news
- paths:
- /v3/reference/tickers/types
- paths:
- /v1/marketstatus/upcoming
- paths:
- /v1/marketstatus/now
- paths:
- /v3/reference/conditions
- paths:
- /v3/reference/exchanges
stocks:
market:
- launchpad: shared
paths:
- /v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}
- launchpad: exclusive
paths:
- /v1/summaries
- paths:
- /v2/aggs/grouped/locale/us/market/stocks/{date}
- paths:
- /v1/open-close/{stocksTicker}/{date}
- paths:
- /v2/aggs/ticker/{stocksTicker}/prev
- paths:
- /v3/trades/{stockTicker}
- paths:
- /v2/ticks/stocks/trades/{ticker}/{date}
- paths:
- /v2/last/trade/{stocksTicker}
- paths:
- /v3/quotes/{stockTicker}
- paths:
- /v2/ticks/stocks/nbbo/{ticker}/{date}
- paths:
- /v2/last/nbbo/{stocksTicker}
- group: Snapshots
paths:
- /v2/snapshot/locale/us/markets/stocks/tickers
- /v2/snapshot/locale/us/markets/stocks/{direction}
- /v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}
- /v3/snapshot
- group: Technical Indicators
paths:
- /v1/indicators/sma/{stockTicker}
- /v1/indicators/ema/{stockTicker}
- /v1/indicators/macd/{stockTicker}
- /v1/indicators/rsi/{stockTicker}
reference:
- paths:
- /v3/reference/tickers
- paths:
- /v1/meta/symbols/{stocksTicker}/company
- paths:
- /v3/reference/tickers/{ticker}
- paths:
- /vX/reference/tickers/{id}/events
- paths:
- /v2/reference/news
- paths:
- /v3/reference/tickers/types
- paths:
- /vX/reference/tickers/taxonomies
- paths:
- /v1/marketstatus/upcoming
- paths:
- /v1/marketstatus/now
- group: SEC Filings
paths:
- /v1/reference/sec/filings
- /v1/reference/sec/filings/{filing_id}
- /v1/reference/sec/filings/{filing_id}/files
- /v1/reference/sec/filings/{filing_id}/files/{file_id}
- paths:
- /v3/reference/splits
- paths:
- /v3/reference/dividends
- paths:
- /vX/reference/financials
- paths:
- /v3/reference/conditions
- paths:
- /v3/reference/exchanges
- paths:
- /v1/related-companies/{ticker}
- paths:
- /vX/reference/ipos
- paths:
- /vX/reference/short-interest/{identifier_type}/{identifier}
- paths:
- stocks/vX/listings
- stocks/vX/listing/{identifier_type}/{identifier}
- stocks/vX/listings/updates