# Market Data Web Services API

The Market Data Web Services API provides immediate, on-demand access to Morningstar's complete set of financial market data. 

Applications can access real-time, delayed or end-of-day pricing data, historical data and related content using industry protocols and data formats like XML and JSON.

You can query instruments using a number of different identifiers including Morningstar-defined investment IDs, performance IDs and instruments, as well as ISINs.

**Table of Contents**

* [Services](#services-id)
* [Authentication](#auth-id)
* [Protocols and Compression](#protocols-id)
* [Requests](#requests-id)
* [Request Limits](#request-limit-id)
* [Responses](#response-id)


### Services {#services-id}
A number of core services are delivered as standard to all clients. Add-on services are available and are enabled separately and priced individually.

##### Core

* [Delisted Listings](/apis/market-data/delisted-instruments)
* [End-of-Day OHLCV](/apis/market-data/end-of-day-ohlcv)
* [Exchange Information](/apis/market-data/exchange-information)
* [Historical Price Adjustments](/apis/market-data/historical-price-adjustments)
* [Index Constituents](/apis/market-data/index-constituents)
* [Index Statistics](/apis/market-data/index-statistics)
* [New Listings](/apis/market-data/new-listings)
* [Price & Quote Requests](/apis/market-data/price-quote)

##### Add-Ons

* [Alerts](/apis/market-data/alerts)
* [Corporate Actions](/apis/market-data/corporate-actions)
* [Price History](/apis/market-data/price-history)
* [Search](/apis/market-data/search)
* [Streaming]()
* [Time and Sales](/apis/market-data/time-sales)

### Authentication {#auth-id}

For security reasons, only client-specific IP addresses are enabled to use the service.

Clients are assigned a unique username and password All requests sent by a client must contain the unique username and password.

To authenticate requests to the API, you must pass your account credentials in the request.

For example:

````
http://{UATServer}/Index.php?username={Username}&password={Password}&exchangeinfo=151

````


### Protocols and Compression {#protocols-id}

|||
|:-----|:------|
|**Protocols**|HTTP protocol 1.1 (recommended) |
||HTTPS also supported.|
||WebSockets supported for Streaming service.|
||WebSockets Secure also supported.|
|**Compression**|HTTP compression supported.|


### Requests {#requests-id}

Requests have the following structure:

````
http://{server-url}/{endpoint}?{username={**********}&password={********}}&{parameter=value}&{parameter}

````

---

#### Server URLs

Multiple servers are available. You should connect to the server in your region:

* Chicago
* Dallas
* Frankfurt
* London
* Shanghai

---

#### Endpoints

The endpoint you call depends on the service you are using. 

---

#### Parameters

Query parameters appear in the URL after your user credentials. Different `name=value` pairs are separated by ampersands (`&`). 

A parameter can have multiple values. Multiple values must be comma-separated. Spaces are not allowed.

Some parameters do not have values and are usually appended to the end of the request with an ampersand (`&`)

### Request Limits {#request-limit-id}

The number of instruments that can be requested per second depends on the number of instruments your account is enabled for.

The service can handle:

* Up to 500 requests per second.
* Up to 500 instruments included in one request.



### Responses {#response-id}

|||
|:------|:-------|
|XML|XML is the default response format.|
|JSON|To receive a response in JSON format, you append the following tag to the request: `JSONShort`|