Skip to content

Latest commit

 

History

History
651 lines (416 loc) · 19.7 KB

StockExchangeApi.md

File metadata and controls

651 lines (416 loc) · 19.7 KB

StockExchangeApi

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

Method HTTP request Description
getAllStockExchanges GET /stock_exchanges All Stock Exchanges
getStockExchangeById GET /stock_exchanges/{identifier} Lookup Stock 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(city, country, countryCode, pageSize)

All Stock Exchanges

Returns all Stock Exchanges matching the specified parameters

Example

import com.intrinio.api.*;
import com.intrinio.models.*;
import com.intrinio.invoker.*;
import com.intrinio.invoker.auth.*;
import org.threeten.bp.*;
import java.math.BigDecimal;
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {

    ApiClient defaultClient = Configuration.getDefaultApiClient();
    ApiKeyAuth auth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    auth.setApiKey("YOUR_API_KEY");
    defaultClient.setAllowRetries(true);

    StockExchangeApi stockExchangeApi = new StockExchangeApi();
    String city = "New York";
    String country = "UNITED STATES OF AMERICA";
    String countryCode = "US";
    Integer pageSize = 100;
    ApiResponseStockExchanges result = stockExchangeApi.getAllStockExchanges(city, country, countryCode, pageSize);
    System.out.println(result);
  }
}

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 Integer The number of results to return [optional] [default to 100]  

Return type

ApiResponseStockExchanges

getStockExchangeById

View Intrinio API Documentation

StockExchange getStockExchangeById(identifier)

Lookup Stock Exchange

Returns the Stock Exchange with the given `identifier`

Example

import com.intrinio.api.*;
import com.intrinio.models.*;
import com.intrinio.invoker.*;
import com.intrinio.invoker.auth.*;
import org.threeten.bp.*;
import java.math.BigDecimal;
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {

    ApiClient defaultClient = Configuration.getDefaultApiClient();
    ApiKeyAuth auth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    auth.setApiKey("YOUR_API_KEY");
    defaultClient.setAllowRetries(true);

    StockExchangeApi stockExchangeApi = new StockExchangeApi();
    String identifier = "USCOMP";
    StockExchange result = stockExchangeApi.getStockExchangeById(identifier);
    System.out.println(result);
  }
}

Parameters

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

Return type

StockExchange

getStockExchangePriceAdjustments

View Intrinio API Documentation

ApiResponseStockExchangeStockPriceAdjustments getStockExchangePriceAdjustments(identifier, date, pageSize, nextPage)

Stock Price Adjustments by Exchange

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

Example

import com.intrinio.api.*;
import com.intrinio.models.*;
import com.intrinio.invoker.*;
import com.intrinio.invoker.auth.*;
import org.threeten.bp.*;
import java.math.BigDecimal;
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {

    ApiClient defaultClient = Configuration.getDefaultApiClient();
    ApiKeyAuth auth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    auth.setApiKey("YOUR_API_KEY");
    defaultClient.setAllowRetries(true);

    StockExchangeApi stockExchangeApi = new StockExchangeApi();
    String identifier = "USCOMP";
    LocalDate date = LocalDate.of(2018,8,14);
    Integer pageSize = 100;
    String nextPage = null;
    ApiResponseStockExchangeStockPriceAdjustments result = stockExchangeApi.getStockExchangePriceAdjustments(identifier, date, pageSize, nextPage);
    System.out.println(result);
  }
}

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
date LocalDate The date for which to return price adjustments [optional]  
pageSize Integer 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, date, startDate, endDate, pageSize, nextPage, tickers, nextPage2)

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

import com.intrinio.api.*;
import com.intrinio.models.*;
import com.intrinio.invoker.*;
import com.intrinio.invoker.auth.*;
import org.threeten.bp.*;
import java.math.BigDecimal;
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {

    ApiClient defaultClient = Configuration.getDefaultApiClient();
    ApiKeyAuth auth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    auth.setApiKey("YOUR_API_KEY");
    defaultClient.setAllowRetries(true);

    StockExchangeApi stockExchangeApi = new StockExchangeApi();
    String identifier = "USCOMP";
    LocalDate date = LocalDate.of(2018,8,14);
    LocalDate startDate = LocalDate.of(2020,8,14);
    LocalDate endDate = LocalDate.of(2022,8,14);
    Integer pageSize = 100;
    String nextPage = null;
    List<String> tickers = Arrays.asList("AAPL,MSFT,NVDA");
    String nextPage2 = null;
    ApiResponseStockExchangeStockPrices result = stockExchangeApi.getStockExchangePrices(identifier, date, startDate, endDate, pageSize, nextPage, tickers, nextPage2);
    System.out.println(result);
  }
}

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
date LocalDate The date for which to return prices. May not be used with the start_date and end_date parameters. [optional]  
startDate LocalDate The start of the date range you're querying. May not be used with date parameter. [optional]  
endDate LocalDate The end of the date range you're querying. May not be used with date parameter. [optional]  
pageSize Integer 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 List<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, source, activeOnly)

Realtime Quote Prices by Exchange

Returns quote prices for the Stock Exchange with the given `identifier`

Example

import com.intrinio.api.*;
import com.intrinio.models.*;
import com.intrinio.invoker.*;
import com.intrinio.invoker.auth.*;
import org.threeten.bp.*;
import java.math.BigDecimal;
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {

    ApiClient defaultClient = Configuration.getDefaultApiClient();
    ApiKeyAuth auth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    auth.setApiKey("YOUR_API_KEY");
    defaultClient.setAllowRetries(true);

    StockExchangeApi stockExchangeApi = new StockExchangeApi();
    String identifier = "USCOMP";
    List<String> tickers = Arrays.asList("AAPL,MSFT,NVDA");
    String source = "delayed_sip";
    Boolean activeOnly = null;
    ApiResponseStockExchangeQuote result = stockExchangeApi.getStockExchangeQuote(identifier, tickers, source, activeOnly);
    System.out.println(result);
  }
}

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
tickers List<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] [enum: iex, bats_delayed, utp_delayed, cta_a_delayed, cta_b_delayed, otc_delayed, delayed_sip, nasdaq_basic, intrinio_mx, intrinio_mx_plus]  
activeOnly Boolean Returns prices only from the most recent trading day. [optional]  

Return type

ApiResponseStockExchangeQuote

getStockExchangeRealtimePrices

View Intrinio API Documentation

ApiResponseStockExchangeRealtimeStockPrices getStockExchangeRealtimePrices(identifier, source, activeOnly, tradedToday, pageSize, tickers, nextPage)

Realtime Stock Prices by Exchange

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

Example

import com.intrinio.api.*;
import com.intrinio.models.*;
import com.intrinio.invoker.*;
import com.intrinio.invoker.auth.*;
import org.threeten.bp.*;
import java.math.BigDecimal;
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {

    ApiClient defaultClient = Configuration.getDefaultApiClient();
    ApiKeyAuth auth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    auth.setApiKey("YOUR_API_KEY");
    defaultClient.setAllowRetries(true);

    StockExchangeApi stockExchangeApi = new StockExchangeApi();
    String identifier = "USCOMP";
    List<String> source = Arrays.asList("iex,delayed_sip");
    Boolean activeOnly = null;
    Boolean tradedToday = null;
    Integer pageSize = 100;
    List<String> tickers = Arrays.asList("AAPL,MSFT,NVDA");
    String nextPage = null;
    ApiResponseStockExchangeRealtimeStockPrices result = stockExchangeApi.getStockExchangeRealtimePrices(identifier, source, activeOnly, tradedToday, pageSize, tickers, nextPage);
    System.out.println(result);
  }
}

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
source List<String> Return realtime prices from the specified comma-delimited data sources. If no source is specified, all sources available to user are used. [optional] [enum: iex, bats_delayed, utp_delayed, cta_a_delayed, cta_b_delayed, otc_delayed, delayed_sip, nasdaq_basic, intrinio_mx, intrinio_mx_plus]  
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 Integer The number of results to return [optional] [default to 100]  
tickers List<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, pageSize, nextPage)

Securities by Exchange

Returns Securities traded on the Stock Exchange with `identifier`

Example

import com.intrinio.api.*;
import com.intrinio.models.*;
import com.intrinio.invoker.*;
import com.intrinio.invoker.auth.*;
import org.threeten.bp.*;
import java.math.BigDecimal;
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {

    ApiClient defaultClient = Configuration.getDefaultApiClient();
    ApiKeyAuth auth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    auth.setApiKey("YOUR_API_KEY");
    defaultClient.setAllowRetries(true);

    StockExchangeApi stockExchangeApi = new StockExchangeApi();
    String identifier = "USCOMP";
    Integer pageSize = 100;
    String nextPage = null;
    ApiResponseStockExchangeSecurities result = stockExchangeApi.getStockExchangeSecurities(identifier, pageSize, nextPage);
    System.out.println(result);
  }
}

Parameters

Name Type Description Notes
identifier String A Stock Exchange identifier (MIC or Intrinio ID)  
pageSize Integer 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