Skip to content

Latest commit

 

History

History
901 lines (530 loc) · 24.2 KB

StockExchangeApi.md

File metadata and controls

901 lines (530 loc) · 24.2 KB

intrinioSDK.StockExchangeApi

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

Method HTTP request Description
getAllStockExchanges GET /stock_exchanges All Stock Exchanges
getStockExchangeBetas GET /stock_exchanges/{identifier}/betas Security Betas
getStockExchangeById GET /stock_exchanges/{identifier} Lookup Stock Exchange
getStockExchangeGainers GET /stock_exchanges/{identifier}/gainers Top Gainers by Exchange
getStockExchangeLosers GET /stock_exchanges/{identifier}/losers Top Losers by Exchange
getStockExchangePriceAdjustments GET /stock_exchanges/{identifier}/prices/adjustments Stock Price Adjustments by Exchange
getStockExchangePrices GET /stock_exchanges/{identifier}/prices Stock Prices by Exchange
getStockExchangeQuote GET /stock_exchanges/{identifier}/quote Realtime Quote Prices by Exchange
getStockExchangeRealtimePrices GET /stock_exchanges/{identifier}/prices/realtime Realtime Stock Prices by Exchange
getStockExchangeSecurities GET /stock_exchanges/{identifier}/securities Securities by Exchange

getAllStockExchanges

View Intrinio API Documentation

ApiResponseStockExchanges getAllStockExchanges(opts)

All Stock Exchanges

Returns all Stock Exchanges matching the specified parameters

Example

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var opts = { 
  'city': "New York",
  'country': "UNITED STATES OF AMERICA",
  'countryCode': "US",
  'pageSize': 100
};

stockExchange.getAllStockExchanges(opts).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
city String Filter by city [optional]  
country String Filter by country [optional]  
countryCode String Filter by ISO country code [optional]  
pageSize Number The number of results to return [optional] [default to 100]  

Return type

ApiResponseStockExchanges

getStockExchangeBetas

View Intrinio API Documentation

ApiResponseStockExchangeBetas getStockExchangeBetas(identifier, opts)

Security Betas

Returns security beta data in the Stock Exchange with the given `identifier`

Example

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var identifier = "USCOMP";


var opts = { 
  'type': "weekly",
  'date': "2024-04-24",
  'pageSize': 100,
  'nextPage': null
};

stockExchange.getStockExchangeBetas(identifier, opts).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
type String Only of the given type [optional] [default to weekly]  
date Object Return data for this period end date. [optional]  
pageSize Number The number of results to return [optional] [default to 100]  
nextPage String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseStockExchangeBetas

getStockExchangeById

View Intrinio API Documentation

StockExchange getStockExchangeById(identifier)

Lookup Stock Exchange

Returns the Stock Exchange with the given `identifier`

Example

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var identifier = "USCOMP";


stockExchange.getStockExchangeById(identifier).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

Parameters

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

Return type

StockExchange

getStockExchangeGainers

View Intrinio API Documentation

ApiResponseStockExchangeMovers getStockExchangeGainers(identifier, opts)

Top Gainers by Exchange

Returns securities with the highest gain percent change traded on the chosen stock exchange.

Example

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var identifier = "USCOMP";


var opts = { 
  'minPrice': 8.14,
  'pageSize': 100,
  'source': "delayed_sip"
};

stockExchange.getStockExchangeGainers(identifier, opts).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
minPrice Number The minimum price filter [optional]  
pageSize Number The number of results to return [optional] [default to 100]  
source String Return the realtime price from the specified source instead of the most recent. [optional]  

Return type

ApiResponseStockExchangeMovers

getStockExchangeLosers

View Intrinio API Documentation

ApiResponseStockExchangeMovers getStockExchangeLosers(identifier, opts)

Top Losers by Exchange

Returns securities with the highest loss percent change traded on the chosen stock exchange.

Example

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var identifier = "USCOMP";


var opts = { 
  'minPrice': 8.14,
  'pageSize': 100,
  'source': "delayed_sip"
};

stockExchange.getStockExchangeLosers(identifier, opts).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
minPrice Number The minimum price filter [optional]  
pageSize Number The number of results to return [optional] [default to 100]  
source String Return the realtime price from the specified source instead of the most recent. [optional]  

Return type

ApiResponseStockExchangeMovers

getStockExchangePriceAdjustments

View Intrinio API Documentation

ApiResponseStockExchangeStockPriceAdjustments getStockExchangePriceAdjustments(identifier, opts)

Stock Price Adjustments by Exchange

Returns stock price adjustments for the Stock Exchange with the given `identifier`

Example

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var identifier = "USCOMP";


var opts = { 
  'date': new Date("2018-08-14"),
  'pageSize': 100,
  'nextPage': null
};

stockExchange.getStockExchangePriceAdjustments(identifier, opts).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

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]  
pageSize Number The number of results to return [optional] [default to 100]  
nextPage String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseStockExchangeStockPriceAdjustments

getStockExchangePrices

View Intrinio API Documentation

ApiResponseStockExchangeStockPrices getStockExchangePrices(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

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var identifier = "USCOMP";


var opts = { 
  'date': new Date("2018-08-14"),
  'startDate': new Date("2020-08-14"),
  'endDate': new Date("2022-08-14"),
  'pageSize': 100,
  'nextPage': null,
  'tickers': ["AAPL,MSFT,NVDA"],
  'nextPage2': null
};

stockExchange.getStockExchangePrices(identifier, opts).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

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]  
startDate Date The start of the date range you're querying. May not be used with date parameter. [optional]  
endDate Date The end of the date range you're querying. May not be used with date parameter. [optional]  
pageSize Number The number of results to return [optional] [default to 100]  
nextPage String Gets the next page of data from a previous API call [optional]  
tickers [String] The comma-delimited list of ticker symbols to filter down to. If not provided, the entire stock exchange is returned. [optional]  
nextPage2 String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseStockExchangeStockPrices

getStockExchangeQuote

View Intrinio API Documentation

ApiResponseStockExchangeQuote getStockExchangeQuote(identifier, tickers, opts)

Realtime Quote Prices by Exchange

Returns many popular metrics for securities from a given exchange 'identifier' from multiple products conveniently in one API. Realtime stock price data requires at least one realtime product subscription (IEX, NASDAQ Basic, and/or Delayed SIP). If you are subscribed to multiple realtime stock price products, the api will return the most recent realtime stock price. Previous close price and percent change fields require both an EoD US Stock Price subscription and a realtime stock price subscription. Market_cap, price_to_earnings, and dividendyield data fields require a fundamentals subscription.

Example

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var identifier = "USCOMP";
var tickers = ["AAPL,MSFT,NVDA"];


var opts = { 
  'source': "delayed_sip",
  'activeOnly': null
};

stockExchange.getStockExchangeQuote(identifier, tickers, opts).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
tickers [String] The comma-delimited list of ticker symbols to return quotes for.  
source String Return the realtime price from the specified source instead of the most recent. [optional]  
activeOnly Boolean Returns prices only from the most recent trading day. [optional]  

Return type

ApiResponseStockExchangeQuote

getStockExchangeRealtimePrices

View Intrinio API Documentation

ApiResponseStockExchangeRealtimeStockPrices getStockExchangeRealtimePrices(identifier, opts)

Realtime Stock Prices by Exchange

Returns realtime stock prices for the Stock Exchange with the given `identifier`

Example

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var identifier = "USCOMP";


var opts = { 
  'source': ["iex,delayed_sip"],
  'activeOnly': null,
  'tradedToday': null,
  'pageSize': 100,
  'tickers': ["AAPL,MSFT,NVDA"],
  'nextPage': null
};

stockExchange.getStockExchangeRealtimePrices(identifier, opts).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
source [String] Return realtime prices from the specified comma-delimited data sources. If no source is specified, all sources available to user are used. [optional]  
activeOnly Boolean Returns prices only from the most recent trading day. [optional]  
tradedToday Boolean Returns prices only from securities which have traded on the most recent trading day. [optional]  
pageSize Number The number of results to return [optional] [default to 100]  
tickers [String] The comma-delimited list of ticker symbols to filter to. If not provided, the entire stock exchange is returned. [optional]  
nextPage String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseStockExchangeRealtimeStockPrices

getStockExchangeSecurities

View Intrinio API Documentation

ApiResponseStockExchangeSecurities getStockExchangeSecurities(identifier, opts)

Securities by Exchange

Returns Securities traded on the Stock Exchange with `identifier`

Example

var intrinioSDK = require('intrinio-sdk');
intrinioSDK.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = "YOUR_API_KEY";
intrinioSDK.ApiClient.instance.enableRetries = true;

var stockExchange = new intrinioSDK.StockExchangeApi();

var identifier = "USCOMP";


var opts = { 
  'pageSize': 100,
  'nextPage': null
};

stockExchange.getStockExchangeSecurities(identifier, opts).then(function(data) {
  data = JSON.stringify(data, null, 2)
  console.log(data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
pageSize Number The number of results to return [optional] [default to 100]  
nextPage String Gets the next page of data from a previous API call [optional]  

Return type

ApiResponseStockExchangeSecurities