Getting Started with Launchpad

Polygon Launchpad provides everything you need to connect your application to the financial markets. Use our best-in-class technology to access news, charts, history, corporate actions, and more for any security.

Launchpad

Authentication

Pass your API key in the query string like follows:

https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2020-06-01/2020-06-17?apiKey=*

Alternatively, you can add an Authorization header to the request with your API Key as the token in the following form:

Authorization: Bearer <token>

Edge User Insights

Use custom request headers to pass along info about the user, location, and user agent that originated each API call so that Launchpad can provide usage analytics, track trends, and alert you to any problems.

X-Polygon-Edge-ID (required) - An alias that you can use to correlate usage in Polygon back to an individual user of your application. This should be a string, unique for each individual user of your application who accesses data. We'll keep logs and trends associated with each individual edge user, but their true identity is known only to you. We also use this information to calculate your Monthly Active Users for billing.

This should be a string between 1 and 80 characters long.

X-Polygon-Edge-IP-Address (required) - The IP Address information of the edge user originating the call. We use this for location insights, and to help you monitor for abuse.

This should be a string in IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.

X-Polygon-Edge-User-Agent - The User Agent information of the edge user originating the call. This can be used to see trends across different platforms, or different versions of your client application.

This should be a string between 1 and 80 characters long.

Usage

Many of Polygon.io's REST endpoints allow you to extend query parameters with inequalities like date.lt=2021-01-01 (less than) and date.gte=2020-01-01 (greater than or equal to) to search ranges of values. You can also use the field name without any extension to query for exact equality. Fields that support extensions will have an "Additional filter parameters" dropdown beneath them in the docs that detail the supported extensions for that parameter.

Response Types

By default, all endpoints return a JSON response. To request a CSV response include 'Accept': 'text/csv' as a request parameter.


Aggregates (Bars)

get
/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}

Get aggregate bars for a cryptocurrency pair over a given date range in custom time window sizes.

For example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned.

Headers
This should be a string between 1 and 80 characters long.
This should be a string in IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.
This should be a string between 1 and 80 characters long.
Parameters

The ticker symbol of the currency pair.

The size of the timespan multiplier.

  • The size of the time window.

    The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.

    The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.

  • 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.

  • Sort the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return results in descending order (newest at the top).

    Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000. Read more about how limit is used to calculate aggregate results in our article on Aggregate Data API Improvements.

    https://api.polygon.io/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}?apiKey=*
  • Response Attributes
    ticker*string

    The exchange symbol that this item is traded under.


    adjusted*boolean

    Whether or not this response was adjusted for splits.


    queryCount*integer

    The number of aggregates (minute or day) used to generate the response.


    request_id*string

    A request id assigned by the server.


    resultsCount*integer

    The total number of results for this request.


    status*string

    The status of this request's response.


    resultsarray
    c*number

    The close price for the symbol in the given time period.


    h*number

    The highest price for the symbol in the given time period.


    l*number

    The lowest price for the symbol in the given time period.


    ninteger

    The number of transactions in the aggregate window.


    o*number

    The open price for the symbol in the given time period.


    t*integer

    The Unix Msec timestamp for the start of the aggregate window.


    v*number

    The trading volume of the symbol in the given time period.


    vwnumber

    The volume weighted average price.


    Was this helpful?
    Help us improve
    Response Object
    {
      "adjusted": true,
      "queryCount": 2,
      "request_id": "0cf72b6da685bcd386548ffe2895904a",
      "results": [
        {
          "c": 10094.75,
          "h": 10429.26,
          "l": 9490,
          "n": 1,
          "o": 9557.9,
          "t": 1590984000000,
          "v": 303067.6562332156,
          "vw": 9874.5529
        },
        {
          "c": 9492.62,
          "h": 10222.72,
          "l": 9135.68,
          "n": 1,
          "o": 10096.87,
          "t": 1591070400000,
          "v": 323339.6922892879,
          "vw": 9729.5701
        }
      ],
      "resultsCount": 2,
      "status": "OK",
      "ticker": "X:BTCUSD"
    }

    Summaries

    get
    /v1/summaries

    Get everything needed to visualize the tick-by-tick movement of a list of tickers.

    Headers
    This should be a string between 1 and 80 characters long.
    This should be a string in IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.
    This should be a string between 1 and 80 characters long.
    Parameters

    Comma separated list of tickers. This API currently supports Stocks/Equities, Crypto, Options, and Forex. See the tickers endpoint for more details on supported tickers. If no tickers are passed then no results will be returned.

    Warning: The maximum number of characters allowed in a URL are subject to your technology stack.

    https://api.polygon.io/v1/summaries?apiKey=*
    Response Attributes
    request_id*string

    resultsarray
    brandingobject
    icon_urlstring

    A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance. Note that you must provide an API key when accessing this URL. See the "Authentication" section at the top of this page for more details.


    logo_urlstring

    A link to this ticker's company's logo. Note that you must provide an API key when accessing this URL. See the "Authentication" section at the top of this page for more details.


    errorstring

    The error while looking for this ticker.


    last_updatedinteger

    The nanosecond timestamp of when this information was updated.


    market_statusstring

    The market status for the market that trades this ticker.


    messagestring

    The error message while looking for this ticker.


    namestring

    Name of ticker, forex, or crypto asset.


    optionsobject
    contract_type*enum [put, call, other]

    The type of contract. Can be "put", "call", or in some rare cases, "other".


    exercise_style*enum [american, european, bermudan]

    The exercise style of this contract. See this link for more details on exercise styles.


    expiration_date*string

    The contract's expiration date in YYYY-MM-DD format.


    shares_per_contract*number

    The number of shares per contract for this contract.


    strike_price*number

    The strike price of the option contract.


    underlying_ticker*string

    The ticker for the option contract.


    pricenumber

    The most up to date ticker price.


    sessionobject
    change*number

    The value of the price change for the asset from the previous trading day.


    change_percent*number

    The percent of the price change for the asset from the previous trading day.


    close*number

    The closing price of the asset for the day.


    early_trading_changenumber

    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.


    early_trading_change_percentnumber

    Today's early trading change as a percentage.


    high*number

    The highest price of the asset for the day.


    late_trading_changenumber

    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.


    late_trading_change_percentnumber

    Today's late trading change as a percentage.


    low*number

    The lowest price of the asset for the day.


    open*number

    The open price of the asset for the day.


    previous_close*number

    The closing price of the asset for the previous trading day.


    pricenumber

    The price of the most recent trade or bid price for this asset.


    regular_trading_changenumber

    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.


    regular_trading_change_percentnumber

    Today's regular trading change as a percentage.


    volumenumber

    The trading volume for the asset for the day.


    ticker*string

    Ticker of asset queried.


    typeenum [stocks, crypto, options, fx]

    The market for this ticker of stock, crypto, fx, option.


    status*string

    The status of this request's response.


    Was this helpful?
    Help us improve
    Response Object
    {
      "request_id": "abc123",
      "results": [
        {
          "branding": {
            "icon_url": "https://api.polygon.io/icon.png",
            "logo_url": "https://api.polygon.io/logo.svg"
          },
          "last_updated": 1679597116344223500,
          "market_status": "closed",
          "name": "Norwegian Cruise Lines",
          "price": 22.3,
          "session": {
            "change": -1.05,
            "change_percent": -4.67,
            "close": 21.4,
            "early_trading_change": -0.39,
            "early_trading_change_percent": -0.07,
            "high": 22.49,
            "late_trading_change": 1.2,
            "late_trading_change_percent": 3.92,
            "low": 21.35,
            "open": 22.49,
            "previous_close": 22.45,
            "volume": 37
          },
          "ticker": "NCLH",
          "type": "stocks"
        },
        {
          "last_updated": 1679597116344223500,
          "market_status": "closed",
          "name": "NCLH $5 Call",
          "options": {
            "contract_type": "call",
            "exercise_style": "american",
            "expiration_date": "2022-10-14",
            "shares_per_contract": 100,
            "strike_price": 5,
            "underlying_ticker": "NCLH"
          },
          "price": 6.6,
          "session": {
            "change": -0.05,
            "change_percent": -1.07,
            "close": 6.65,
            "early_trading_change": -0.01,
            "early_trading_change_percent": -0.03,
            "high": 7.01,
            "late_trading_change": -0.4,
            "late_trading_change_percent": -0.02,
            "low": 5.42,
            "open": 6.7,
            "previous_close": 6.71,
            "volume": 67
          },
          "ticker": "O:NCLH221014C00005000",
          "type": "options"
        },
        {
          "last_updated": 1679597116344223500,
          "market_status": "open",
          "name": "Euro - United States Dollar",
          "price": 0.97989,
          "session": {
            "change": -0.0001,
            "change_percent": -0.67,
            "close": 0.97989,
            "high": 0.98999,
            "low": 0.96689,
            "open": 0.97889,
            "previous_close": 0.98001
          },
          "ticker": "C:EURUSD",
          "type": "fx"
        },
        {
          "branding": {
            "icon_url": "https://api.polygon.io/icon.png",
            "logo_url": "https://api.polygon.io/logo.svg"
          },
          "last_updated": 1679597116344223500,
          "market_status": "open",
          "name": "Bitcoin - United States Dollar",
          "price": 32154.68,
          "session": {
            "change": -201.23,
            "change_percent": -0.77,
            "close": 32154.68,
            "high": 33124.28,
            "low": 28182.88,
            "open": 31129.32,
            "previous_close": 33362.18
          },
          "ticker": "X:BTCUSD",
          "type": "crypto"
        },
        {
          "error": "NOT_FOUND",
          "message": "Ticker not found.",
          "ticker": "APx"
        }
      ],
      "status": "OK"
    }

    Tickers

    get
    /v3/reference/tickers

    Query all ticker symbols which are supported by Polygon.io. This API currently includes Stocks/Equities, Indices, Forex, and Crypto.

    Headers
    This should be a string between 1 and 80 characters long.
    This should be a string in IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.
    This should be a string between 1 and 80 characters long.
    Parameters

    Specify a ticker symbol. Defaults to empty string which queries all tickers.

    ticker.gtgreater than
    ticker.gtegreater than or equal to
    ticker.ltless than
    ticker.lteless than or equal to
    Learn More
  • Specify the type of the tickers. Find the types that we support via our Ticker Types API. Defaults to empty string which queries all types.

  • Filter by market type. By default all markets are included.

    Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes at the ISO org website. Defaults to empty string which queries all exchanges.

    Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes at their website. Defaults to empty string which queries all CUSIPs.

    Note: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.

    Specify the CIK of the asset you want to search for. Find more information about CIK codes at their website. Defaults to empty string which queries all CIKs.

    Specify a point in time to retrieve tickers available on that date. Defaults to the most recent available date.

    Search for terms within the ticker and/or company name.

  • Specify if the tickers returned should be actively traded on the queried date. Default is true.

  • Order results based on the sort field.

    Limit the number of results returned, default is 100 and max is 1000.

  • Sort field used for ordering.

    https://api.polygon.io/v3/reference/tickers?apiKey=*
  • Response Attributes
    countinteger

    The total number of results for this request.


    next_urlstring

    If present, this value can be used to fetch the next page of data.


    request_idstring

    A request id assigned by the server.


    resultsarray

    An array of tickers that match your query.

    Note: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.

    activeboolean

    Whether or not the asset is actively traded. False means the asset has been delisted.


    cikstring

    The CIK number for this ticker. Find more information here.


    composite_figistring

    The composite OpenFIGI number for this ticker. Find more information here


    currency_namestring

    The name of the currency that this asset is traded with.


    delisted_utcstring

    The last date that the asset was traded.


    last_updated_utcstring

    The information is accurate up to this time.


    locale*enum [us, global]

    The locale of the asset.


    market*enum [stocks, crypto, fx, otc, indices]

    The market type of the asset.


    name*string

    The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.


    primary_exchangestring

    The ISO code of the primary listing exchange for this asset.


    share_class_figistring

    The share Class OpenFIGI number for this ticker. Find more information here


    ticker*string

    The exchange symbol that this item is traded under.


    typestring

    The type of the asset. Find the types that we support via our Ticker Types API.


    statusstring

    The status of this request's response.


    Was this helpful?
    Help us improve
    Response Object
    {
      "count": 1,
      "next_url": "https://api.polygon.io/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
      "request_id": "e70013d92930de90e089dc8fa098888e",
      "results": [
        {
          "active": true,
          "cik": "0001090872",
          "composite_figi": "BBG000BWQYZ5",
          "currency_name": "usd",
          "last_updated_utc": "2021-04-25T00:00:00Z",
          "locale": "us",
          "market": "stocks",
          "name": "Agilent Technologies Inc.",
          "primary_exchange": "XNYS",
          "share_class_figi": "BBG001SCTQY4",
          "ticker": "A",
          "type": "CS"
        }
      ],
      "status": "OK"
    }

    Market Holidays

    get
    /v1/marketstatus/upcoming

    Get upcoming market holidays and their open/close times.

    Headers
    This should be a string between 1 and 80 characters long.
    This should be a string in IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.
    This should be a string between 1 and 80 characters long.
    https://api.polygon.io/v1/marketstatus/upcoming?apiKey=*
    Response Attributes
    responsearray
    closestring

    The market close time on the holiday (if it's not closed).


    datestring

    The date of the holiday.


    exchangestring

    Which market the record is for.


    namestring

    The name of the holiday.


    openstring

    The market open time on the holiday (if it's not closed).


    statusstring

    The status of the market on the holiday.


    Was this helpful?
    Help us improve
    Response Object
    [
      {
        "date": "2020-11-26",
        "exchange": "NYSE",
        "name": "Thanksgiving",
        "status": "closed"
      },
      {
        "date": "2020-11-26",
        "exchange": "NASDAQ",
        "name": "Thanksgiving",
        "status": "closed"
      },
      {
        "date": "2020-11-26",
        "exchange": "OTC",
        "name": "Thanksgiving",
        "status": "closed"
      },
      {
        "close": "2020-11-27T18:00:00.000Z",
        "date": "2020-11-27",
        "exchange": "NASDAQ",
        "name": "Thanksgiving",
        "open": "2020-11-27T14:30:00.000Z",
        "status": "early-close"
      },
      {
        "close": "2020-11-27T18:00:00.000Z",
        "date": "2020-11-27",
        "exchange": "NYSE",
        "name": "Thanksgiving",
        "open": "2020-11-27T14:30:00.000Z",
        "status": "early-close"
      }
    ]

    Market Status

    get
    /v1/marketstatus/now

    Get the current trading status of the exchanges and overall financial markets.

    Headers
    This should be a string between 1 and 80 characters long.
    This should be a string in IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.
    This should be a string between 1 and 80 characters long.
    https://api.polygon.io/v1/marketstatus/now?apiKey=*
    Response Attributes
    afterHoursboolean

    Whether or not the market is in post-market hours.


    currenciesobject
    cryptostring

    The status of the crypto market.


    fxstring

    The status of the forex market.


    earlyHoursboolean

    Whether or not the market is in pre-market hours.


    exchangesobject
    nasdaqstring

    The status of the Nasdaq market.


    nysestring

    The status of the NYSE market.


    otcstring

    The status of the OTC market.


    indicesGroupsobject
    cccystring

    The status of Cboe Streaming Market Indices Cryptocurrency ("CCCY") indices trading hours.


    cgistring

    The status of Cboe Global Indices ("CGI") trading hours.


    dow_jonesstring

    The status of Dow Jones indices trading hours


    ftse_russellstring

    The status of Financial Times Stock Exchange Group ("FTSE") Russell indices trading hours.


    mscistring

    The status of Morgan Stanley Capital International ("MSCI") indices trading hours.


    mstarstring

    The status of Morningstar ("MSTAR") indices trading hours.


    mstarc

    The status of Morningstar Customer ("MSTARC") indices trading hours.


    nasdaqstring

    The status of National Association of Securities Dealers Automated Quotations ("Nasdaq") indices trading hours.


    s_and_pstring

    The status of Standard & Poors's ("S&P") indices trading hours.


    societe_generalestring

    The status of Societe Generale indices trading hours.


    marketstring

    The status of the market as a whole.


    serverTimestring

    The current time of the server, returned as a date-time in RFC3339 format.


    Was this helpful?
    Help us improve
    Response Object
    {
      "afterHours": true,
      "currencies": {
        "crypto": "open",
        "fx": "open"
      },
      "earlyHours": false,
      "exchanges": {
        "nasdaq": "extended-hours",
        "nyse": "extended-hours",
        "otc": "closed"
      },
      "market": "extended-hours",
      "serverTime": "2020-11-10T17:37:37-05:00"
    }

    Conditions

    get
    /v3/reference/conditions

    List all conditions that Polygon.io uses.

    Headers
    This should be a string between 1 and 80 characters long.
    This should be a string in IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.
    This should be a string between 1 and 80 characters long.
    Parameters
  • Filter for conditions within a given asset class.

  • Filter by data type.

    Filter for conditions with a given ID.

  • Filter by SIP. If the condition contains a mapping for that SIP, the condition will be returned.

  • Order results based on the sort field.

    Limit the number of results returned, default is 10 and max is 1000.

  • Sort field used for ordering.

    https://api.polygon.io/v3/reference/conditions?apiKey=*
  • Response Attributes
    count*integer

    The total number of results for this request.


    next_urlstring

    If present, this value can be used to fetch the next page of data.


    request_id*string

    A request ID assigned by the server.


    results*array

    An array of conditions that match your query.

    abbreviationstring

    A commonly-used abbreviation for this condition.


    asset_class*enum [stocks, options, crypto, fx]

    An identifier for a group of similar financial instruments.


    data_types*array [string]

    Data types that this condition applies to.


    descriptionstring

    A short description of the semantics of this condition.


    exchangeinteger

    If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute. In other words, data with this condition attached comes exclusively from the given exchange.


    id*integer

    An identifier used by Polygon.io for this condition. Unique per data type.


    legacyboolean

    If true, this condition is from an old version of the SIPs' specs and no longer is used. Other conditions may or may not reuse the same symbol as this one.


    name*string

    The name of this condition.


    sip_mapping*object

    A mapping to a symbol for each SIP that has this condition.

    CTAstring

    OPRAstring

    UTPstring

    type*enum [sale_condition, quote_condition, sip_generated_flag, financial_status_indicator, short_sale_restriction_indicator, settlement_condition, market_condition, trade_thru_exempt]

    An identifier for a collection of related conditions.


    update_rulesobject

    A list of aggregation rules.

    consolidated*object

    Describes aggregation rules on a consolidated (all exchanges) basis.

    updates_high_low*boolean

    Whether or not trades with this condition update the high/low.


    updates_open_close*boolean

    Whether or not trades with this condition update the open/close.


    updates_volume*boolean

    Whether or not trades with this condition update the volume.


    market_center*object

    Describes aggregation rules on a per-market-center basis.

    updates_high_low*boolean

    Whether or not trades with this condition update the high/low.


    updates_open_close*boolean

    Whether or not trades with this condition update the open/close.


    updates_volume*boolean

    Whether or not trades with this condition update the volume.


    status*string

    The status of this request's response.


    Was this helpful?
    Help us improve
    Response Object
    {
      "count": 1,
      "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
      "results": [
        {
          "asset_class": "stocks",
          "data_types": [
            "trade"
          ],
          "id": 2,
          "name": "Average Price Trade",
          "sip_mapping": {
            "CTA": "B",
            "UTP": "W"
          },
          "type": "condition",
          "update_rules": {
            "consolidated": {
              "updates_high_low": false,
              "updates_open_close": false,
              "updates_volume": true
            },
            "market_center": {
              "updates_high_low": false,
              "updates_open_close": false,
              "updates_volume": true
            }
          }
        }
      ],
      "status": "OK"
    }

    Exchanges

    get
    /v3/reference/exchanges

    List all exchanges that Polygon.io knows about.

    Headers
    This should be a string between 1 and 80 characters long.
    This should be a string in IPv4 dotted decimal ("192.0.2.1"), IPv6 ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.
    This should be a string between 1 and 80 characters long.
    Parameters
  • Filter by asset class.

  • Filter by locale.

    https://api.polygon.io/v3/reference/exchanges?apiKey=*
  • Response Attributes
    countinteger

    The total number of results for this request.


    request_id*string

    A request ID assigned by the server.


    resultsarray
    acronymstring

    A commonly used abbreviation for this exchange.


    asset_class*enum [stocks, options, crypto, fx]

    An identifier for a group of similar financial instruments.


    id*integer

    A unique identifier used by Polygon.io for this exchange.


    locale*enum [us, global]

    An identifier for a geographical location.


    micstring

    The Market Identifier Code of this exchange (see ISO 10383).


    name*string

    Name of this exchange.


    operating_micstring

    The MIC of the entity that operates this exchange.


    participant_idstring

    The ID used by SIP's to represent this exchange.


    type*enum [exchange, TRF, SIP]

    Represents the type of exchange.


    urlstring

    A link to this exchange's website, if one exists.


    status*string

    The status of this request's response.


    Was this helpful?
    Help us improve
    Response Object
    {
      "count": 1,
      "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
      "results": [
        {
          "acronym": "AMEX",
          "asset_class": "stocks",
          "id": 1,
          "locale": "us",
          "mic": "XASE",
          "name": "NYSE American, LLC",
          "operating_mic": "XNYS",
          "participant_id": "A",
          "type": "exchange",
          "url": "https://www.nyse.com/markets/nyse-american"
        }
      ],
      "status": "OK"
    }

    Crypto WebSocket Documentation

    The Launchpad Crypto WebSocket API provides streaming access to market data for Launchpad subscribers. You can specify which channels you want to consume by sending instructions in the form of actions. Our WebSockets emit events to notify you when an event has occurred in a channel you've subscribed to.

    Our WebSocket APIs are based on entitlements that control which WebSocket Clusters you can connect to and which kinds of data you can access. You can login to see examples that include your API key and are personalized to your entitlements.

    Step 1: Connect

    With a premium Crypto plan, you will be able to use a single connection to the Crypto Cluster. If another connection attempts to connect to the Crypto Cluster simultaneously, the current connection will be disconnected. If you need more simultaneous connections to this cluster, you can contact support.

    Connecting to a cluster:

    Real-time:wscat -c wss://launchpad.polygon.io/crypto

    On connection you will receive the following message:

    [{
    	"ev":"status",
    	"status":"connected",
    	"message": "Connected Successfully"
    }]

    Step 2: Authenticate

    You must authenticate before you can make any other requests.

    {"action":"auth","params":"********"}

    On successful authentication you will receive the following message:

    [{
    	"ev":"status",
    	"status":"auth_success",
    	"message": "authenticated"
    }]

    Step 3: Subscribe

    Once authenticated, you can request a stream. You can request multiple streams in the same request.

    {"action":"subscribe","params":"AM.LPL"}

    You can also request multiple streams from the same cluster.

    {"action":"subscribe","params":"AM.LPL,AM.MSFT"}

    Usage

    Things happen very quickly in the world of finance, which means a Polygon.io WebSocket client must be able to handle many incoming messages per second. Due to the nature of the WebSocket protocol, if a client is slow to consume messages from the server, Polygon.io's server must buffer messages and send them only as fast as the client can consume them. To help prevent the message buffer from getting too long, Polygon.io may send more than one JSON object in a single WebSocket message. We accomplish this by wrapping all messages in a JSON array, and adding more objects to the array if the message buffer is getting longer. For example, consider a WebSocket message with a single trade event in it:

    [{"ev":"LV","sym":"MSFT","val":215.9721,"t":1611082428813}]

    If your client is consuming a bit slow, or 2+ events happened in very short succession, you may receive a single WebSocket message with more than one event inside it, like this:

    [
    		{"ev":"LV","sym":"MSFT","val":215.9721,"t":1611082428813}, 
    		{"ev":"LV","sym":"MSFT","val":215.9893,"t":1611082428814}
    	]

    Note that if a client is consuming messages too slowly for too long, Polygon.io's server-side buffer may get too large. If that happens, Polygon.io will terminate the WebSocket connection. You can check your account dashboard to see if a connection was terminated as a slow consumer. If this happens to you consistently, consider subscribing to fewer symbols or channels.

    Aggregates (Per Minute)

    ws
    wss://launchpad.polygon.io/crypto

    Stream real-time per-minute crypto aggregates for a given crypto pair.

    Parameters

    Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs. You can also use a comma separated list to subscribe to multiple crypto pairs. You can retrieve active crypto tickers from our Crypto Tickers API.

    {"action":"subscribe", "params":"AM.{ticker}"}
    Response Attributes
    ev

    The event type.


    symstring

    The ticker symbol for the given stock.


    vinteger

    The tick volume.


    avinteger

    Today's accumulated volume.


    opnumber

    Today's official opening price.


    vwnumber

    The volume-weighted average value for the aggregate window.


    onumber

    The open price for the symbol in the given time period.


    cnumber

    The close price for the symbol in the given time period.


    hnumber

    The highest price for the symbol in the given time period.


    lnumber

    The lowest price for the symbol in the given time period.


    anumber

    Today's volume weighted average price.


    zinteger

    The average trade size for this aggregate window.


    sinteger

    The start timestamp of this aggregate window in Unix Milliseconds.


    einteger

    The end timestamp of this aggregate window in Unix Milliseconds.


    Was this helpful?
    Help us improve
    Response Object
    {
      "ev": "AM",
      "sym": "X:BTC-USD",
      "v": 951.6112,
      "av": 738.6112,
      "op": 26503.8,
      "vw": 26503.8,
      "o": 27503.8,
      "c": 27203.8,
      "h": 27893.8,
      "l": 26503.8,
      "a": 26503.8,
      "z": 10,
      "s": 1610463240000,
      "e": 1610463300000
    }

    Value

    ws
    wss://launchpad.polygon.io/crypto

    Real-time value for a given crypto ticker symbol.

    Parameters

    Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs. You can also use a comma separated list to subscribe to multiple crypto pairs. You can retrieve active crypto tickers from our Crypto Tickers API.

    {"action":"subscribe", "params":"LV.{ticker}"}
    Response Attributes
    evenum [LV]

    The event type.


    val

    The current value of the security.


    sym

    The ticker symbol for the given security.


    t

    The nanosecond timestamp.


    Was this helpful?
    Help us improve
    Response Object
    {
      "ev": "LV",
      "val": 33021.9,
      "sym": "X:BTC-USD",
      "t": 1610462007425
    }
    All data provided on Polygon is provided for informational purposes only, and is not intended for trading or investing purposes. Polygon provides all information as is. You must not redistribute information displayed on or provided by Polygon. Stock prices displayed in the ticker are from a subset of exchanges, this price does not represent the real-time price from the SIP.

    © Polygon.io, Inc