{"openapi":"3.0.0","info":{"title":"Market Data API","description":"Access real-time and historical market data for US equities, options, crypto, and foreign exchange data through the Alpaca REST and WebSocket APIs. There are APIs for Stock Pricing, Option Pricing, Crypto Pricing, Forex, Logos, Fixed income, Corporate Actions, Screener, and News.\n","version":"1.1","contact":{"name":"Alpaca Support","email":"support@alpaca.markets","url":"https://alpaca.markets/support"},"termsOfService":"https://s3.amazonaws.com/files.alpaca.markets/disclosures/library/TermsAndConditions.pdf","license":{"name":"Creative Commons Attribution Share Alike 4.0 International","url":"https://spdx.org/licenses/CC-BY-SA-4.0.html"}},"servers":[{"description":"Production","url":"https://data.alpaca.markets"},{"description":"Sandbox","url":"https://data.sandbox.alpaca.markets"}],"security":[{"apiKey":[],"apiSecret":[]}],"tags":[{"name":"Stock","description":"Endpoints for stocks."},{"name":"Option","description":"Endpoints for option data."},{"name":"Crypto","description":"Endpoints for cryptocurrencies."},{"name":"Crypto perpetual futures","description":"Endpoints for crypto perpetual futures."},{"name":"Fixed income","description":"Endpoints for fixed income data."},{"name":"Forex","description":"Endpoints for forex currency rates."},{"name":"Logos","description":"Endpoints for getting company logo images."},{"name":"Screener","description":"Endpoints for most active stocks and top movers."},{"name":"News","description":"Endpoints for getting news articles about the stock market."},{"name":"Corporate actions","description":"Corporate actions (splits, dividends, etc.)."}],"paths":{"/v1/corporate-actions":{"get":{"summary":"Corporate actions","tags":["Corporate actions"],"parameters":[{"$ref":"#/components/parameters/cas_symbols"},{"$ref":"#/components/parameters/cas_cusips"},{"$ref":"#/components/parameters/cas_types"},{"$ref":"#/components/parameters/cas_start"},{"$ref":"#/components/parameters/cas_end"},{"$ref":"#/components/parameters/cas_ids"},{"$ref":"#/components/parameters/cas_limit"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/corporate_actions_resp"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CorporateActions","description":"This endpoint provides data about the corporate actions for each given symbol over a specified time period.\n"}},"/v1beta1/fixed_income/latest/prices":{"get":{"summary":"Latest prices","tags":["Fixed income"],"parameters":[{"$ref":"#/components/parameters/isins"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/fixed_income_latest_prices_resp"},"examples":{"prices":{"value":{"prices":{"US912797KJ59":{"t":"2025-02-14T20:58:00.648Z","p":99.6459,"ytm":4.249,"ytw":4.249},"US912797KS58":{"t":"2025-02-14T20:58:00.648Z","p":99.3193,"ytm":4.2245,"ytw":4.2245},"US912797LB15":{"t":"2025-02-14T20:58:00.648Z","p":98.9927,"ytm":4.2165,"ytw":4.2165}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"FixedIncomeLatestPrices","description":"This endpoint returns the latest prices for the given fixed income securities.\n"}},"/v1beta1/forex/latest/rates":{"get":{"summary":"Latest rates for currency pairs","tags":["Forex"],"parameters":[{"$ref":"#/components/parameters/forex_currency_pairs"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/forex_latest_rates_resp"},"examples":{"USDJPY":{"value":{"rates":{"USDJPY":{"bp":127.752,"mp":127.779,"ap":128.112,"t":"2022-05-20T05:38:41.311530885Z"}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"LatestRates","description":"Get the latest forex rates for the given currency pairs.\n"}},"/v1beta1/forex/rates":{"get":{"summary":"Historical rates for currency pairs","tags":["Forex"],"parameters":[{"$ref":"#/components/parameters/forex_currency_pairs"},{"$ref":"#/components/parameters/forex_timeframe"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/page_token"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/forex_rates_resp"},"examples":{"USDJPY":{"value":{"next_page_token":"VVNESlBZfDIwMjItMDEtMDNUMDA6MDM6MDBa","rates":{"USDJPY":[{"bp":114.192,"mp":115.144,"ap":115.18,"t":"2022-01-03T00:01:00Z"},{"bp":114.189,"mp":115.138,"ap":115.185,"t":"2022-01-03T00:02:00Z"},{"bp":115.122,"mp":115.131,"ap":115.148,"t":"2022-01-03T00:03:00Z"}]}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"Rates","description":"Get historical forex rates for the given currency pairs in the given time interval and at the given timeframe (snapshot frequency).\n"}},"/v1beta1/logos/{symbol}":{"get":{"summary":"Logos","tags":["Logos"],"parameters":[{"$ref":"#/components/parameters/symbol"},{"name":"placeholder","in":"query","schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"Logos","description":"Get the image of the company logo for the given symbol."}},"/v1beta1/news":{"get":{"summary":"News articles","parameters":[{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/news_sort"},{"name":"symbols","in":"query","schema":{"type":"string","example":"AAPL,TSLA,BTCUSD"},"description":"A comma-separated list of symbols for which to query news."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50},"description":"Limit of news items to be returned for a result page.","example":10},{"name":"include_content","in":"query","schema":{"type":"boolean"},"description":"Boolean indicator to include content for news articles (if available)."},{"name":"exclude_contentless","in":"query","schema":{"type":"boolean"},"description":"Boolean indicator to exclude news articles that do not contain content."},{"$ref":"#/components/parameters/page_token"}],"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"news-response-example":{"value":{"news":[{"id":24843171,"headline":"Apple Leader in Phone Sales in China for Second Straight Month in November With 23.6% Share, According to Market Research Data","author":"Charles Gross","created_at":"2021-12-31T11:08:42Z","updated_at":"2021-12-31T11:08:43Z","summary":"This headline-only article is meant to show you why a stock is moving, the most difficult aspect of stock trading","content":"<p>This headline-only article is meant to show you why a stock is moving, the most difficult aspect of stock trading....</p>","url":"https://www.benzinga.com/news/21/12/24843171/apple-leader-in-phone-sales-in-china-for-second-straight-month-in-november-with-23-6-share-according","images":[],"symbols":["AAPL"],"source":"benzinga"}],"next_page_token":"MTY0MDk0ODkyMzAwMDAwMDAwMHwyNDg0MzE3MQ=="}}},"schema":{"$ref":"#/components/schemas/news_resp"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"News","description":"Returns the latest news articles across stocks and crypto. By default, returns the latest 10 news articles.\n","tags":["News"]}},"/v1beta1/options/bars":{"get":{"summary":"Historical bars","tags":["Option"],"parameters":[{"$ref":"#/components/parameters/option_symbols"},{"$ref":"#/components/parameters/timeframe"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/option_bars_resp"},"examples":{"bars":{"value":{"bars":{"AAPL240419P00140000":[{"t":"2024-01-18T05:00:00Z","o":0.38,"h":0.38,"l":0.34,"c":0.34,"v":12,"n":7,"vw":0.3525}]},"next_page_token":"QUFQTHxNfDIwMjItMDEtMDNUMDk6MDA6MDAuMDAwMDAwMDAwWg=="}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"optionBars","description":"The historical option bars API provides aggregates for a list of option symbols between the specified dates.\n\nThe returned results are sorted by symbol first, then by bar timestamp.\nThis means that you are likely to see only one symbol in your first response if there are enough bars for that symbol to hit the limit you requested.\n\nIn these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any bars were found for them."}},"/v1beta1/options/meta/conditions/{ticktype}":{"get":{"summary":"Condition codes","tags":["Option"],"parameters":[{"name":"ticktype","in":"path","description":"The type of ticks.","required":true,"schema":{"type":"string","enum":["trade","quote"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/option_conditions"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"OptionMetaConditions","description":"Returns the mapping between the condition codes and names."}},"/v1beta1/options/meta/exchanges":{"get":{"summary":"Exchange codes","tags":["Option"],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/option_exchanges"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"OptionMetaExchanges","description":"Returns the mapping between the option exchange codes and the corresponding exchanges names."}},"/v1beta1/options/quotes/latest":{"get":{"summary":"Latest quotes","tags":["Option"],"parameters":[{"$ref":"#/components/parameters/option_symbols"},{"$ref":"#/components/parameters/option_feed"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/option_latest_quotes_resp"},"examples":{"quotes":{"value":{"quotes":{"AAPL240419P00140000":{"t":"2024-02-28T15:30:28.046330624Z","ax":"w","ap":0.16,"as":669,"bx":"W","bp":0.15,"bs":164,"c":"A"},"AAPL250321C00190000":{"t":"2024-02-28T15:47:13.663636224Z","ax":"X","ap":17,"as":622,"bx":"X","bp":16.75,"bs":368,"c":" "}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"OptionLatestQuotes","description":"The latest multi-quotes endpoint provides the latest bid and ask prices for each given contract symbol.\n"}},"/v1beta1/options/snapshots":{"get":{"summary":"Snapshots","tags":["Option"],"parameters":[{"$ref":"#/components/parameters/option_symbols"},{"$ref":"#/components/parameters/option_feed"},{"$ref":"#/components/parameters/option_updated_since"},{"$ref":"#/components/parameters/option_limit"},{"$ref":"#/components/parameters/page_token"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/option_snapshots_resp"},"examples":{"snapshots":{"value":{"snapshots":{"AAPL240426C00162500":{"greeks":{"delta":0.7521304109871954,"gamma":0.06241426404871288,"rho":0.009910739032549095,"theta":-0.2847623059595503,"vega":0.047540520834498785},"impliedVolatility":0.3372405712050441,"latestQuote":{"ap":4.3,"as":91,"ax":"B","bp":4.15,"bs":16,"bx":"C","c":"A","t":"2024-04-22T19:59:59.992734208Z"},"latestTrade":{"c":"I","p":4.1,"s":1,"t":"2024-04-22T19:57:32.589554432Z","x":"A"}}},"next_page_token":null}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"OptionSnapshots","description":"The snapshots endpoint provides the latest trade, latest quote and greeks for each given contract symbol.\n"}},"/v1beta1/options/snapshots/{underlying_symbol}":{"get":{"summary":"Option chain","tags":["Option"],"parameters":[{"$ref":"#/components/parameters/option_underlying_symbol"},{"$ref":"#/components/parameters/option_feed"},{"$ref":"#/components/parameters/option_limit"},{"$ref":"#/components/parameters/option_updated_since"},{"$ref":"#/components/parameters/page_token"},{"name":"type","in":"query","description":"Filter contracts by the type (call or put).","schema":{"type":"string","enum":["call","put"]}},{"name":"strike_price_gte","in":"query","description":"Filter contracts with strike price greater than or equal to the specified value.","schema":{"type":"number","format":"double"}},{"name":"strike_price_lte","in":"query","description":"Filter contracts with strike price less than or equal to the specified value.","schema":{"type":"number","format":"double"}},{"name":"expiration_date","in":"query","description":"Filter contracts by the exact expiration date (format: YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"expiration_date_gte","in":"query","description":"Filter contracts with expiration date greater than or equal to the specified date.","schema":{"type":"string","format":"date"}},{"name":"expiration_date_lte","in":"query","description":"Filter contracts with expiration date less than or equal to the specified date.","schema":{"type":"string","format":"date"}},{"name":"root_symbol","in":"query","description":"Filter contracts by the root symbol.","schema":{"type":"string"},"example":"AAPL1"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/option_snapshots_resp"},"examples":{"snapshots":{"value":{"snapshots":{"AAPL240426C00162500":{"greeks":{"delta":0.7521304109871954,"gamma":0.06241426404871288,"rho":0.009910739032549095,"theta":-0.2847623059595503,"vega":0.047540520834498785},"impliedVolatility":0.3372405712050441,"latestQuote":{"ap":4.3,"as":91,"ax":"B","bp":4.15,"bs":16,"bx":"C","c":"A","t":"2024-04-22T19:59:59.992734208Z"},"latestTrade":{"c":"I","p":4.1,"s":1,"t":"2024-04-22T19:57:32.589554432Z","x":"A"}}},"next_page_token":null}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"OptionChain","description":"The option chain endpoint provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol.\n"}},"/v1beta1/options/trades":{"get":{"summary":"Historical trades","tags":["Option"],"parameters":[{"$ref":"#/components/parameters/option_symbols"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/option_trades_resp"},"examples":{"trades":{"value":{"trades":{"AAPL240112C00182500":[{"t":"2024-01-18T15:03:44.56339456Z","x":"B","p":0.37,"s":1,"c":"I"},{"t":"2024-01-18T16:02:38.994758144Z","x":"C","p":0.34,"s":1,"c":"g"}]},"next_page_token":"QUFQTHwyMDIyLTAxLTAzVDA5OjAwOjAwLjI0NDgzOTY4MFp8UHwwOTIyMzM3MjAzNjg1NDc3NTgxMA=="}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"OptionTrades","description":"The historical option trades API provides trade data for a list of contract symbols between the specified dates.\n\nThe returned results are sorted by symbol first then by trade timestamp.\nThis means that you are likely to see only one symbol in your first response if there are enough trades for that symbol to hit the limit you requested.\n\nIn these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any trades were found for them."}},"/v1beta1/options/trades/latest":{"get":{"summary":"Latest trades","tags":["Option"],"parameters":[{"$ref":"#/components/parameters/option_symbols"},{"$ref":"#/components/parameters/option_feed"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/option_latest_trades_resp"},"examples":{"trades":{"value":{"trades":{"AAPL250321C00190000":{"t":"2024-02-28T15:26:12.728701696Z","x":"B","p":17.15,"s":900,"c":"e"}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"OptionLatestTrades","description":"The latest multi-trades endpoint provides the latest historical trade data for multiple given contract symbols.\n"}},"/v1beta1/screener/stocks/most-actives":{"get":{"summary":"Most active stocks","tags":["Screener"],"parameters":[{"$ref":"#/components/parameters/most_actives_by"},{"$ref":"#/components/parameters/most_actives_top"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/most_actives_resp"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"MostActives","description":"Returns the most active stocks by volume or trade count based on real time SIP data. By default, returns the top 10 symbols by volume.\n"}},"/v1beta1/screener/{market_type}/movers":{"get":{"summary":"Top market movers","tags":["Screener"],"parameters":[{"$ref":"#/components/parameters/movers_market_type"},{"$ref":"#/components/parameters/movers_top"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/movers_resp"},"examples":{"movers":{"value":{"gainers":[{"symbol":"AGRI","percent_change":145.56,"change":2.46,"price":4.15},{"symbol":"GRCYW","percent_change":85.63,"change":0.03,"price":0.0594}],"losers":[{"symbol":"MTACW","percent_change":-63.07,"change":-0.26,"price":0.1502},{"symbol":"TIG","percent_change":-51.21,"change":-3.61,"price":3.435}],"market_type":"stocks","last_updated":"2022-03-10T17:53:30.088309839Z"}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"Movers","description":"Returns the top market movers (gainers and losers) based on real time SIP data.\nThe change for each symbol is calculated from the previous closing price and the latest closing price.\n\nFor stocks, the endpoint resets at market open. Until then, it shows the previous market day's movers.\nThe data is split-adjusted. Only tradable symbols in exchanges are included.\n\nFor crypto, the endpoint resets at midnight."}},"/v1beta1/crypto-perps/{loc}/latest/bars":{"get":{"summary":"Latest bars","tags":["Crypto perpetual futures"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_perp_loc"},{"$ref":"#/components/parameters/crypto_perp_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_latest_bars_resp"},"examples":{"bars":{"value":{"bars":{"BTCUSDT.P":{"t":"2022-05-27T10:18:00Z","o":28999,"h":29003,"l":28999,"c":29003,"v":0.01,"n":4,"vw":29001}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoPerpLatestBars","description":"The latest bars endpoint returns the latest bar data for the crypto perpetual futures symbols provided.\n"}},"/v1beta1/crypto-perps/{loc}/latest/pricing":{"get":{"summary":"Latest pricing","tags":["Crypto perpetual futures"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_perp_loc"},{"$ref":"#/components/parameters/crypto_perp_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_perp_latest_futures_pricing_resp"},"examples":{"pricing":{"value":{"pricing":{"BTCUSDT.P":{"t":"2022-05-27T10:18:00Z","ft":"2022-05-27T10:18:00Z","oi":90.7367,"ip":50702.8,"mp":50652.3553,"fr":0.000565699}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoPerpLatestFuturesPricing","description":"The latest futures pricing endpoint returns the latest pricing data for the crypto perpetual futures symbols provided.\n"}},"/v1beta1/crypto-perps/{loc}/latest/orderbooks":{"get":{"summary":"Latest orderbook","tags":["Crypto perpetual futures"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_perp_loc"},{"$ref":"#/components/parameters/crypto_perp_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_latest_orderbooks_resp"},"examples":{"orderbooks":{"value":{"orderbooks":{"BTCUSDT.P":{"t":"2022-06-24T08:00:14.137774336Z","b":[{"p":20846,"s":0.1902},{"p":20350,"s":0}],"a":[{"p":20902,"s":0.0097},{"p":21444,"s":0}]}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoPerpLatestOrderbooks","description":"The latest orderbook endpoint returns the latest bid and ask orderbook for the crypto perpetual futures symbols provided.\n"}},"/v1beta1/crypto-perps/{loc}/latest/quotes":{"get":{"summary":"Latest quotes","tags":["Crypto perpetual futures"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_perp_loc"},{"$ref":"#/components/parameters/crypto_perp_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_latest_quotes_resp"},"examples":{"quotes":{"value":{"quotes":{"ETHUSDT.P":{"t":"2022-05-26T11:47:18.499478272Z","bp":1817,"bs":4.76,"ap":1817.7,"as":6.137},"BTCUSDT.P":{"t":"2022-05-26T11:47:18.44347136Z","bp":29058,"bs":0.3544,"ap":29059,"as":3.252}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoPerpLatestQuotes","description":"The latest quotes endpoint returns the latest bid and ask prices for the crypto perpetual futures symbols provided.\n"}},"/v1beta1/crypto-perps/{loc}/latest/trades":{"get":{"summary":"Latest trades","tags":["Crypto perpetual futures"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_perp_loc"},{"$ref":"#/components/parameters/crypto_perp_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_latest_trades_resp"},"examples":{"trades":{"value":{"trades":{"BTCUSDT.P":{"t":"2022-05-18T12:01:00.537052Z","p":29791,"s":0.0016,"tks":"S","i":31455289},"ETHUSDT.P":{"t":"2022-05-18T12:01:00.363547Z","p":2027.6,"s":0.06,"tks":"S","i":31455287}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoPerpLatestTrades","description":"The latest trades endpoint returns the latest trade data for the crypto perpetual futures symbols provided.\n"}},"/v1beta3/crypto/{loc}/bars":{"get":{"summary":"Historical bars","tags":["Crypto"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_loc"},{"$ref":"#/components/parameters/crypto_symbols"},{"$ref":"#/components/parameters/timeframe"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_bars_resp"},"examples":{"bars":{"value":{"bars":{"BTC/USD":[{"t":"2022-05-27T10:18:00Z","o":28999,"h":29003,"l":28999,"c":29003,"v":0.01,"n":4,"vw":29001}]},"next_page_token":"MTY0MDk0ODkyMzAwMDAwMDAwMHwyNDg0MzE3MQ=="}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoBars","description":"The crypto bars API provides historical aggregates for a list of crypto symbols between the specified dates.\n"}},"/v1beta3/crypto/{loc}/latest/bars":{"get":{"summary":"Latest bars","tags":["Crypto"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_loc"},{"$ref":"#/components/parameters/crypto_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_latest_bars_resp"},"examples":{"bars":{"value":{"bars":{"BTC/USD":{"t":"2022-05-27T10:18:00Z","o":28999,"h":29003,"l":28999,"c":29003,"v":0.01,"n":4,"vw":29001}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoLatestBars","description":"The latest multi-bars endpoint returns the latest minute-aggregated historical bar data for each of the crypto symbols provided.\n"}},"/v1beta3/crypto/{loc}/latest/orderbooks":{"get":{"summary":"Latest orderbook","tags":["Crypto"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_loc"},{"$ref":"#/components/parameters/crypto_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_latest_orderbooks_resp"},"examples":{"orderbooks":{"value":{"orderbooks":{"BTC/USD":{"t":"2022-06-24T08:00:14.137774336Z","b":[{"p":20846,"s":0.1902},{"p":20350,"s":0}],"a":[{"p":20902,"s":0.0097},{"p":21444,"s":0}]}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoLatestOrderbooks","description":"The latest orderbook endpoint returns the latest bid and ask orderbook for the crypto symbols provided.\n"}},"/v1beta3/crypto/{loc}/latest/quotes":{"get":{"summary":"Latest quotes","tags":["Crypto"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_loc"},{"$ref":"#/components/parameters/crypto_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_latest_quotes_resp"},"examples":{"quotes":{"value":{"quotes":{"ETH/USD":{"t":"2022-05-26T11:47:18.499478272Z","bp":1817,"bs":4.76,"ap":1817.7,"as":6.137},"BTC/USD":{"t":"2022-05-26T11:47:18.44347136Z","bp":29058,"bs":0.3544,"ap":29059,"as":3.252}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoLatestQuotes","description":"The latest quotes endpoint returns the latest bid and ask prices for the crypto symbols provided.\n"}},"/v1beta3/crypto/{loc}/latest/trades":{"get":{"summary":"Latest trades","tags":["Crypto"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_loc"},{"$ref":"#/components/parameters/crypto_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_latest_trades_resp"},"examples":{"trades":{"value":{"trades":{"BTC/USD":{"t":"2022-05-18T12:01:00.537052Z","p":29791,"s":0.0016,"tks":"S","i":31455289},"ETH/USD":{"t":"2022-05-18T12:01:00.363547Z","p":2027.6,"s":0.06,"tks":"S","i":31455287}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoLatestTrades","description":"The latest trades endpoint returns the latest trade data for the crypto symbols provided.\n"}},"/v1beta3/crypto/{loc}/quotes":{"get":{"summary":"Historical quotes","tags":["Crypto"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_loc"},{"$ref":"#/components/parameters/crypto_symbols"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_quotes_resp"},"examples":{"quotes":{"value":{"quotes":{"BTC/USD":[{"t":"2022-05-26T11:47:18.44347136Z","bp":29058,"bs":0.3544,"ap":29059,"as":3.252}],"ETH/USD":[{"t":"2022-05-26T11:47:18.499478272Z","bp":1817,"bs":4.76,"ap":1817.7,"as":6.137}]},"next_page_token":null}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoQuotes","description":"The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates."}},"/v1beta3/crypto/{loc}/snapshots":{"get":{"summary":"Snapshots","tags":["Crypto"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_loc"},{"$ref":"#/components/parameters/crypto_symbols"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_snapshots_resp"},"examples":{"snapshots":{"value":{"snapshots":{"BTC/USD":{"dailyBar":{"c":31744,"h":31807,"l":31416,"n":438,"o":31660,"t":"2022-05-31T05:00:00Z","v":67.3518,"vw":31582.7034526175},"latestQuote":{"ap":31742,"as":0.395,"bp":31741,"bs":0.395,"t":"2022-05-31T11:55:58.507608832Z"},"latestTrade":{"i":32396097,"p":31744,"s":0.0543,"t":"2022-05-31T11:53:45.027481Z","tks":"B"},"minuteBar":{"c":31744,"h":31744,"l":31744,"n":2,"o":31744,"t":"2022-05-31T11:53:00Z","v":0.0886,"vw":31744},"prevDailyBar":{"c":31649,"h":32251,"l":30251,"n":8221,"o":30310,"t":"2022-05-30T05:00:00Z","v":1856.4065,"vw":30877.2751897281}}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoSnapshots","description":"The snapshots endpoint returns the latest trade, latest quote, latest minute bar, latest daily bar, and previous daily bar data for crypto symbols.\n"}},"/v1beta3/crypto/{loc}/trades":{"get":{"summary":"Historical trades","tags":["Crypto"],"security":[],"parameters":[{"$ref":"#/components/parameters/crypto_loc"},{"$ref":"#/components/parameters/crypto_symbols"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/crypto_trades_resp"},"examples":{"trades":{"value":{"trades":{"BTC/USD":[{"t":"2022-05-18T12:01:00.537052Z","p":29791,"s":0.0016,"tks":"S","i":31455289}],"ETH/USD":[{"t":"2022-05-18T12:01:00.363547Z","p":2027.6,"s":0.06,"tks":"S","i":31455287},{"t":"2022-05-18T12:01:00.363547Z","p":2027.6,"s":0.136,"tks":"S","i":31455288}]},"next_page_token":null}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"CryptoTrades","description":"The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates.\n"}},"/v2/stocks/auctions":{"get":{"summary":"Historical auctions","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbols"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/stock_asof"},{"$ref":"#/components/parameters/stock_auction_feed"},{"$ref":"#/components/parameters/stock_currency"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_auctions_resp"},"examples":{"auction":{"value":{"auctions":{"AAPL":[{"d":"2022-10-12","o":[{"c":"Q","p":139.12,"t":"2022-10-12T13:30:00.188390144Z","x":"P"},{"c":"O","p":138.99,"t":"2022-10-12T13:30:01.474665705Z","x":"Q"},{"c":"Q","p":138.99,"t":"2022-10-12T13:30:01.475216565Z","x":"Q"}],"c":[{"c":"6","p":138.36,"t":"2022-10-12T20:00:00.120649216Z","x":"P"},{"c":"M","p":138.36,"t":"2022-10-12T20:00:00.125925888Z","x":"P"},{"c":"6","p":138.34,"t":"2022-10-12T20:00:00.875570864Z","x":"Q"},{"c":"M","p":138.34,"t":"2022-10-12T20:00:00.875603021Z","x":"Q"}]},{"d":"2022-10-13","o":[{"c":"Q","p":134.8,"t":"2022-10-13T13:30:00.20304384Z","x":"P"},{"c":"O","p":135,"t":"2022-10-13T13:30:01.688322951Z","x":"Q"},{"c":"Q","p":135,"t":"2022-10-13T13:30:01.699259366Z","x":"Q"}],"c":[{"c":"M","p":142.94,"t":"2022-10-13T20:00:00.166980864Z","x":"P"}]}],"TSLA":[{"d":"2022-10-12","o":[{"c":"Q","p":215.39,"t":"2022-10-12T13:30:00.065736192Z","x":"P"},{"c":"O","p":215.79,"t":"2022-10-12T13:30:01.349399539Z","x":"Q"},{"c":"Q","p":215.79,"t":"2022-10-12T13:30:01.349965972Z","x":"Q"}],"c":[{"c":"M","p":217.23,"t":"2022-10-12T20:00:00.124164096Z","x":"P"},{"c":"6","p":217.24,"t":"2022-10-12T20:00:00.469874365Z","x":"Q"},{"c":"M","p":217.24,"t":"2022-10-12T20:00:00.469912641Z","x":"Q"}]},{"d":"2022-10-13","o":[{"c":"Q","p":208.37,"t":"2022-10-13T13:30:00.068034304Z","x":"P"},{"c":"O","p":208.49,"t":"2022-10-13T13:30:01.079567733Z","x":"Q"},{"c":"Q","p":208.49,"t":"2022-10-13T13:30:01.090802222Z","x":"Q"}],"c":[{"c":"M","p":221.7,"t":"2022-10-13T20:00:00.152902912Z","x":"P"}]}]},"next_page_token":null}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockAuctions","description":"The historical auctions endpoint provides auction prices for a list of stock symbols between the specified dates.\n"}},"/v2/stocks/bars":{"get":{"summary":"Historical bars","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbols"},{"$ref":"#/components/parameters/timeframe"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/stock_adjustment"},{"$ref":"#/components/parameters/stock_asof"},{"$ref":"#/components/parameters/stock_historical_feed"},{"$ref":"#/components/parameters/stock_currency"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_bars_resp"},"examples":{"bars":{"value":{"bars":{"AAPL":[{"t":"2022-01-03T09:00:00Z","o":178.26,"h":178.26,"l":178.21,"c":178.21,"v":1118,"n":65,"vw":178.235733}]},"next_page_token":"QUFQTHxNfDIwMjItMDEtMDNUMDk6MDA6MDAuMDAwMDAwMDAwWg=="}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockBars","description":"The historical stock bars API provides aggregates for a list of stock symbols between the specified dates.\n\nThe returned results are sorted by symbol first, then by bar timestamp. This means that you are likely to see only one symbol in your first response if there are enough bars for that symbol to hit the limit you requested.\n\nIn these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any bars were found for them."}},"/v2/stocks/bars/latest":{"get":{"summary":"Latest bars","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbols"},{"$ref":"#/components/parameters/stock_latest_feed"},{"$ref":"#/components/parameters/stock_currency"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_latest_bars_resp"},"examples":{"bars":{"value":{"bars":{"TSLA":{"t":"2022-08-17T08:57:00Z","o":914.3,"h":914.3,"l":914.3,"c":914.3,"v":751,"n":20,"vw":914.294634},"AAPL":{"t":"2022-08-17T08:58:00Z","o":172.81,"h":172.81,"l":172.78,"c":172.79,"v":1002,"n":20,"vw":172.791417}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockLatestBars","description":"The latest bars endpoint provides the latest minute bar for the given ticker symbols.\n"}},"/v2/stocks/meta/conditions/{ticktype}":{"get":{"summary":"Condition codes","tags":["Stock"],"parameters":[{"name":"ticktype","in":"path","description":"The type of ticks.","required":true,"schema":{"type":"string","enum":["trade","quote"]}},{"name":"tape","in":"query","description":"The one character name of the tape.","required":true,"schema":{"type":"string","enum":["A","B","C"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_conditions"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockMetaConditions","description":"Returns the mapping between the condition codes and names."}},"/v2/stocks/meta/exchanges":{"get":{"summary":"Exchange codes","tags":["Stock"],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_exchanges"}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockMetaExchanges","description":"Returns the mapping between the stock exchange codes and the corresponding exchanges names.\n"}},"/v2/stocks/quotes":{"get":{"summary":"Historical quotes","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbols"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/stock_asof"},{"$ref":"#/components/parameters/stock_historical_feed"},{"$ref":"#/components/parameters/stock_currency"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_quotes_resp"},"examples":{"quotes":{"value":{"quotes":{"AAPL":[{"t":"2022-01-03T09:00:00.028160898Z","ax":" ","ap":0,"as":0,"bx":"Q","bp":177.92,"bs":4,"c":["Y"],"z":"C"},{"t":"2022-01-03T09:00:00.028294451Z","ax":"Q","ap":178.8,"as":4,"bx":"Q","bp":177.92,"bs":4,"c":["R"],"z":"C"}]},"next_page_token":"QUFQTHwyMDIyLTAxLTAzVDA5OjAwOjAwLjAyODI5NDQ1MVp8MjM3NjQ0Qzg="}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockQuotes","description":"The historical stock quotes API provides quote data for a list of stock symbols between the specified dates.\n\nThe returned results are sorted by symbol first, then by the quote timestamp. This means that you are likely to see only one symbol in your first response if there are enough quotes for that symbol to hit the limit you requested.\n\nIn these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any quotes were found for them."}},"/v2/stocks/quotes/latest":{"get":{"summary":"Latest quotes","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbols"},{"$ref":"#/components/parameters/stock_latest_feed"},{"$ref":"#/components/parameters/stock_currency"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_latest_quotes_resp"},"examples":{"quotes":{"value":{"quotes":{"AAPL":{"t":"2022-08-17T10:07:40.286587431Z","ax":"Q","ap":172.7,"as":1,"bx":"Q","bp":172.62,"bs":2,"c":["R"],"z":"C"},"TSLA":{"t":"2022-08-17T10:07:49.387064037Z","ax":"Q","ap":911.6,"as":1,"bx":"K","bp":911.3,"bs":1,"c":["R"],"z":"C"}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockLatestQuotes","description":"The latest quotes endpoint provides the latest best bid and ask prices for the given ticker symbols.\n"}},"/v2/stocks/snapshots":{"get":{"summary":"Snapshots","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbols"},{"$ref":"#/components/parameters/stock_latest_feed"},{"$ref":"#/components/parameters/stock_currency"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_snapshots_resp"},"examples":{"snapshots":{"value":{"AAPL":{"latestTrade":{"t":"2022-08-17T10:18:24.114694956Z","x":"Q","p":172.61,"s":160,"c":["@","T"],"i":1011,"z":"C"},"latestQuote":{"t":"2022-08-17T10:18:27.052763263Z","ax":"Q","ap":172.7,"as":5,"bx":"Q","bp":172.6,"bs":2,"c":["R"],"z":"C"},"minuteBar":{"t":"2022-08-17T10:16:00Z","o":172.69,"h":172.69,"l":172.69,"c":172.69,"v":106,"n":3,"vw":172.688113},"dailyBar":{"t":"2022-08-16T04:00:00Z","o":172.62,"h":173.71,"l":171.6618,"c":173.03,"v":56457696,"n":515139,"vw":172.743391},"prevDailyBar":{"t":"2022-08-15T04:00:00Z","o":171.5,"h":173.39,"l":171.345,"c":173.19,"v":54091719,"n":501626,"vw":172.625371}},"TSLA":{"latestTrade":{"t":"2022-08-17T10:13:12.952851456Z","x":"P","p":911.99,"s":100,"c":["@","T"],"i":2047,"z":"C"},"latestQuote":{"t":"2022-08-17T10:18:23.84717767Z","ax":"P","ap":911.75,"as":4,"bx":"Q","bp":911.31,"bs":1,"c":["R"],"z":"C"},"minuteBar":{"t":"2022-08-17T10:13:00Z","o":911.99,"h":911.99,"l":911.99,"c":911.99,"v":740,"n":64,"vw":911.780405},"dailyBar":{"t":"2022-08-16T04:00:00Z","o":935,"h":944,"l":908.65,"c":919.69,"v":29378774,"n":805572,"vw":925.215087},"prevDailyBar":{"t":"2022-08-15T04:00:00Z","o":905.32,"h":939.4,"l":903.69,"c":927.96,"v":29786389,"n":825109,"vw":923.982755}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockSnapshots","description":"The snapshot endpoint for multiple tickers provides the latest trade, latest quote, minute bar, daily bar, and previous daily bar data for each given ticker symbol.\n"}},"/v2/stocks/trades":{"get":{"summary":"Historical trades","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbols"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/stock_asof"},{"$ref":"#/components/parameters/stock_historical_feed"},{"$ref":"#/components/parameters/stock_currency"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_trades_resp"},"examples":{"trades":{"value":{"trades":{"AAPL":[{"t":"2022-01-03T09:00:00.086175744Z","x":"P","p":178.26,"s":246,"c":["@","T"],"i":1,"z":"C"},{"t":"2022-01-03T09:00:00.24483968Z","x":"P","p":178.26,"s":1,"c":["@","F","T","I"],"i":2,"z":"C"}]},"next_page_token":"QUFQTHwyMDIyLTAxLTAzVDA5OjAwOjAwLjI0NDgzOTY4MFp8UHwwOTIyMzM3MjAzNjg1NDc3NTgxMA=="}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockTrades","description":"The historical stock trades API provides trade data for a list of stock symbols between the specified dates.\n\nThe returned results are sorted by symbol first then by trade timestamp. This means that you are likely to see only one symbol in your first response if there are enough trades for that symbol to hit the limit you requested.\n\nIn these situations, if you keep requesting again with the `next_page_token` from the previous response, you will eventually reach the other symbols if any trades were found for them."}},"/v2/stocks/trades/latest":{"get":{"summary":"Latest trades","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbols"},{"$ref":"#/components/parameters/stock_latest_feed"},{"$ref":"#/components/parameters/stock_currency"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_latest_trades_resp"},"examples":{"trades":{"value":{"trades":{"AAPL":{"t":"2022-08-17T09:50:43.361102308Z","x":"Q","p":172.78,"s":100,"c":["@","F","T"],"i":826,"z":"C"}}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockLatestTrades","description":"The latest trades endpoint provides the latest trades for the given ticker symbols.\n\nTrades with any conditions that causes them to not update the bar price are excluded. For example a trade with condition `I` (odd lot) will never appear on this endpoint. You can find the complete list of excluded conditions in [this FAQ](https://docs.alpaca.markets/docs/market-data-faq#how-are-bars-aggregated)."}},"/v2/stocks/{symbol}/auctions":{"get":{"summary":"Historical auctions (single)","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbol"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/stock_asof"},{"$ref":"#/components/parameters/stock_auction_feed"},{"$ref":"#/components/parameters/stock_currency"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_auctions_resp_single"},"examples":{"auctions":{"value":{"auctions":[{"d":"2022-10-13","o":[{"c":"Q","p":208.37,"t":"2022-10-13T13:30:00.068034304Z","x":"P"},{"c":"O","p":208.49,"t":"2022-10-13T13:30:01.079567733Z","x":"Q"},{"c":"Q","p":208.49,"t":"2022-10-13T13:30:01.090802222Z","x":"Q"}],"c":[{"c":"M","p":221.7,"t":"2022-10-13T20:00:00.152902912Z","x":"P"}]}],"next_page_token":null,"symbol":"TSLA"}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockAuctionSingle","description":"The historical auctions endpoint provides auction prices for the given stock symbol between the specified dates.\n"}},"/v2/stocks/{symbol}/bars":{"get":{"summary":"Historical bars (single symbol)","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbol"},{"$ref":"#/components/parameters/timeframe"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/stock_adjustment"},{"$ref":"#/components/parameters/stock_asof"},{"$ref":"#/components/parameters/stock_historical_feed"},{"$ref":"#/components/parameters/stock_currency"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_bars_resp_single"},"examples":{"bars":{"value":{"bars":[{"t":"2022-01-03T09:00:00Z","o":178.26,"h":178.26,"l":178.21,"c":178.21,"v":1118,"n":65,"vw":178.235733}],"symbol":"AAPL","next_page_token":"QUFQTHxNfDIwMjItMDEtMDNUMDk6MDA6MDAuMDAwMDAwMDAwWg=="}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockBarSingle","description":"The historical stock bars API provides aggregates for the stock symbol between the specified dates."}},"/v2/stocks/{symbol}/bars/latest":{"get":{"summary":"Latest bar (single symbol)","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbol"},{"$ref":"#/components/parameters/stock_latest_feed"},{"$ref":"#/components/parameters/stock_currency"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_latest_bars_resp_single"},"examples":{"bar":{"value":{"bar":{"t":"2022-08-17T09:07:00Z","o":172.98,"h":173.04,"l":172.98,"c":173,"v":2748,"n":49,"vw":173.007817},"symbol":"AAPL"}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockLatestBarSingle","description":"The latest bar endpoint returns the latest minute bar for the given ticker symbol.\n"}},"/v2/stocks/{symbol}/quotes":{"get":{"summary":"Historical quotes (single symbol)","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbol"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/stock_asof"},{"$ref":"#/components/parameters/stock_historical_feed"},{"$ref":"#/components/parameters/stock_currency"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_quotes_resp_single"},"examples":{"quotes":{"value":{"quotes":[{"t":"2022-01-03T09:00:00.028160898Z","ax":" ","ap":0,"as":0,"bx":"Q","bp":177.92,"bs":4,"c":["Y"],"z":"C"},{"t":"2022-01-03T09:00:00.028294451Z","ax":"Q","ap":178.8,"as":4,"bx":"Q","bp":177.92,"bs":4,"c":["R"],"z":"C"}],"symbol":"AAPL","next_page_token":"QUFQTHwyMDIyLTAxLTAzVDA5OjAwOjAwLjAyODI5NDQ1MVp8MjM3NjQ0Qzg="}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockQuoteSingle","description":"The historical stock quotes API provides quote data for a stock symbol between the specified dates."}},"/v2/stocks/{symbol}/quotes/latest":{"get":{"summary":"Latest quote (single symbol)","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbol"},{"$ref":"#/components/parameters/stock_latest_feed"},{"$ref":"#/components/parameters/stock_currency"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_latest_quotes_resp_single"},"examples":{"quotes":{"value":{"symbol":"AAPL","quote":{"t":"2022-08-17T10:09:34.055031265Z","ax":"Q","ap":172.7,"as":1,"bx":"Q","bp":172.6,"bs":2,"c":["R"],"z":"C"}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockLatestQuoteSingle","description":"The latest quote endpoint provides the latest best bid and ask prices for a given ticker symbol.\n"}},"/v2/stocks/{symbol}/snapshot":{"get":{"summary":"Snapshot (single symbol)","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbol"},{"$ref":"#/components/parameters/stock_latest_feed"},{"$ref":"#/components/parameters/stock_currency"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_snapshots_resp_single"},"examples":{"snapshot":{"value":{"symbol":"AAPL","latestTrade":{"t":"2022-08-17T10:19:30.735811394Z","x":"Q","p":172.55,"s":229,"c":["@","T"],"i":1040,"z":"C"},"latestQuote":{"t":"2022-08-17T10:19:30.805564086Z","ax":"Q","ap":172.65,"as":1,"bx":"P","bp":172.51,"bs":1,"c":["R"],"z":"C"},"minuteBar":{"t":"2022-08-17T10:18:00Z","o":172.65,"h":172.65,"l":172.6,"c":172.6,"v":3746,"n":57,"vw":172.618377},"dailyBar":{"t":"2022-08-16T04:00:00Z","o":172.62,"h":173.71,"l":171.6618,"c":173.03,"v":56457696,"n":515139,"vw":172.743391},"prevDailyBar":{"t":"2022-08-15T04:00:00Z","o":171.5,"h":173.39,"l":171.345,"c":173.19,"v":54091719,"n":501626,"vw":172.625371}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockSnapshotSingle","description":"The snapshot endpoint provides the latest trade, latest quote, minute bar, daily bar, and previous daily bar data for a given ticker symbol.\n"}},"/v2/stocks/{symbol}/trades":{"get":{"summary":"Historical trades (single symbol)","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbol"},{"$ref":"#/components/parameters/start"},{"$ref":"#/components/parameters/end"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/stock_asof"},{"$ref":"#/components/parameters/stock_historical_feed"},{"$ref":"#/components/parameters/stock_currency"},{"$ref":"#/components/parameters/page_token"},{"$ref":"#/components/parameters/sort"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_trades_resp_single"},"examples":{"trades":{"value":{"trades":[{"t":"2022-01-03T17:00:00.029591476Z","x":"Q","p":181.47,"s":1,"c":["@","I"],"i":73833,"z":"C"},{"t":"2022-01-03T17:00:00.029591476Z","x":"Q","p":181.47,"s":1,"c":["@","I"],"i":73834,"z":"C"}],"symbol":"AAPL","next_page_token":"QUFQTHwyMDIyLTAxLTAzVDE3OjAwOjAwLjAyOTU5MTQ3Nlp8UXwwOTIyMzM3MjAzNjg1NDg0OTY0Mg=="}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockTradeSingle","description":"The historical stock trades API provides trade data for a stock symbol between the specified dates."}},"/v2/stocks/{symbol}/trades/latest":{"get":{"summary":"Latest trade (single symbol)","tags":["Stock"],"parameters":[{"$ref":"#/components/parameters/stock_symbol"},{"$ref":"#/components/parameters/stock_latest_feed"},{"$ref":"#/components/parameters/stock_currency"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stock_latest_trades_resp_single"},"examples":{"trade":{"value":{"symbol":"AAPL","trade":{"t":"2022-08-17T09:53:16.845580544Z","x":"P","p":172.6,"s":100,"c":["@","T"],"i":689,"z":"C"}}}}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}},"operationId":"StockLatestTradeSingle","description":"The latest trade endpoint provides the latest trade for the given ticker symbol.\n\nTrades with any conditions that causes them to not update the bar price are excluded. For example a trade with condition `I` (odd lot) will never appear on this endpoint. You can find the complete list of excluded conditions in [this FAQ](https://docs.alpaca.markets/docs/market-data-faq#how-are-bars-aggregated)."}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"APCA-API-KEY-ID"},"apiSecret":{"type":"apiKey","in":"header","name":"APCA-API-SECRET-KEY"}},"parameters":{"cas_symbols":{"name":"symbols","description":"A comma-separated list of symbols.","in":"query","schema":{"type":"string"},"example":"AAPL,TSLA"},"cas_cusips":{"name":"cusips","description":"A comma-separated list of CUSIPs.","in":"query","schema":{"type":"string"},"example":"037833100,88160R101"},"cas_types":{"name":"types","in":"query","schema":{"type":"string"},"example":"forward_split,reverse_split","description":"A comma-separated list of types. If not provided, search all types.\n\nThe following types are supported:\n  - reverse_split\n  - forward_split\n  - unit_split\n  - cash_dividend\n  - stock_dividend\n  - spin_off\n  - cash_merger\n  - stock_merger\n  - stock_and_cash_merger\n  - redemption\n  - name_change\n  - worthless_removal\n  - rights_distribution\n"},"cas_start":{"name":"start","in":"query","schema":{"type":"string","format":"date"},"examples":{"date":{"value":"2024-08-14"}},"description":"The inclusive start of the interval. The corporate actions are sorted by their `process_date`. Format: YYYY-MM-DD. Default: current day.\n"},"cas_end":{"name":"end","in":"query","schema":{"type":"string","format":"date"},"examples":{"date":{"value":"2024-08-25","summary":"Date"}},"description":"The inclusive end of the interval. The corporate actions are sorted by their `process_date`. Format: YYYY-MM-DD. Default: current day.\n"},"cas_ids":{"name":"ids","description":"A comma-separated list of corporate action IDs. This parameter is mutually exclusive with all other filters (symbols, types, start, end).\n","in":"query","schema":{"type":"string"},"example":"1dbc7685-9517-4a77-a236-8527d49cefdc,f8489167-4e4b-431d-a0be-6017ae1cf08a"},"cas_limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Maximum number of corporate actions to return in a response.\nThe limit applies to the total number of data points, not the count per symbol!\nUse `next_page_token` to fetch the next set of corporate actions.\n"},"page_token":{"name":"page_token","in":"query","schema":{"type":"string"},"description":"The pagination token from which to continue. The value to pass here is returned in specific requests when more data is available, usually because of a response result limit.\n"},"sort":{"name":"sort","in":"query","description":"Sort data in ascending or descending order.","schema":{"$ref":"#/components/schemas/sort"}},"isins":{"name":"isins","description":"A comma-separated list of ISINs with a limit of 1000.","in":"query","required":true,"schema":{"type":"string"},"example":"US912797KJ59,US912797KS58,US912797LB15"},"forex_currency_pairs":{"name":"currency_pairs","in":"query","required":true,"schema":{"$ref":"#/components/schemas/forex_currency_pairs"}},"forex_timeframe":{"name":"timeframe","in":"query","required":false,"schema":{"$ref":"#/components/schemas/forex_timeframe"}},"start":{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"examples":{"RFC-3339 second":{"value":"2024-01-03T00:00:00Z","summary":"RFC-3339 date-time with second accuracy"},"RFC-3339 nanosecond":{"value":"2024-01-03T01:02:03.123456789Z","summary":"RFC-3339 date-time with nanosecond accuracy"},"RFC-3339 with timezone":{"value":"2024-01-03T09:30:00-04:00","summary":"RFC-3339 date-time with time zone"},"date":{"value":"2024-01-03","summary":"Date"}},"description":"The inclusive start of the interval. Format: RFC-3339 or YYYY-MM-DD.\nDefault: the beginning of the current day, but at least 15 minutes ago if the user doesn't have real-time access for the feed.\n"},"end":{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"examples":{"RFC-3339 second":{"value":"2024-01-04T00:00:00Z","summary":"RFC-3339 date-time with second accuracy"},"RFC-3339 nanosecond":{"value":"2024-01-04T01:02:03.123456789Z","summary":"RFC-3339 date-time with nanosecond accuracy"},"RFC-3339 with timezone":{"value":"2024-01-04T09:30:00-04:00","summary":"RFC-3339 date-time with time zone"},"date":{"value":"2024-01-04","summary":"Date"}},"description":"The inclusive end of the interval. Format: RFC-3339 or YYYY-MM-DD.\nDefault: the current time if the user has a real-time access for the feed, otherwise 15 minutes before the current time.\n"},"limit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10000,"default":1000},"description":"The maximum number of data points to return in the response page.\nThe API may return less, even if there are more available data points in the requested interval.\nAlways check the `next_page_token` for more pages.\nThe limit applies to the total number of data points, not per symbol!\n"},"symbol":{"name":"symbol","description":"A unique series of letters assigned to a security for trading purposes.","in":"path","required":true,"schema":{"type":"string"},"example":"AAPL"},"news_sort":{"name":"sort","in":"query","description":"Sort articles by updated date.","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},"option_symbols":{"name":"symbols","description":"A comma-separated list of contract symbols with a limit of 100.","in":"query","required":true,"schema":{"type":"string"},"example":"AAPL241220C00300000,AAPL240315C00225000"},"timeframe":{"name":"timeframe","in":"query","schema":{"type":"string"},"required":true,"x-go-name":"TimeFrame","example":"1Min","description":"The timeframe represented by each bar in aggregation.\nYou can use any of the following values:\n - `[1-59]Min` or `[1-59]T`, e.g. `5Min` or `5T` creates 5-minute aggregations\n - `[1-23]Hour` or `[1-23]H`, e.g. `12Hour` or `12H` creates 12-hour aggregations\n - `1Day` or `1D` creates 1-day aggregations\n - `1Week` or `1W` creates 1-week aggregations\n - `[1,2,3,4,6,12]Month` or `[1,2,3,4,6,12]M`, e.g. `3Month` or `3M` creates 3-month aggregations\n"},"option_feed":{"name":"feed","in":"query","description":"The source feed of the data. `opra` is the official OPRA feed, `indicative` is a free indicative feed where trades are delayed and quotes are modified. Default: `opra` if the user has a subscription, otherwise `indicative`.\n","schema":{"$ref":"#/components/schemas/option_feed"}},"option_updated_since":{"name":"updated_since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is greater than or equal to this value.\nFormat: RFC-3339 or YYYY-MM-DD. If missing, all values are returned.\n"},"option_limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Number of maximum snapshots to return in a response.\nThe limit applies to the total number of data points, not the number per symbol!\nUse `next_page_token` to fetch the next set of responses.\n"},"option_underlying_symbol":{"name":"underlying_symbol","description":"The financial instrument on which an option contract is based or derived.","in":"path","required":true,"schema":{"type":"string"},"example":"AAPL"},"most_actives_by":{"name":"by","in":"query","required":false,"schema":{"type":"string","enum":["volume","trades"],"default":"volume"},"description":"The metric used for ranking the most active stocks."},"most_actives_top":{"name":"top","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10,"minimum":1,"maximum":100},"description":"The number of top most active stocks to fetch per day."},"movers_market_type":{"name":"market_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/market_type"},"description":"Screen-specific market (stocks or crypto)."},"movers_top":{"name":"top","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10,"minimum":1,"maximum":50},"description":"Number of top market movers to fetch (gainers and losers). Will return this number of results for each. By default, 10 gainers and 10 losers.\n"},"crypto_perp_loc":{"name":"loc","in":"path","description":"Crypto perpetual location.","required":true,"schema":{"$ref":"#/components/schemas/crypto_perp_loc"}},"crypto_perp_symbols":{"name":"symbols","description":"A comma-separated list of crypto symbols.","in":"query","required":true,"schema":{"type":"string"},"example":"BTCUSDT.P,LTCUSDT.P"},"crypto_loc":{"name":"loc","in":"path","description":"Crypto location.","required":true,"schema":{"$ref":"#/components/schemas/crypto_loc"}},"crypto_symbols":{"name":"symbols","description":"A comma-separated list of crypto symbols.","in":"query","required":true,"schema":{"type":"string"},"example":"BTC/USD,LTC/USD"},"stock_symbols":{"name":"symbols","description":"A comma-separated list of stock symbols.","in":"query","required":true,"schema":{"type":"string"},"example":"AAPL,TSLA"},"stock_asof":{"name":"asof","in":"query","description":"The as-of date of the queried stock symbol(s). Format: YYYY-MM-DD. Default: current day.\n\nThis date is used to identify the underlying entity of the provided symbol(s), so that name changes for this entity can be found. Data for past symbol(s) is returned if the query date range spans the name change.\n\nThe special value of \"-\" means symbol mapping is skipped. Data is returned based on the symbol alone without looking up previous names. The same happens if the queried symbol is not found on the given `asof` date.\n\nExample: FB was renamed to META in 2022-06-09. Querying META with an `asof` date after 2022-06-09 will also yield FB data. The data for the FB ticker will be labeled as META because they are considered the same underlying entity as of 2022-06-09. Querying FB with an `asof` date after 2022-06-09 will only return data with the FB ticker, not with META. But with an `asof` date before 2022-06-09, META will also be returned (as FB).\n","schema":{"type":"string"}},"stock_auction_feed":{"name":"feed","in":"query","description":"Only `sip` is valid for auctions.","schema":{"$ref":"#/components/schemas/stock_auction_feed"}},"stock_currency":{"name":"currency","in":"query","description":"The currency of all prices in ISO 4217 format. Default: USD.\n","schema":{"type":"string"}},"stock_adjustment":{"name":"adjustment","in":"query","description":"Specifies the corporate action adjustment for the stocks.","schema":{"$ref":"#/components/schemas/stock_bar_adjustment"}},"stock_historical_feed":{"name":"feed","in":"query","description":"The source feed of the data.\n - `sip`: all US exchanges\n - `iex`: Investors EXchange\n - `boats`: Blue Ocean ATS, overnight US trading data\n - `otc`: over-the-counter exchanges\n","schema":{"$ref":"#/components/schemas/stock_historical_feed"}},"stock_latest_feed":{"name":"feed","in":"query","description":"The source feed of the data.\n\n - `sip`: all US exchanges\n - `iex`: Investors EXchange\n - `delayed_sip`: SIP with a 15 minute delay\n - `boats`: Blue Ocean, overnight US trading data\n - `overnight`: derived overnight US trading data\n - `otc`: over-the-counter exchanges\n\nDefault: `sip` if the user has the unlimited subscription, otherwise `iex`.\n","schema":{"$ref":"#/components/schemas/stock_latest_feed"}},"stock_symbol":{"name":"symbol","in":"path","description":"The symbol to query.","required":true,"schema":{"type":"string"},"example":"AAPL"}},"schemas":{"sort":{"type":"string","description":"Sort data in ascending or descending order.","enum":["asc","desc"],"default":"asc","x-go-name":"TypeSort"},"ca_id":{"type":"string","format":"uuid","description":"The internal Alpaca identifier of the corporate action."},"process_date":{"type":"string","format":"date","description":"The date when the corporate action is processed by Alpaca."},"ex_date":{"type":"string","format":"date","description":"The ex-date marks the cutoff point for shareholders to be credited."},"record_date":{"type":"string","format":"date"},"payable_date":{"type":"string","format":"date"},"reverse_split":{"type":"object","description":"Reverse split.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"symbol":{"type":"string"},"old_cusip":{"type":"string"},"new_cusip":{"type":"string"},"new_rate":{"type":"number","format":"double"},"old_rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"ex_date":{"$ref":"#/components/schemas/ex_date"},"record_date":{"$ref":"#/components/schemas/record_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"}},"required":["id","symbol","old_cusip","new_cusip","new_rate","old_rate","process_date","ex_date"],"example":{"ex_date":"2023-08-24","id":"913de862-c02c-46dc-a89c-fc8779a50d30","new_cusip":"60879E200","new_rate":1,"old_cusip":"60879E101","old_rate":50,"process_date":"2023-08-24","record_date":"2023-08-24","symbol":"MNTS"}},"due_bill_redemption_date":{"type":"string","format":"date"},"forward_split":{"type":"object","description":"Forward split.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"symbol":{"type":"string"},"cusip":{"type":"string"},"new_rate":{"type":"number","format":"double"},"old_rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"ex_date":{"$ref":"#/components/schemas/ex_date"},"record_date":{"$ref":"#/components/schemas/record_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"},"due_bill_redemption_date":{"$ref":"#/components/schemas/due_bill_redemption_date"}},"required":["id","symbol","cusip","new_rate","old_rate","process_date","ex_date"],"example":{"cusip":"816851109","due_bill_redemption_date":"2023-08-23","ex_date":"2023-08-22","id":"189bd849-ab9f-4b4d-aaaa-a6d415fd976d","new_rate":2,"old_rate":1,"payable_date":"2023-08-21","process_date":"2023-08-22","record_date":"2023-08-14","symbol":"SRE"}},"effective_date":{"type":"string","format":"date","description":"The effective date marks the cutoff point for shareholders to be credited."},"unit_split":{"type":"object","description":"Unit split.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"old_symbol":{"type":"string"},"old_cusip":{"type":"string"},"old_rate":{"type":"number","format":"double"},"new_symbol":{"type":"string"},"new_cusip":{"type":"string"},"new_rate":{"type":"number","format":"double"},"alternate_symbol":{"type":"string"},"alternate_cusip":{"type":"string"},"alternate_rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"effective_date":{"$ref":"#/components/schemas/effective_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"}},"required":["id","old_symbol","old_cusip","old_rate","new_symbol","new_cusip","new_rate","alternate_symbol","alternate_cusip","alternate_rate","process_date","effective_date"],"example":{"alternate_cusip":"G5391L110","alternate_rate":0.3333,"alternate_symbol":"LVROW","effective_date":"2023-03-01","id":"3e68e87e-ae95-4d68-91d1-715d52ef143a","new_cusip":"G5391L102","new_rate":1,"new_symbol":"LVRO","old_cusip":"G8990L119","old_rate":1,"old_symbol":"TPBAU","process_date":"2023-03-01"}},"stock_dividend":{"type":"object","description":"Stock dividend.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"symbol":{"type":"string"},"cusip":{"type":"string"},"rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"ex_date":{"$ref":"#/components/schemas/ex_date"},"record_date":{"$ref":"#/components/schemas/record_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"}},"required":["id","symbol","cusip","rate","process_date","ex_date"],"example":{"cusip":"605015106","ex_date":"2023-05-19","id":"3ae94c30-2d37-473a-bf29-5f7b4ab6d3ca","payable_date":"2023-05-05","process_date":"2023-05-19","rate":0.05,"record_date":"2023-05-22","symbol":"MSBC"}},"cash_dividend":{"type":"object","description":"Cash dividend.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"symbol":{"type":"string"},"cusip":{"type":"string"},"rate":{"type":"number","format":"double"},"special":{"type":"boolean"},"foreign":{"type":"boolean"},"process_date":{"$ref":"#/components/schemas/process_date"},"ex_date":{"$ref":"#/components/schemas/ex_date"},"record_date":{"$ref":"#/components/schemas/record_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"},"due_bill_on_date":{"type":"string","format":"date"},"due_bill_off_date":{"type":"string","format":"date"}},"required":["id","symbol","cusip","rate","special","foreign","process_date","ex_date"],"example":{"cusip":"319829107","ex_date":"2023-05-04","foreign":false,"id":"11cfd108-292e-4cc6-bfbf-5999cdbc4029","payable_date":"2023-05-19","process_date":"2023-05-19","rate":0.125,"record_date":"2023-05-05","special":false,"symbol":"FCF"}},"spin_off":{"type":"object","description":"Spin-off.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"source_symbol":{"type":"string"},"source_cusip":{"type":"string"},"source_rate":{"type":"number","format":"double"},"new_symbol":{"type":"string"},"new_cusip":{"type":"string"},"new_rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"ex_date":{"$ref":"#/components/schemas/ex_date"},"record_date":{"$ref":"#/components/schemas/record_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"},"due_bill_redemption_date":{"$ref":"#/components/schemas/due_bill_redemption_date"}},"required":["id","source_symbol","source_cusip","source_rate","new_symbol","new_cusip","new_rate","process_date","ex_date"],"example":{"ex_date":"2023-08-15","id":"82e602f6-35bc-4651-a5dd-f6d88ff37c55","new_cusip":"85237B101","new_rate":1,"new_symbol":"SRM","process_date":"2023-08-15","record_date":"2023-08-15","source_rate":19.35,"source_cusip":"48208F105","source_symbol":"JUPW"}},"cash_merger":{"type":"object","description":"Cash merger.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"acquirer_symbol":{"type":"string"},"acquirer_cusip":{"type":"string"},"acquiree_symbol":{"type":"string"},"acquiree_cusip":{"type":"string"},"rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"effective_date":{"$ref":"#/components/schemas/effective_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"}},"required":["id","acquiree_symbol","acquiree_cusip","rate","process_date","effective_date"],"example":{"acquiree_cusip":"Y2687W108","acquiree_symbol":"GLOP","effective_date":"2023-07-17","id":"3772bbd7-4ad5-44d4-9cc0-f69156a2f8f5","payable_date":"2023-07-17","process_date":"2023-07-17","rate":5.37}},"stock_merger":{"type":"object","description":"Stock merger.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"acquirer_symbol":{"type":"string"},"acquirer_cusip":{"type":"string"},"acquirer_rate":{"type":"number","format":"double"},"acquiree_symbol":{"type":"string"},"acquiree_cusip":{"type":"string"},"acquiree_rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"effective_date":{"$ref":"#/components/schemas/effective_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"}},"required":["id","acquirer_symbol","acquirer_cusip","acquirer_rate","acquiree_symbol","acquiree_cusip","acquiree_rate","process_date","effective_date"],"example":{"acquiree_cusip":"53223X107","acquiree_rate":1,"acquiree_symbol":"LSI","acquirer_cusip":"30225T102","acquirer_rate":0.895,"acquirer_symbol":"EXR","effective_date":"2023-07-20","id":"728f8cb2-a00e-4bc7-ad14-d15fe82bbcff","payable_date":"2023-07-20","process_date":"2023-07-20"}},"stock_and_cash_merger":{"type":"object","description":"Stock and cash merger.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"acquirer_symbol":{"type":"string"},"acquirer_cusip":{"type":"string"},"acquirer_rate":{"type":"number","format":"double"},"acquiree_symbol":{"type":"string"},"acquiree_cusip":{"type":"string"},"acquiree_rate":{"type":"number","format":"double"},"cash_rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"effective_date":{"$ref":"#/components/schemas/effective_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"}},"required":["id","acquirer_symbol","acquirer_cusip","acquirer_rate","acquiree_symbol","acquiree_cusip","acquiree_rate","cash_rate","process_date","effective_date"],"example":{"acquiree_cusip":"561409103","acquiree_rate":1,"acquiree_symbol":"MLVF","acquirer_cusip":"31931U102","acquirer_rate":0.7733,"acquirer_symbol":"FRBA","cash_rate":7.8,"effective_date":"2023-07-18","id":"e5248356-2c06-42cf-aeb9-1595bd616cdb","payable_date":"2023-07-18","process_date":"2023-07-18"}},"redemption":{"type":"object","description":"Redemption.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"symbol":{"type":"string"},"cusip":{"type":"string"},"rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"}},"required":["id","symbol","cusip","rate","process_date"],"example":{"cusip":"687305102","id":"395da031-0e57-4918-a6fb-64a7c713aca4","payable_date":"2023-06-13","process_date":"2023-06-13","rate":0.141134,"symbol":"ORPHY"}},"name_change":{"type":"object","description":"Name change.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"old_symbol":{"type":"string"},"old_cusip":{"type":"string"},"new_symbol":{"type":"string"},"new_cusip":{"type":"string"},"process_date":{"$ref":"#/components/schemas/process_date"}},"required":["id","old_symbol","old_cusip","new_symbol","new_cusip","process_date"],"example":{"id":"5a774c35-edec-4532-a812-a56d0bbb623a","new_cusip":"Y9390M103","new_symbol":"VFS","old_cusip":"G11537100","old_symbol":"BSAQ","process_date":"2023-08-15"}},"worthless_removal":{"type":"object","description":"Worthless removal.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"symbol":{"type":"string"},"cusip":{"type":"string"},"process_date":{"$ref":"#/components/schemas/process_date"}},"required":["id","symbol","cusip","process_date"],"example":{"cusip":"078771300","id":"106c2149-ee04-4d2e-a943-98dbb4d21a3c","symbol":"BLPH","process_date":"2024-12-19"}},"expiration_date":{"type":"string","format":"date"},"rights_distribution":{"type":"object","description":"Rights distribution.","properties":{"id":{"$ref":"#/components/schemas/ca_id"},"source_symbol":{"type":"string"},"source_cusip":{"type":"string"},"new_symbol":{"type":"string"},"new_cusip":{"type":"string"},"rate":{"type":"number","format":"double"},"process_date":{"$ref":"#/components/schemas/process_date"},"ex_date":{"$ref":"#/components/schemas/ex_date"},"record_date":{"$ref":"#/components/schemas/record_date"},"payable_date":{"$ref":"#/components/schemas/payable_date"},"expiration_date":{"$ref":"#/components/schemas/expiration_date"}},"required":["id","source_symbol","source_cusip","new_symbol","new_cusip","rate","process_date","ex_date","payable_date"],"example":{"ex_date":"2024-04-17","expiration_date":"2024-05-14","id":"69794cfd-0adc-4e11-9211-9210a9cf8932","new_cusip":"454089111","new_symbol":"IFN.RTWI","payable_date":"2024-04-19","process_date":"2024-04-19","rate":1,"record_date":"2024-04-18","source_cusip":"454089103","source_symbol":"IFN"}},"corporate_actions":{"type":"object","properties":{"reverse_splits":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/reverse_split"}},"forward_splits":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/forward_split"}},"unit_splits":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/unit_split"}},"stock_dividends":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/stock_dividend"}},"cash_dividends":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/cash_dividend"}},"spin_offs":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/spin_off"}},"cash_mergers":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/cash_merger"}},"stock_mergers":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/stock_merger"}},"stock_and_cash_mergers":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/stock_and_cash_merger"}},"redemptions":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/redemption"}},"name_changes":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/name_change"}},"worthless_removals":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/worthless_removal"}},"rights_distributions":{"type":"array","x-go-type-skip-optional-pointer":true,"items":{"$ref":"#/components/schemas/rights_distribution"}}}},"next_page_token":{"type":"string","description":"Pagination token for the next page.","nullable":true},"corporate_actions_resp":{"type":"object","properties":{"corporate_actions":{"$ref":"#/components/schemas/corporate_actions"},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["corporate_actions","next_page_token"]},"timestamp":{"type":"string","description":"Timestamp in RFC-3339 format with nanosecond precision.","format":"date-time","x-go-name":"Timestamp"},"fixed_income_price":{"type":"object","description":"The price of the instrument as a percentage of its par value.","example":{"t":"2025-02-14T20:58:00.648Z","p":99.6459,"ytm":4.249,"ytw":4.249},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"p":{"type":"number","format":"double","description":"Price","x-go-name":"Price"},"ytm":{"type":"number","format":"double","description":"Yield to maturity.","x-go-name":"YieldToMaturity"},"ytw":{"type":"number","format":"double","description":"Yield to worst.","x-go-name":"YieldToWorst"}},"required":["t","p"]},"fixed_income_latest_prices_resp":{"type":"object","properties":{"prices":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/fixed_income_price"}}},"required":["prices"]},"forex_currency_pairs":{"type":"string","description":"A comma-separated string with currency pairs.","example":"USDJPY,USDMXN","x-go-name":"TypeCurrencyPairs"},"forex_rate":{"description":"A foreign exchange rate between two currencies at a given time.","type":"object","example":{"bp":127.702,"mp":127.757,"ap":127.763,"t":"2022-04-20T18:23:00Z"},"properties":{"bp":{"type":"number","format":"double","x-go-name":"BidPrice","description":"The last bid price value of the currency at the end of the timeframe."},"mp":{"type":"number","format":"double","x-go-name":"MidPrice","description":"The last mid price value of the currency at the end of the timeframe."},"ap":{"type":"number","format":"double","x-go-name":"AskPrice","description":"The last ask price value of the currency at the end of the timeframe."},"t":{"type":"string","format":"date-time","x-go-name":"Timestamp","description":"Timestamp of the rate."}},"required":["bp","mp","ap","t"]},"forex_latest_rates_resp":{"description":"The response object of the latest forex rates.","type":"object","properties":{"rates":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/forex_rate"}}},"required":["rates"]},"forex_timeframe":{"type":"string","default":"1Min","description":"The sampling interval of the currency rates. For example, 5S returns forex rates sampled every five seconds.\nYou can use the following values:\n - `5Sec` or `5S`\n - `1Min` or `1T`\n - `1Day` or `1D`\n"},"forex_rates_resp":{"type":"object","properties":{"rates":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/forex_rate"}}},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["rates","next_page_token"]},"news_image":{"description":"A model representing images for a news article. Simply a URL to the image along with a size parameter suggesting the display size of the image.","type":"object","properties":{"size":{"type":"string","minLength":1,"description":"Possible values for size are thumb, small and large.","example":"thumb","enum":["thumb","small","large"]},"url":{"type":"string","minLength":1,"description":"URL to image from news article.","format":"uri"}},"required":["size","url"]},"news":{"description":"Model representing a news article.","type":"object","properties":{"id":{"type":"integer","format":"int64","description":"News article ID."},"headline":{"type":"string","minLength":1,"description":"Headline or title of the article."},"author":{"type":"string","minLength":1,"description":"Original author of news article."},"created_at":{"type":"string","format":"date-time","description":"Date article was created (RFC-3339)."},"updated_at":{"type":"string","format":"date-time","description":"Date article was updated (RFC-3339)."},"summary":{"type":"string","minLength":1,"description":"Summary text for the article (may be first sentence of content)."},"content":{"type":"string","minLength":1,"description":"Content of the news article (might contain HTML)."},"url":{"type":"string","format":"uri","description":"URL of article (if applicable).","nullable":true},"images":{"type":"array","uniqueItems":true,"description":"List of images (URLs) related to given article (may be empty).","items":{"$ref":"#/components/schemas/news_image"}},"symbols":{"type":"array","description":"List of related or mentioned symbols.","items":{"type":"string"}},"source":{"type":"string","minLength":1,"description":"Source where the news originated from (e.g. Benzinga)."}},"required":["id","headline","author","created_at","updated_at","summary","content","images","symbols","source"]},"news_resp":{"type":"object","properties":{"news":{"type":"array","items":{"$ref":"#/components/schemas/news"}},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["news","next_page_token"]},"option_bar":{"type":"object","description":"OHLC aggregate of all the trades in a given interval.","example":{"t":"2024-01-18T05:00:00Z","o":0.28,"h":0.28,"l":0.23,"c":0.23,"v":224,"n":26,"vw":0.245045},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"o":{"type":"number","format":"double","description":"Opening price.","x-go-name":"Open"},"h":{"type":"number","format":"double","description":"High price.","x-go-name":"High"},"l":{"type":"number","format":"double","description":"Low price.","x-go-name":"Low"},"c":{"type":"number","format":"double","description":"Closing price.","x-go-name":"Close"},"v":{"type":"integer","format":"int64","description":"Bar volume.","x-go-name":"Volume"},"n":{"type":"integer","format":"int64","description":"Trade count in the bar.","x-go-name":"TradeCount"},"vw":{"type":"number","format":"double","description":"Volume weighted average price.","x-go-name":"VWAP"}},"required":["t","o","h","l","c","v","n","vw"]},"option_bars_resp":{"type":"object","properties":{"bars":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/option_bar"}}},"next_page_token":{"$ref":"#/components/schemas/next_page_token"},"currency":{"type":"string"}},"required":["bars","next_page_token"]},"option_conditions":{"type":"object","additionalProperties":{"type":"string"},"example":{"a":"SLAN - Single Leg Auction Non ISO","e":"SLFT - Single Leg Floor Trade","g":"MLAT - Multi Leg Auction"}},"option_exchanges":{"type":"object","additionalProperties":{"type":"string"},"example":{"A":"NYSE American Options","Q":"Nasdaq Options"}},"option_feed":{"type":"string","enum":["opra","indicative"],"default":"opra"},"option_quote":{"type":"object","description":"The best bid and ask information for a given option.\n","example":{"t":"2024-02-28T15:30:28.046330624Z","ax":"w","ap":0.16,"as":669,"bx":"W","bp":0.15,"bs":164,"c":"A"},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"bx":{"type":"string","description":"Bid exchange.","x-go-name":"BidExchange"},"bp":{"type":"number","format":"double","description":"Bid price.","x-go-name":"BidPrice"},"bs":{"type":"integer","format":"uint32","description":"Bid size.","x-go-name":"BidSize"},"ax":{"type":"string","description":"Ask exchange.","x-go-name":"AskExchange"},"ap":{"type":"number","format":"double","description":"Ask price.","x-go-name":"AskPrice"},"as":{"type":"integer","format":"uint32","description":"Ask size.","x-go-name":"AskSize"},"c":{"type":"string","description":"Quote condition.","x-go-name":"Condition"}},"required":["t","bx","bp","bs","ap","as","ax","c"]},"option_latest_quotes_resp":{"type":"object","properties":{"quotes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/option_quote"}}},"required":["quotes"]},"option_greeks":{"type":"object","description":"The greeks for the contract calculated using the Black-Scholes model.","properties":{"delta":{"type":"number","format":"double"},"gamma":{"type":"number","format":"double"},"theta":{"type":"number","format":"double"},"vega":{"type":"number","format":"double"},"rho":{"type":"number","format":"double"}},"required":["delta","gamma","theta","vega","rho"]},"option_trade":{"type":"object","description":"An option trade.","example":{"t":"2024-01-18T15:03:44.56339456Z","x":"B","p":0.37,"s":1,"c":"I"},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"x":{"type":"string","x-go-name":"Exchange"},"p":{"type":"number","format":"double","description":"Trade price.","x-go-name":"Price"},"s":{"type":"integer","format":"uint32","description":"Trade size.","x-go-name":"Size"},"c":{"type":"string","description":"Trade condition.","x-go-name":"Condition"}},"required":["t","x","p","s","c"]},"option_snapshot":{"type":"object","description":"A snapshot provides the latest trade and latest quote.","properties":{"dailyBar":{"$ref":"#/components/schemas/option_bar"},"greeks":{"$ref":"#/components/schemas/option_greeks"},"impliedVolatility":{"description":"Implied volatility calculated using the Black-Scholes model.","format":"double","type":"number"},"latestQuote":{"$ref":"#/components/schemas/option_quote"},"latestTrade":{"$ref":"#/components/schemas/option_trade"},"minuteBar":{"$ref":"#/components/schemas/option_bar"},"prevDailyBar":{"$ref":"#/components/schemas/option_bar"}}},"option_snapshots_resp":{"type":"object","properties":{"snapshots":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/option_snapshot"}},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["snapshots","next_page_token"]},"option_trades_resp":{"type":"object","properties":{"trades":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/option_trade"}}},"currency":{"type":"string"},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["trades","next_page_token"]},"option_latest_trades_resp":{"type":"object","properties":{"trades":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/option_trade"}}},"required":["trades"]},"most_active":{"description":"A stock that is most active by either volume or trade count.","type":"object","example":{"symbol":"AAPL","volume":122709184,"trade_count":639626},"properties":{"symbol":{"type":"string"},"volume":{"type":"integer","format":"int64","description":"Cumulative volume for the current trading day."},"trade_count":{"type":"integer","format":"int64","description":"Cumulative trade count for the current trading day."}},"required":["symbol","volume","trade_count"]},"most_actives_resp":{"type":"object","properties":{"most_actives":{"type":"array","description":"List of top N most active symbols.","items":{"$ref":"#/components/schemas/most_active"}},"last_updated":{"type":"string","description":"Time when the most actives were last computed. Formatted as a RFC-3339 date-time with nanosecond precision.\n"}},"required":["most_actives","last_updated"]},"market_type":{"type":"string","enum":["stocks","crypto"],"description":"Market type (stocks or crypto)."},"mover":{"title":"Mover","type":"object","description":"A symbol whose price moved significantly.","example":{"symbol":"AGRI","percent_change":145.56,"change":2.46,"price":4.15},"properties":{"symbol":{"type":"string","description":"Symbol of market moving asset."},"percent_change":{"type":"number","format":"double","description":"Percentage difference change for the day."},"change":{"type":"number","format":"double","description":"Difference in change for the day."},"price":{"type":"number","format":"double","description":"Current price of market moving asset."}},"required":["symbol","percent_change","change","price"]},"movers_resp":{"type":"object","description":"Contains list of market movers.","properties":{"gainers":{"type":"array","description":"List of top N gainers.","items":{"$ref":"#/components/schemas/mover"}},"losers":{"description":"List of top N losers.","type":"array","items":{"$ref":"#/components/schemas/mover"}},"market_type":{"$ref":"#/components/schemas/market_type"},"last_updated":{"type":"string","description":"Time when the movers were last computed. Formatted as a RFC-3339 date-time with nanosecond precision.\n"}},"required":["gainers","losers","market_type","last_updated"]},"crypto_perp_loc":{"type":"string","enum":["global"],"description":"Crypto perpetual location.","x-go-name":"TypePerpLoc"},"crypto_bar":{"type":"object","description":"OHLC aggregate of all the trades in a given interval.","example":{"t":"2022-05-27T10:18:00Z","o":28999,"h":29003,"l":28999,"c":29003,"v":0.01,"n":4,"vw":29001},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"o":{"type":"number","format":"double","description":"Opening price.","x-go-name":"Open"},"h":{"type":"number","format":"double","description":"High price.","x-go-name":"High"},"l":{"type":"number","format":"double","description":"Low price.","x-go-name":"Low"},"c":{"type":"number","format":"double","description":"Closing price.","x-go-name":"Close"},"v":{"type":"number","format":"double","description":"Bar volume.","x-go-name":"Volume"},"n":{"type":"integer","format":"int64","description":"Trade count in the bar.","x-go-name":"TradeCount"},"vw":{"type":"number","format":"double","description":"Volume weighted average price.","x-go-name":"VWAP"}},"required":["t","o","h","l","c","v","n","vw"]},"crypto_latest_bars_resp":{"type":"object","properties":{"bars":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/crypto_bar"}}},"required":["bars"]},"crypto_perp_futures_pricing":{"type":"object","description":"Crypto perpetual futures pricing data.","example":{"t":"2022-05-27T10:18:00Z","ft":"2022-05-27T10:18:00Z","oi":90.7367,"ip":50702.8,"mp":50652.3553,"fr":0.000565699},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"ft":{"type":"string","format":"date-time","description":"Next funding time","x-go-name":"NextFundingTime"},"oi":{"type":"number","format":"double","description":"Open interest.","x-go-name":"OpenInterest"},"ip":{"type":"number","format":"double","description":"Index price.","x-go-name":"IndexPrice"},"mp":{"type":"number","format":"double","description":"Mark price.","x-go-name":"MarkPrice"},"fr":{"type":"number","format":"double","description":"Funding rate.","x-go-name":"FundingRate"}},"required":["t","ft","oi","ip","mp","fr"]},"crypto_perp_latest_futures_pricing_resp":{"type":"object","properties":{"pricing":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/crypto_perp_futures_pricing"}}},"required":["pricing"]},"crypto_orderbook_entry":{"type":"object","description":"A single entry in a crypto orderbook.","example":{"p":20846,"s":0.1902},"properties":{"p":{"type":"number","format":"double","description":"Price.","x-go-name":"Price"},"s":{"type":"number","format":"double","description":"Size.","x-go-name":"Size"}},"required":["p","s"]},"crypto_orderbook":{"type":"object","description":"Snapshot of the orderbook.","example":{"t":"2022-06-24T08:00:14.137774336Z","b":[{"p":20846,"s":0.1902},{"p":20350,"s":0}],"a":[{"p":20902,"s":0.0097},{"p":21444,"s":0}]},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"b":{"type":"array","items":{"$ref":"#/components/schemas/crypto_orderbook_entry"},"x-go-name":"Bids"},"a":{"type":"array","items":{"$ref":"#/components/schemas/crypto_orderbook_entry"},"x-go-name":"Asks"}},"required":["t","b","a"]},"crypto_latest_orderbooks_resp":{"type":"object","properties":{"orderbooks":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/crypto_orderbook"}}},"required":["orderbooks"]},"crypto_quote":{"type":"object","description":"The best bid and ask information for a given security.","example":{"t":"2022-05-26T11:47:18.44347136Z","bp":29058,"bs":0.3544,"ap":29059,"as":3.252},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"bp":{"type":"number","format":"double","description":"Bid price.","x-go-name":"BidPrice"},"bs":{"type":"number","format":"double","description":"Bid size.","x-go-name":"BidSize"},"ap":{"type":"number","format":"double","description":"Ask price.","x-go-name":"AskPrice"},"as":{"type":"number","format":"double","description":"Ask size.","x-go-name":"AskSize"}},"required":["t","bp","bs","ap","as"]},"crypto_latest_quotes_resp":{"type":"object","properties":{"quotes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/crypto_quote"}}},"required":["quotes"]},"crypto_trade":{"type":"object","description":"A crypto trade.","example":{"t":"2022-05-18T12:00:05.225055Z","p":29798,"s":0.1209,"tks":"S","i":31455277},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"p":{"type":"number","format":"double","description":"Trade price.","x-go-name":"Price"},"s":{"type":"number","format":"double","description":"Trade size.","x-go-name":"Size"},"i":{"type":"integer","format":"int64","description":"Trade ID.","x-go-name":"ID"},"tks":{"type":"string","description":"Taker side: B for buyer, S for seller\n","x-go-name":"TakerSide"}},"required":["t","p","s","i","tks"]},"crypto_latest_trades_resp":{"type":"object","properties":{"trades":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/crypto_trade"}}},"required":["trades"]},"crypto_loc":{"type":"string","enum":["us","us-1"],"description":"Crypto location.","x-go-name":"TypeLoc"},"crypto_bars_resp":{"type":"object","properties":{"bars":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/crypto_bar"}}},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["bars","next_page_token"]},"crypto_quotes_resp":{"type":"object","properties":{"quotes":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/crypto_quote"}}},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["quotes","next_page_token"]},"crypto_snapshot":{"type":"object","description":"A snapshot provides the latest trade, latest quote, latest minute bar, latest daily bar and previous daily bar.\n","properties":{"dailyBar":{"$ref":"#/components/schemas/crypto_bar"},"latestQuote":{"$ref":"#/components/schemas/crypto_quote"},"latestTrade":{"$ref":"#/components/schemas/crypto_trade"},"minuteBar":{"$ref":"#/components/schemas/crypto_bar"},"prevDailyBar":{"$ref":"#/components/schemas/crypto_bar"}}},"crypto_snapshots_resp":{"type":"object","properties":{"snapshots":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/crypto_snapshot"}}},"required":["snapshots"]},"crypto_trades_resp":{"type":"object","properties":{"trades":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/crypto_trade"}}},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["trades","next_page_token"]},"stock_auction_feed":{"type":"string","default":"sip"},"date":{"type":"string","description":"Date in RFC-3339.","format":"date","x-go-name":"Date"},"stock_auction":{"type":"object","description":"An auction\n","example":{"t":"2022-10-13T13:30:01.688322951Z","x":"Q","c":"O","p":135},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"x":{"type":"string","description":"Exchange code. See `v2/stocks/meta/exchanges` for more details."},"p":{"type":"number","format":"double","description":"Auction price.","x-go-name":"Price"},"s":{"type":"integer","format":"int64","description":"Auction trade size.","x-go-name":"Size"},"c":{"description":"The condition flag indicating that this is an auction. See `v2/stocks/meta/conditions/trade` for more details.\n","type":"string","x-go-name":"Condition"}},"required":["t","x","p","c"]},"stock_daily_auctions":{"type":"object","description":"Opening and closing auction prices for a given day.\n","properties":{"d":{"$ref":"#/components/schemas/date"},"o":{"type":"array","description":"Opening auctions.","items":{"$ref":"#/components/schemas/stock_auction"},"x-go-name":"Opens"},"c":{"type":"array","description":"Closing auctions. Every price / exchange / condition triplet is only shown once, with its earliest timestamp.","items":{"$ref":"#/components/schemas/stock_auction"},"x-go-name":"Closes"}},"required":["d","o","c"]},"stock_auctions_resp":{"type":"object","properties":{"auctions":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/stock_daily_auctions"}}},"currency":{"type":"string"},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["auctions","next_page_token"]},"stock_bar_adjustment":{"type":"string","enum":["raw","split","dividend","all"],"default":"raw"},"stock_historical_feed":{"type":"string","enum":["iex","otc","sip","boats"],"default":"sip"},"stock_bar":{"type":"object","description":"OHLC aggregate of all the trades in a given interval.\n","example":{"t":"2022-01-03T09:00:00Z","o":178.26,"h":178.34,"l":177.76,"c":178.08,"v":60937,"n":1727,"vw":177.954244},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"o":{"type":"number","format":"double","description":"Opening price.","x-go-name":"Open"},"h":{"type":"number","format":"double","description":"High price.","x-go-name":"High"},"l":{"type":"number","format":"double","description":"Low price.","x-go-name":"Low"},"c":{"type":"number","format":"double","description":"Closing price.","x-go-name":"Close"},"v":{"type":"integer","format":"int64","description":"Bar volume.","x-go-name":"Volume"},"n":{"type":"integer","format":"int64","description":"Trade count in the bar.","x-go-name":"TradeCount"},"vw":{"type":"number","format":"double","description":"Volume weighted average price.","x-go-name":"VWAP"}},"required":["t","o","h","l","c","v","n","vw"]},"stock_bars_resp":{"type":"object","properties":{"bars":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/stock_bar"}}},"next_page_token":{"$ref":"#/components/schemas/next_page_token"},"currency":{"type":"string"}},"required":["bars","next_page_token"]},"stock_latest_feed":{"type":"string","enum":["delayed_sip","iex","otc","sip","boats","overnight"]},"stock_latest_bars_resp":{"type":"object","properties":{"bars":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/stock_bar"}},"currency":{"type":"string"}},"required":["bars"]},"stock_conditions":{"type":"object","additionalProperties":{"type":"string"},"example":{"@":"Regular Sale","A":"Acquisition","B":"Bunched Trade"}},"stock_exchanges":{"type":"object","additionalProperties":{"type":"string"},"example":{"N":"New York Stock Exchange","V":"IEX"}},"stock_tape":{"type":"string","description":"- A: New York Stock Exchange\n- B: NYSE Arca, Bats, IEX and other regional exchanges\n- C: NASDAQ\n- N: Overnight\n- O: OTC\n","x-go-name":"Tape","enum":["A","B","C","N","O"]},"stock_quote":{"type":"object","description":"The best bid and ask information for a given security.","example":{"t":"2021-02-06T13:35:08.946977536Z","ax":"C","ap":387.7,"as":1,"bx":"N","bp":387.67,"bs":1,"c":["R"],"z":"C"},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"bx":{"type":"string","description":"Bid exchange. See `v2/stocks/meta/exchanges` for more details.","x-go-name":"BidExchange"},"bp":{"type":"number","format":"double","description":"Bid price. 0 means the security has no active bid.","x-go-name":"BidPrice"},"bs":{"type":"integer","format":"uint32","description":"Bid size in round lots.","x-go-name":"BidSize"},"ax":{"type":"string","description":"Ask exchange. See `v2/stocks/meta/exchanges` for more details.","x-go-name":"AskExchange"},"ap":{"type":"number","format":"double","description":"Ask price. 0 means the security has no active ask.","x-go-name":"AskPrice"},"as":{"type":"integer","format":"uint32","description":"Ask size in round lots.","x-go-name":"AskSize"},"c":{"description":"Condition flags. See `v2/stocks/meta/conditions/quote` for more details. If the array contains one flag, it applies to both the bid and ask. If the array contains two flags, the first one applies to the bid and the second one to the ask.\n","type":"array","items":{"type":"string"},"x-go-name":"Conditions"},"z":{"$ref":"#/components/schemas/stock_tape"}},"required":["t","bx","bp","bs","ap","as","ax","c","z"]},"stock_quotes_resp":{"type":"object","properties":{"quotes":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/stock_quote"}}},"currency":{"type":"string"},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["quotes","next_page_token"]},"stock_latest_quotes_resp":{"type":"object","properties":{"quotes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/stock_quote"}},"currency":{"type":"string"}},"required":["quotes"]},"stock_trade":{"type":"object","description":"A stock trade.","example":{"t":"2022-01-03T09:00:00.086175744Z","x":"P","p":178.26,"s":246,"c":["@","T"],"i":1,"z":"C"},"properties":{"t":{"$ref":"#/components/schemas/timestamp"},"x":{"type":"string","description":"Exchange code. See `v2/stocks/meta/exchanges` for more details.","x-go-name":"Exchange"},"p":{"type":"number","format":"double","description":"Trade price.","x-go-name":"Price"},"s":{"type":"integer","format":"uint32","description":"Trade size.","x-go-name":"Size"},"i":{"type":"integer","format":"uint64","description":"Trade ID sent by the exchange.","x-go-name":"ID"},"c":{"description":"Condition flags. See `v2/stocks/meta/conditions/trade` for more details.","type":"array","items":{"type":"string"},"x-go-name":"Conditions"},"z":{"$ref":"#/components/schemas/stock_tape"},"u":{"type":"string","x-go-name":"Update","description":"Update to the trade. This field is optional, if it's missing, the trade is valid. Otherwise, it can have these values:\n - canceled: indicates that the trade has been canceled\n - incorrect: indicates that the trade has been corrected and the given trade is no longer valid\n - corrected: indicates that this trade is the correction of a previous (incorrect) trade\n"}},"required":["t","i","x","p","s","c","z"]},"stock_snapshot":{"type":"object","description":"A snapshot provides the latest trade, latest quote, latest minute bar, current daily bar and previous daily bar.\n","properties":{"dailyBar":{"$ref":"#/components/schemas/stock_bar"},"latestQuote":{"$ref":"#/components/schemas/stock_quote"},"latestTrade":{"$ref":"#/components/schemas/stock_trade"},"minuteBar":{"$ref":"#/components/schemas/stock_bar"},"prevDailyBar":{"$ref":"#/components/schemas/stock_bar"}}},"stock_snapshots_resp":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/stock_snapshot"}},"stock_trades_resp":{"type":"object","properties":{"trades":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/stock_trade"}}},"currency":{"type":"string"},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["trades","next_page_token"]},"stock_latest_trades_resp":{"type":"object","properties":{"trades":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/stock_trade"}},"currency":{"type":"string"}},"required":["trades"]},"stock_auctions_resp_single":{"type":"object","properties":{"symbol":{"type":"string"},"auctions":{"type":"array","items":{"$ref":"#/components/schemas/stock_daily_auctions"}},"currency":{"type":"string"},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["auctions","next_page_token","symbol"]},"stock_bars_resp_single":{"type":"object","properties":{"symbol":{"type":"string"},"bars":{"type":"array","items":{"$ref":"#/components/schemas/stock_bar"}},"currency":{"type":"string"},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["bars","next_page_token","symbol"]},"stock_latest_bars_resp_single":{"type":"object","properties":{"bar":{"$ref":"#/components/schemas/stock_bar"},"symbol":{"type":"string"},"currency":{"type":"string"}},"required":["bar","symbol"]},"stock_quotes_resp_single":{"type":"object","properties":{"symbol":{"type":"string"},"quotes":{"type":"array","items":{"$ref":"#/components/schemas/stock_quote"}},"currency":{"type":"string"},"next_page_token":{"$ref":"#/components/schemas/next_page_token"}},"required":["quotes","next_page_token","symbol"]},"stock_latest_quotes_resp_single":{"type":"object","properties":{"quote":{"$ref":"#/components/schemas/stock_quote"},"symbol":{"type":"string"},"currency":{"type":"string"}},"required":["quote","symbol"]},"stock_snapshots_resp_single":{"allOf":[{"type":"object","properties":{"symbol":{"type":"string"},"currency":{"type":"string"}}},{"$ref":"#/components/schemas/stock_snapshot"}]},"stock_trades_resp_single":{"type":"object","properties":{"symbol":{"type":"string"},"trades":{"type":"array","items":{"$ref":"#/components/schemas/stock_trade"}},"next_page_token":{"$ref":"#/components/schemas/next_page_token"},"currency":{"type":"string"}},"required":["trades","next_page_token","symbol"]},"stock_latest_trades_resp_single":{"type":"object","properties":{"trade":{"$ref":"#/components/schemas/stock_trade"},"symbol":{"type":"string"},"currency":{"type":"string"}},"required":["trade","symbol"]}},"headers":{"ratelimit_limit":{"schema":{"type":"integer"},"example":100,"description":"Request limit per minute."},"ratelimit_remaining":{"schema":{"type":"integer"},"example":90,"description":"Request limit per minute remaining."},"ratelimit_reset":{"schema":{"type":"integer"},"example":1674044551,"description":"The UNIX epoch when the remaining quota changes."}},"responses":{"400":{"description":"One of the request parameters is invalid. See the returned message for details.\n","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}}},"401":{"description":"Authentication headers are missing or invalid. Make sure you authenticate your request with a valid API key.\n"},"403":{"description":"The requested resource is forbidden.\n"},"429":{"description":"Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit.\n","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/ratelimit_limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/ratelimit_remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/ratelimit_reset"}}},"500":{"description":"Internal server error. We recommend retrying these later. If the issue persists, please contact us on [Slack](https://alpaca.markets/slack) or on the [Community Forum](https://forum.alpaca.markets/).\n"}}}}