Skip to content

Latest commit

 

History

History
521 lines (308 loc) · 12.8 KB

StockExchangeApi.md

File metadata and controls

521 lines (308 loc) · 12.8 KB

Intrinio::StockExchangeApi

All URIs are relative to https://api-v2.intrinio.com

Method HTTP request Description
get_all_stock_exchanges GET /stock_exchanges All Stock Exchanges
get_stock_exchange_by_id GET /stock_exchanges/{identifier} Lookup Stock Exchange
get_stock_exchange_price_adjustments GET /stock_exchanges/{identifier}/prices/adjustments Stock Price Adjustments by Exchange
get_stock_exchange_prices GET /stock_exchanges/{identifier}/prices Stock Prices by Exchange
get_stock_exchange_realtime_prices GET /stock_exchanges/{identifier}/prices/realtime Realtime Stock Prices by Exchange
get_stock_exchange_securities GET /stock_exchanges/{identifier}/securities Securities by Exchange

get_all_stock_exchanges

View Intrinio API Documentation

ApiResponseStockExchanges get_all_stock_exchanges(opts)

All Stock Exchanges

Returns all Stock Exchanges matching the specified parameters

Example

# 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

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]  

Return type

ApiResponseStockExchanges

get_stock_exchange_by_id

View Intrinio API Documentation

StockExchange get_stock_exchange_by_id(identifier)

Lookup Stock Exchange

Returns the Stock Exchange with the given identifier

Example

# 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

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  

Return type

StockExchange

get_stock_exchange_price_adjustments

View Intrinio API Documentation

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

Example

# 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

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]  

Return type

ApiResponseStockExchangeStockPriceAdjustments

get_stock_exchange_prices

View Intrinio API Documentation

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)

Example

# 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_prices(identifier, opts)
pp result

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
date Date The date for which to return prices [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]  

Return type

ApiResponseStockExchangeStockPrices

get_stock_exchange_realtime_prices

View Intrinio API Documentation

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

Example

# 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,
  next_page: nil
}

result = stockExchange_api.get_stock_exchange_realtime_prices(identifier, opts)
pp result

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
source String 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]  
next_page String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseStockExchangeRealtimeStockPrices

get_stock_exchange_securities

View Intrinio API Documentation

ApiResponseStockExchangeSecurities get_stock_exchange_securities(identifier, opts)

Securities by Exchange

Returns Securities traded on the Stock Exchange with identifier

Example

# 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

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]  

Return type

ApiResponseStockExchangeSecurities