Stock Prices by Exchange

Stock Prices by Exchange Ruby API Documentation

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)

API Class:
Intrinio::StockExchangeApi
Instance Method:
get_stock_exchange_prices()

Stock Price Code Example

Use my API Key
# 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: ["AAPL,MSFT,NVDA"],
next_page2: nil
}
result = stockExchange_api.get_stock_exchange_prices(identifier, opts)
pp result
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Parameters

NameTypeDescriptionNotes
identifierStringA Stock Exchange identifier (MIC or Intrinio ID) 
dateDateThe date for which to return prices. May not be used with the start_date and end_date parameters.[optional]  
start_dateDateThe start of the date range you're querying. May not be used with date parameter.[optional]  
end_dateDateThe end of the date range you're querying. May not be used with date parameter.[optional]  
page_sizeIntegerThe number of results to return[optional] [default to 100]  
next_pageStringGets the next page of data from a previous API call[optional]  
tickersArrayThe comma-delimited list of ticker symbols to filter down to. If not provided, the entire stock exchange is returned.[optional]  
next_page2StringGets the next page of data from a previous API call[optional]  

Return Type

object
Intrinio::ApiResponseStockExchangeStockPrices

Properties

NameTypeDescription
stock_pricesArrayThe stock prices for all Securities traded on the Stock Exchange on the given date  
stock_exchangeStockExchangeThe Stock Exchange resolved from the given identifier  
next_pageStringThe token required to request the next page of the data. If null, no further results are available.  
object
Intrinio::StockPrice

Properties

NameTypeDescription
dateDateThe calendar date that the stock price represents. For non-daily stock prices, this represents the last day in the period (end of the week, month, quarter, year, etc)  
intraperiodBOOLEANIf true, the stock price represents an unfinished period (be it day, week, quarter, month, or year), meaning that the close price is the latest price available, not the official close price for the period  
frequencyStringThe type of period that the stock price represents  
openFloatThe price at the beginning of the period  
highFloatThe highest price over the span of the period  
lowFloatThe lowest price over the span of the period  
closeFloatThe price at the end of the period  
volumeFloatThe number of shares exchanged during the period  
adj_openFloatThe price at the beginning of the period, adjusted for splits and dividends  
adj_highFloatThe highest price over the span of the period, adjusted for splits and dividends  
adj_lowFloatThe lowest price over the span of the period, adjusted for splits and dividends  
adj_closeFloatThe price at the end of the period, adjusted for splits and dividends  
adj_volumeFloatThe number of shares exchanged during the period, adjusted for splits and dividends  
factorFloatThe factor by which to multiply stock prices before this date, in order to calculate historically-adjusted stock prices.  
split_ratioFloatThe ratio of the stock split, if a stock split occurred.  
dividendFloatThe dividend amount, if a dividend was paid.  
changeFloatThe difference in price from the last price for this frequency  
percent_changeFloatThe percent difference in price from the last price for this frequency  
fifty_two_week_highFloatThe 52 week high price (daily only)  
fifty_two_week_lowFloatThe 52 week low price (daily only)  
securitySecuritySummaryThe Security of the stock price  
object
Intrinio::SecuritySummary

Properties

NameTypeDescription
idStringThe Intrinio ID for Security  
company_idStringThe Intrinio ID for the Company for which the Security is issued  
exchangeStringThe exchange's MIC  
exchange_micStringThe security's exchange MIC  
stock_exchange_idStringThe exchange's Intrinio ID  
nameStringThe name of the Security  
codeStringA 2-3 digit code classifying the Security (reference)  
currencyStringThe currency in which the Security is traded on the exchange  
tickerStringThe common/local ticker of the Security  
composite_tickerStringThe country-composite ticker of the Security  
figiStringThe OpenFIGI identifier  
composite_figiStringThe country-composite OpenFIGI identifier  
share_class_figiStringThe global-composite OpenFIGI identifier  
primary_listingBOOLEANIf true, the Security is the primary issue for the company, otherwise it is a secondary issue on a secondary stock exchange  
object
Intrinio::StockExchange

Properties

NameTypeDescription
idStringThe Intrinio ID for the Stock Exchange  
nameStringThe name of the exchange  
micStringThe Market Identifier Code (MIC) of the exchange  
acronymStringThe acronym of the exchange's name  
cityStringThe city in which the exchange is located  
countryStringThe country in which the exchange is located  
country_codeStringThe 2-digit code of the exchange's country  
websiteStringThe website of the exchange  
first_stock_price_dateDateThe earliest date for which Intrinio has stock prices for the exchange  
last_stock_price_dateDateThe latest date for which Intrinio has stock prices for the exchange