Stock Market Indexes API


OVERVIEW
This endpoint allows you to get real-time index prices, such as the Nasdaq or S&P 500. The ticker, change, price, and index name are the fields that are returned. It will return all important indexes if you use the endpoint /api/v3/quotes/index.

We also support historical prices, which you can find using our historical index prices endpoint.

Stock Market Indexes API


OVERVIEW
This endpoint allows you to get real-time index prices, such as the Nasdaq or S&P 500. The ticker, change, price, and index name are the fields that are returned. It will return all important indexes if you use the endpoint /api/v3/quotes/index.

We also support historical prices, which you can find using our historical index prices endpoint.

Stock Market Indexes

https://financialmodelingprep.com/api/v3/quote/%5EGSPC,%5EDJI,%5EIXIC?apikey=YOUR_API_KEY

curl https://financialmodelingprep.com/api/v3/quote/%5EGSPC,%5EDJI,%5EIXIC
[ {
  "symbol" : "^DJI",
  "name" : "Dow Jones Industrial Average",
  "price" : 32845.13000000,
  "changesPercentage" : 0.96997600,
  "change" : 315.52930000,
  "dayLow" : 32493.02000000,
  "dayHigh" : 32910.18000000,
  "yearHigh" : 36952.65000000,
  "yearLow" : 29653.29000000,
  "marketCap" : null,
  "priceAvg50" : 31597.23800000,
  "priceAvg200" : 34025.71500000,
  "volume" : 490272653,
  "avgVolume" : 415056935,
  "exchange" : "INDEX",
  "open" : 32515.62000000,
  "previousClose" : 32529.60000000,
  "eps" : null,
  "pe" : null,
  "earningsAnnouncement" : null,
  "sharesOutstanding" : null,
  "timestamp" : 1659314554
}, {
  "symbol" : "^GSPC",
  "name" : "S&P 500",
  "price" : 4130.29000000,
  "changesPercentage" : 1.42077600,
  "change" : 57.86010700,
  "dayLow" : 4079.22000000,
  "dayHigh" : 4140.15000000,
  "yearHigh" : 4818.62000000,
  "yearLow" : 3636.87000000,
  "marketCap" : null,
  "priceAvg50" : 3921.60990000,
  "priceAvg200" : 4346.05130000,
  "volume" : 2894154000,
  "avgVolume" : 3884030161,
  "exchange" : "INDEX",
  "open" : 4087.33000000,
  "previousClose" : 4072.43000000,
  "eps" : null,
  "pe" : null,
  "earningsAnnouncement" : null,
  "sharesOutstanding" : null,
  "timestamp" : 1659314554
}, {
  "symbol" : "^IXIC",
  "name" : "NASDAQ Composite",
  "price" : 12390.68750000,
  "changesPercentage" : 1.87532190,
  "change" : 228.08789000,
  "dayLow" : 12181.13000000,
  "dayHigh" : 12426.26400000,
  "yearHigh" : 16212.23000000,
  "yearLow" : 10565.14000000,
  "marketCap" : null,
  "priceAvg50" : 11531.97700000,
  "priceAvg200" : 13628.31300000,
  "volume" : 4309335000,
  "avgVolume" : 5127609193,
  "exchange" : "INDEX",
  "open" : 12239.70000000,
  "previousClose" : 12162.59300000,
  "eps" : null,
  "pe" : null,
  "earningsAnnouncement" : null,
  "sharesOutstanding" : null,
  "timestamp" : 1659314554
} ]

STOCK_MARKET_INDEXES_WITH JAVA


URL url = new URL("https://financialmodelingprep.com/api/v3/quote/%5EGSPC,%5EDJI,%5EIXIC?apikey=YOUR_API_KEY");

try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"))) {
    for (String line; (line = reader.readLine()) != null;) {
    System.out.println(line);
  }
}
Resource List :