# Intrinio::StockExchangeApi All URIs are relative to *https://api-v2.intrinio.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_all_stock_exchanges**](StockExchangeApi.md#get_all_stock_exchanges) | **GET** /stock_exchanges | All Stock Exchanges [**get_stock_exchange_by_id**](StockExchangeApi.md#get_stock_exchange_by_id) | **GET** /stock_exchanges/{identifier} | Lookup Stock Exchange [**get_stock_exchange_price_adjustments**](StockExchangeApi.md#get_stock_exchange_price_adjustments) | **GET** /stock_exchanges/{identifier}/prices/adjustments | Stock Price Adjustments by Exchange [**get_stock_exchange_prices**](StockExchangeApi.md#get_stock_exchange_prices) | **GET** /stock_exchanges/{identifier}/prices | Stock Prices by Exchange [**get_stock_exchange_realtime_prices**](StockExchangeApi.md#get_stock_exchange_realtime_prices) | **GET** /stock_exchanges/{identifier}/prices/realtime | Realtime Stock Prices by Exchange [**get_stock_exchange_securities**](StockExchangeApi.md#get_stock_exchange_securities) | **GET** /stock_exchanges/{identifier}/securities | Securities by Exchange [//]: # (START_OPERATION) [//]: # (CLASS:Intrinio::StockExchangeApi) [//]: # (METHOD:get_all_stock_exchanges) [//]: # (RETURN_TYPE:Intrinio::ApiResponseStockExchanges) [//]: # (RETURN_TYPE_KIND:object) [//]: # (RETURN_TYPE_DOC:ApiResponseStockExchanges.md) [//]: # (OPERATION:get_all_stock_exchanges_v2) [//]: # (ENDPOINT:/stock_exchanges) [//]: # (DOCUMENT_LINK:StockExchangeApi.md#get_all_stock_exchanges) ## **get_all_stock_exchanges** [**View Intrinio API Documentation**](https://docs.intrinio.com/documentation/ruby/get_all_stock_exchanges_v2) [//]: # (START_OVERVIEW) > ApiResponseStockExchanges get_all_stock_exchanges(opts) #### All Stock Exchanges Returns all Stock Exchanges matching the specified parameters [//]: # (END_OVERVIEW) ### Example [//]: # (START_CODE_EXAMPLE) ```ruby # Load the gem require 'intrinio-sdk' require 'pp' # Setup authorization Intrinio.configure do |config| config.api_key['api_key'] = 'YOUR_API_KEY' config.allow_retries = true end stockExchange_api = Intrinio::StockExchangeApi.new opts = { city: "New York", country: "UNITED STATES OF AMERICA", country_code: "US", page_size: 100 } result = stockExchange_api.get_all_stock_exchanges(opts) pp result ``` [//]: # (END_CODE_EXAMPLE) [//]: # (START_DEFINITION) ### Parameters [//]: # (START_PARAMETERS) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **city** | String| Filter by city | [optional]   **country** | String| Filter by country | [optional]   **country_code** | String| Filter by ISO country code | [optional]   **page_size** | Integer| The number of results to return | [optional] [default to 100]   [//]: # (END_PARAMETERS) ### Return type [**ApiResponseStockExchanges**](ApiResponseStockExchanges.md) [//]: # (END_OPERATION) [//]: # (START_OPERATION) [//]: # (CLASS:Intrinio::StockExchangeApi) [//]: # (METHOD:get_stock_exchange_by_id) [//]: # (RETURN_TYPE:Intrinio::StockExchange) [//]: # (RETURN_TYPE_KIND:object) [//]: # (RETURN_TYPE_DOC:StockExchange.md) [//]: # (OPERATION:get_stock_exchange_by_id_v2) [//]: # (ENDPOINT:/stock_exchanges/{identifier}) [//]: # (DOCUMENT_LINK:StockExchangeApi.md#get_stock_exchange_by_id) ## **get_stock_exchange_by_id** [**View Intrinio API Documentation**](https://docs.intrinio.com/documentation/ruby/get_stock_exchange_by_id_v2) [//]: # (START_OVERVIEW) > StockExchange get_stock_exchange_by_id(identifier) #### Lookup Stock Exchange Returns the Stock Exchange with the given `identifier` [//]: # (END_OVERVIEW) ### Example [//]: # (START_CODE_EXAMPLE) ```ruby # Load the gem require 'intrinio-sdk' require 'pp' # Setup authorization Intrinio.configure do |config| config.api_key['api_key'] = 'YOUR_API_KEY' config.allow_retries = true end stockExchange_api = Intrinio::StockExchangeApi.new identifier = "USCOMP" result = stockExchange_api.get_stock_exchange_by_id(identifier) pp result ``` [//]: # (END_CODE_EXAMPLE) [//]: # (START_DEFINITION) ### Parameters [//]: # (START_PARAMETERS) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **identifier** | String| A Stock Exchange identifier (MIC or Intrinio ID) |   [//]: # (END_PARAMETERS) ### Return type [**StockExchange**](StockExchange.md) [//]: # (END_OPERATION) [//]: # (START_OPERATION) [//]: # (CLASS:Intrinio::StockExchangeApi) [//]: # (METHOD:get_stock_exchange_price_adjustments) [//]: # (RETURN_TYPE:Intrinio::ApiResponseStockExchangeStockPriceAdjustments) [//]: # (RETURN_TYPE_KIND:object) [//]: # (RETURN_TYPE_DOC:ApiResponseStockExchangeStockPriceAdjustments.md) [//]: # (OPERATION:get_stock_exchange_price_adjustments_v2) [//]: # (ENDPOINT:/stock_exchanges/{identifier}/prices/adjustments) [//]: # (DOCUMENT_LINK:StockExchangeApi.md#get_stock_exchange_price_adjustments) ## **get_stock_exchange_price_adjustments** [**View Intrinio API Documentation**](https://docs.intrinio.com/documentation/ruby/get_stock_exchange_price_adjustments_v2) [//]: # (START_OVERVIEW) > ApiResponseStockExchangeStockPriceAdjustments get_stock_exchange_price_adjustments(identifier, opts) #### Stock Price Adjustments by Exchange Returns stock price adjustments for the Stock Exchange with the given `identifier` [//]: # (END_OVERVIEW) ### Example [//]: # (START_CODE_EXAMPLE) ```ruby # Load the gem require 'intrinio-sdk' require 'pp' # Setup authorization Intrinio.configure do |config| config.api_key['api_key'] = 'YOUR_API_KEY' config.allow_retries = true end stockExchange_api = Intrinio::StockExchangeApi.new identifier = "USCOMP" opts = { date: Date.parse("2018-08-14"), page_size: 100, next_page: nil } result = stockExchange_api.get_stock_exchange_price_adjustments(identifier, opts) pp result ``` [//]: # (END_CODE_EXAMPLE) [//]: # (START_DEFINITION) ### Parameters [//]: # (START_PARAMETERS) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **identifier** | String| A Stock Exchange identifier (MIC or Intrinio ID) |   **date** | Date| The date for which to return price adjustments | [optional]   **page_size** | Integer| The number of results to return | [optional] [default to 100]   **next_page** | String| Gets the next page of data from a previous API call | [optional]   [//]: # (END_PARAMETERS) ### Return type [**ApiResponseStockExchangeStockPriceAdjustments**](ApiResponseStockExchangeStockPriceAdjustments.md) [//]: # (END_OPERATION) [//]: # (START_OPERATION) [//]: # (CLASS:Intrinio::StockExchangeApi) [//]: # (METHOD:get_stock_exchange_prices) [//]: # (RETURN_TYPE:Intrinio::ApiResponseStockExchangeStockPrices) [//]: # (RETURN_TYPE_KIND:object) [//]: # (RETURN_TYPE_DOC:ApiResponseStockExchangeStockPrices.md) [//]: # (OPERATION:get_stock_exchange_prices_v2) [//]: # (ENDPOINT:/stock_exchanges/{identifier}/prices) [//]: # (DOCUMENT_LINK:StockExchangeApi.md#get_stock_exchange_prices) ## **get_stock_exchange_prices** [**View Intrinio API Documentation**](https://docs.intrinio.com/documentation/ruby/get_stock_exchange_prices_v2) [//]: # (START_OVERVIEW) > ApiResponseStockExchangeStockPrices get_stock_exchange_prices(identifier, opts) #### Stock Prices by Exchange Returns end-of-day stock prices for Securities on the Stock Exchange with `identifier` and on the `price_date` (or the latest date that prices are available) [//]: # (END_OVERVIEW) ### Example [//]: # (START_CODE_EXAMPLE) ```ruby # Load the gem require 'intrinio-sdk' require 'pp' # Setup authorization Intrinio.configure do |config| config.api_key['api_key'] = 'YOUR_API_KEY' config.allow_retries = true end stockExchange_api = Intrinio::StockExchangeApi.new identifier = "USCOMP" opts = { date: Date.parse("2018-08-14"), start_date: Date.parse("2020-08-14"), end_date: Date.parse("2022-08-14"), page_size: 100, next_page: nil, tickers: [nil], next_page2: nil } result = stockExchange_api.get_stock_exchange_prices(identifier, opts) pp result ``` [//]: # (END_CODE_EXAMPLE) [//]: # (START_DEFINITION) ### Parameters [//]: # (START_PARAMETERS) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **identifier** | String| A Stock Exchange identifier (MIC or Intrinio ID) |   **date** | Date| The date for which to return prices. May not be used with the start_date and end_date parameters. | [optional]   **start_date** | Date| The start of the date range you're querying. May not be used with date parameter. | [optional]   **end_date** | Date| The end of the date range you're querying. May not be used with date parameter. | [optional]   **page_size** | Integer| The number of results to return | [optional] [default to 100]   **next_page** | String| Gets the next page of data from a previous API call | [optional]   **tickers** | [**Array<String>**](String.md)| The list of ticker symbols to filter to. | [optional]   **next_page2** | String| Gets the next page of data from a previous API call | [optional]   [//]: # (END_PARAMETERS) ### Return type [**ApiResponseStockExchangeStockPrices**](ApiResponseStockExchangeStockPrices.md) [//]: # (END_OPERATION) [//]: # (START_OPERATION) [//]: # (CLASS:Intrinio::StockExchangeApi) [//]: # (METHOD:get_stock_exchange_realtime_prices) [//]: # (RETURN_TYPE:Intrinio::ApiResponseStockExchangeRealtimeStockPrices) [//]: # (RETURN_TYPE_KIND:object) [//]: # (RETURN_TYPE_DOC:ApiResponseStockExchangeRealtimeStockPrices.md) [//]: # (OPERATION:get_stock_exchange_realtime_prices_v2) [//]: # (ENDPOINT:/stock_exchanges/{identifier}/prices/realtime) [//]: # (DOCUMENT_LINK:StockExchangeApi.md#get_stock_exchange_realtime_prices) ## **get_stock_exchange_realtime_prices** [**View Intrinio API Documentation**](https://docs.intrinio.com/documentation/ruby/get_stock_exchange_realtime_prices_v2) [//]: # (START_OVERVIEW) > ApiResponseStockExchangeRealtimeStockPrices get_stock_exchange_realtime_prices(identifier, opts) #### Realtime Stock Prices by Exchange Returns realtime stock prices for the Stock Exchange with the given `identifier` [//]: # (END_OVERVIEW) ### Example [//]: # (START_CODE_EXAMPLE) ```ruby # Load the gem require 'intrinio-sdk' require 'pp' # Setup authorization Intrinio.configure do |config| config.api_key['api_key'] = 'YOUR_API_KEY' config.allow_retries = true end stockExchange_api = Intrinio::StockExchangeApi.new identifier = "USCOMP" opts = { source: [nil], active_only: nil, page_size: 100, tickers: [nil], next_page: nil } result = stockExchange_api.get_stock_exchange_realtime_prices(identifier, opts) pp result ``` [//]: # (END_CODE_EXAMPLE) [//]: # (START_DEFINITION) ### Parameters [//]: # (START_PARAMETERS) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **identifier** | String| A Stock Exchange identifier (MIC or Intrinio ID) |   **source** | [**Array<String>**](String.md)| Return realtime prices from the specified data source. If no source is specified, all sources are used. | [optional]   **active_only** | BOOLEAN| Returns prices only from the most recent trading day. | [optional]   **page_size** | Integer| The number of results to return | [optional] [default to 100]   **tickers** | [**Array<String>**](String.md)| The list of ticker symbols to filter to. | [optional]   **next_page** | String| Gets the next page of data from a previous API call | [optional]   [//]: # (END_PARAMETERS) ### Return type [**ApiResponseStockExchangeRealtimeStockPrices**](ApiResponseStockExchangeRealtimeStockPrices.md) [//]: # (END_OPERATION) [//]: # (START_OPERATION) [//]: # (CLASS:Intrinio::StockExchangeApi) [//]: # (METHOD:get_stock_exchange_securities) [//]: # (RETURN_TYPE:Intrinio::ApiResponseStockExchangeSecurities) [//]: # (RETURN_TYPE_KIND:object) [//]: # (RETURN_TYPE_DOC:ApiResponseStockExchangeSecurities.md) [//]: # (OPERATION:get_stock_exchange_securities_v2) [//]: # (ENDPOINT:/stock_exchanges/{identifier}/securities) [//]: # (DOCUMENT_LINK:StockExchangeApi.md#get_stock_exchange_securities) ## **get_stock_exchange_securities** [**View Intrinio API Documentation**](https://docs.intrinio.com/documentation/ruby/get_stock_exchange_securities_v2) [//]: # (START_OVERVIEW) > ApiResponseStockExchangeSecurities get_stock_exchange_securities(identifier, opts) #### Securities by Exchange Returns Securities traded on the Stock Exchange with `identifier` [//]: # (END_OVERVIEW) ### Example [//]: # (START_CODE_EXAMPLE) ```ruby # Load the gem require 'intrinio-sdk' require 'pp' # Setup authorization Intrinio.configure do |config| config.api_key['api_key'] = 'YOUR_API_KEY' config.allow_retries = true end stockExchange_api = Intrinio::StockExchangeApi.new identifier = "USCOMP" opts = { page_size: 100, next_page: nil } result = stockExchange_api.get_stock_exchange_securities(identifier, opts) pp result ``` [//]: # (END_CODE_EXAMPLE) [//]: # (START_DEFINITION) ### Parameters [//]: # (START_PARAMETERS) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **identifier** | String| A Stock Exchange identifier (MIC or Intrinio ID) |   **page_size** | Integer| The number of results to return | [optional] [default to 100]   **next_page** | String| Gets the next page of data from a previous API call | [optional]   [//]: # (END_PARAMETERS) ### Return type [**ApiResponseStockExchangeSecurities**](ApiResponseStockExchangeSecurities.md) [//]: # (END_OPERATION)