# Markets Discontinued

> Use the following API endpoint to obtain a list of discontinued market symbols.

Source: https://docs.tradingeconomics.com/markets/discontinued/

This endpoint provides a list of market symbols that have been discontinued, including the reason for discontinuation (e.g., Merged, Delisted).

## Discontinued markets

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/markets/discontinued?c={your_api_key}'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
import tradingeconomics as te
te.login('your_api_key')
te.getMarketsDiscontinued()
```

**JS**
*Using Requests:*
```js
const axios = require('axios');
(async () => {
    const your_api_key = 'your_api_key'
    const response = await axios.get(`https://api.tradingeconomics.com/markets/discontinued?c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getDiscontinuedMarkets().then(function(data){
  console.log(data)     
});
```

**C#**
*Using Requests:*
```c#
using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/discontinued?c=your_api_key"))
    {
        request.Headers.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
        var response = await httpClient.SendAsync(request);
        if (response.IsSuccessStatusCode)
        {
            var content = await response.Content.ReadAsStringAsync(); 
            Console.WriteLine(content);
        }
    }
}
```

The response data format can be configured by appending the **&f=** parameter to the URL request.

**JSON**
```text
https://api.tradingeconomics.com/markets/discontinued?c={your_api_key}&f=json
```
```json
[
  {
    "Symbol": "11:HK",
    "Ticker": "0011",
    "Name": "Hang Seng Bank",
    "Country": "Hong Kong",
    "Category": "stocks",
    "Reason": "Merged"
  },
  {
    "Symbol": "600190:CH",
    "Ticker": "600190",
    "Name": "Jinzhou Port",
    "Country": "China",
    "Category": "stocks",
    "Reason": "Delisted"
  },
  {
    "Symbol": "600837:CH",
    "Ticker": "600837",
    "Name": "Haitong Secur",
    "Country": "China",
    "Category": "stocks",
    "Reason": "Merged"
  },
  {
    "Symbol": "9613:JP",
    "Ticker": "9613",
    "Name": "NTT DATA",
    "Country": "Japan",
    "Category": "stocks",
    "Reason": "Delisted"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/markets/discontinued?c={your_api_key}&f=csv
```
```bash
Symbol,Ticker,Name,Country,Category,Reason
11:HK,0011,Hang Seng Bank,Hong Kong,stocks,Merged
600190:CH,600190,Jinzhou Port,China,stocks,Delisted
600837:CH,600837,Haitong Secur,China,stocks,Merged
9613:JP,9613,NTT DATA,Japan,stocks,Delisted
```

## Response fields

| Field    | Type   | Description                                     | Example          |
|----------|--------|-------------------------------------------------|------------------|
| Symbol   | string | Unique symbol used by Trading Economics          | "11:HK"          |
| Ticker   | string | Unique ticker used by Trading Economics          | "0011"           |
| Name     | string | Descriptive name of the market instrument        | "Hang Seng Bank" |
| Country  | string | Country of the market instrument                 | "Hong Kong"      |
| Category | string | Market category (e.g., stocks)                   | "stocks"         |
| Reason   | string | Reason for discontinuation (e.g., Merged, Delisted) | "Merged"     |

