Stock Exchange API

The Stock Exchange API provides comprehensive information about over 100 markets around the world, including trading hours, location details, and number of listings.

Available endpoints:

(4.1)

From 7,265 users

3,500+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
196ms223ms260ms607ms1050ms

Didn't find what you were looking for? Suggest an improvement


/v1/stockexchange GET

https://api.api-ninjas.com/v1/stockexchange

Returns detailed information about stock exchanges matching the specified criteria. At least one parameter is required.

To get a list of all available stock exchanges, use the /v1/allstockexchanges endpoint.

Parameters

  • mic  optional

    Market Identifier Code (e.g., XNYS).

  • name  optional

    Stock exchange name (supports partial matching).

  • city  optional

    City where the exchange is located.

  • country  optional

    2-letter country code (ISO-3166-1 alpha-2) (e.g., US).

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

  • mic

    Market Identifier Code (e.g., XNYS).

  • name

    Stock exchange name.

  • city

    City where the exchange is located.

  • country

    Country code in ISO2 format (e.g., US).

  • iso2

    ISO2 country code.

  • description

    Description of the stock exchange.

  • address

    Physical address of the stock exchange.

  • website

    Official website of the stock exchange.

  • founded

    Date of establishment in YYYY-MM-DD format.

  • num_listings

    Number of listings on the stock exchange.

  • market_cap_usd

    Market capitalization in USD.

  • currency

    Currency used for market capitalization.

  • timezone

    Timezone of the stock exchange.

  • market_open

    Opening time of the stock exchange.

  • market_close

    Closing time of the stock exchange.

Sample Request Live Demo!

mic
name
city
country

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/stockexchange?mic=XNYS

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/stockexchange?symbol=^GSPC" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.


/v1/allstockexchanges GETBusiness and Professional tier only

https://api.api-ninjas.com/v1/allstockexchanges

Returns a list of all available stock exchanges and their details.

Parameters

This endpoint does not accept any parameters.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

Returns a list of all available stock exchanges and their details. The format is the same as the /v1/stockexchange endpoint.

Sample Request

https://api.api-ninjas.com/v1/allstockexchanges

Sample Response

JSON