# Markets Quotes by Country

> Use the following API endpoints to obtain market data by country.

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

The Country Snapshot endpoints offer stocks and markets data by country, capturing key details like country, names, metrics, categories, and dates for a quick overview.

**PYTHON**
*Using Requests:*
```python
import requests
your_api_key = 'your_api_key'
url = f'https://api.tradingeconomics.com/markets/stocks/country/united%20states?c={your_api_key}'
data = requests.get(url).json()
print(data)
```
*Or using our package:*
```python
te.getStocksByCountry(country='united states')
```

*With multi countries:*
```python
te.getStocksByCountry(country=['united states', 'nigeria'])
```

**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/stocks/country/united%20states?c=${your_api_key}`)
    console.log(response.data)
})()
```
*Or using our package:*
```javascript
data = te.getMarketSnap(country = 'united states').then(function(data){
  console.log(data)     
});
```

*With multi countries:*
```javascript
data = te.getMarketSnap(country = ['united states', 'nigeria']).then(function(data){
  console.log(data)     
});
```

**C#**
*Using Requests:*
```c#
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/stocks/country/united%20states?client=your_api_key");
```

**JSON**
```text
https://api.tradingeconomics.com/markets/stocks/country/{country}?c={your_api_key}&f=json
```
```json
[
  {
    "Symbol": "360:AU",
    "Ticker": "360",
    "Name": "Life360",
    "Country": "United States",
    "Date": "2024-07-05T05:59:51.183",
    "State": "OPEN",
    "Last": 15.98,
    "Close": 15.98,
    "CloseDate": "2024-07-05T00:00:00",
    "Group": "",
    "URL": "/360:au",
    "Importance": 1000,
    "DailyChange": 0.12,
    "DailyPercentualChange": 0.7566,
    "WeeklyChange": -0.39,
    "WeeklyPercentualChange": -2.3824,
    "MonthlyChange": 2.18,
    "MonthlyPercentualChange": 15.7971,
    "YearlyChange": 8.43,
    "YearlyPercentualChange": 111.6556,
    "YTDChange": 8.42,
    "YTDPercentualChange": 111.3757,
    "day_high": 16.0,
    "day_low": 15.67,
    "yesterday": 15.86,
    "lastWeek": 16.37,
    "lastMonth": 13.8,
    "lastYear": 7.55,
    "startYear": 7.56,
    "decimals": 2.0,
    "unit": "AUD",
    "frequency": "Live",
    "StartDate": "2019-08-22T00:00:00",
    "LastUpdate": "2024-07-05T15:16:00"
  },
  {
    "Symbol": "1811094D:AU",
    "Ticker": "AVH",
    "Name": "Avita Medical",
    "Country": "United States",
    "Date": "2024-07-05T00:00:00",
    "State": "CLOSED",
    "Last": 2.37,
    "Close": 2.37,
    "CloseDate": "2024-07-05T00:00:00",
    "Group": "",
    "URL": "/1811094d:au",
    "Importance": 1000,
    "DailyChange": 0.0,
    "DailyPercentualChange": 0.0,
    "WeeklyChange": -0.05,
    "WeeklyPercentualChange": -2.0661,
    "MonthlyChange": -0.46,
    "MonthlyPercentualChange": -16.2544,
    "YearlyChange": -2.32,
    "YearlyPercentualChange": -49.467,
    "YTDChange": -1.92,
    "YTDPercentualChange": -44.7552,
    "day_high": 2.39,
    "day_low": 2.36,
    "yesterday": 2.37,
    "lastWeek": 2.42,
    "lastMonth": 2.83,
    "lastYear": 4.69,
    "startYear": 4.29,
    "decimals": 2.0,
    "unit": "AUD",
    "frequency": "Daily",
    "StartDate": "2019-08-22T00:00:00",
    "LastUpdate": "2024-07-05T15:15:00"
  },
  {
    "Symbol": "AAON:US",
    "Ticker": "AAON",
    "Name": "AAON",
    "Country": "United States",
    "Date": "2024-07-05T00:00:00",
    "State": "CLOSED",
    "Last": 85.99,
    "Close": 85.99,
    "CloseDate": "2024-07-05T00:00:00",
    "Group": "America G20 Major",
    "URL": "/aaon:us",
    "Importance": 1000,
    "DailyChange": -0.09,
    "DailyPercentualChange": -0.1046,
    "WeeklyChange": -1.25,
    "WeeklyPercentualChange": -1.4328,
    "MonthlyChange": 13.64,
    "MonthlyPercentualChange": 18.8528,
    "YearlyChange": -6.3,
    "YearlyPercentualChange": -6.8263,
    "YTDChange": 12.12,
    "YTDPercentualChange": 16.4072,
    "day_high": 86.6101,
    "day_low": 85.615,
    "yesterday": 86.08,
    "lastWeek": 87.24,
    "lastMonth": 72.35,
    "lastYear": 92.29,
    "startYear": 73.87,
    "decimals": 2.0,
    "unit": "USD",
    "frequency": "daily",
    "StartDate": "1993-09-02T00:00:00",
    "LastUpdate": "2024-07-05T15:16:00"
  }
]
```

**CSV**
```text
https://api.tradingeconomics.com/markets/stocks/country/{country}?c={your_api_key}&f=csv
```
```bash
360:AU,360,Life360,United States,7/5/2024 5:59:51 AM,OPEN,15.98000,15.98000,7/5/2024 12:00:00 AM,/360:au,1000,0.12000,0.7566,-0.39000,-2.3824,2.18000,15.7971,8.43000,111.6556,8.42000,111.3757,16.00000,15.67000,15.86000,16.37000,13.80000,7.55000,7.56000,2,AUD,Live,8/22/2019 12:00:00 AM,7/5/2024 3:16:00 PM
1811094D:AU,AVH,Avita Medical,United States,7/5/2024 12:00:00 AM,CLOSED,2.37000,2.37000,7/5/2024 12:00:00 AM,/1811094d:au,1000,0.00000,0.0000,-0.05000,-2.0661,-0.46000,-16.2544,-2.32000,-49.4670,-1.92000,-44.7552,2.39000,2.36000,2.37000,2.42000,2.83000,4.69000,4.29000,2,AUD,Daily,8/22/2019 12:00:00 AM,7/5/2024 3:15:00 PM
AAON:US,AAON,AAON,United States,7/5/2024 12:00:00 AM,CLOSED,85.99000,85.99000,7/5/2024 12:00:00 AM,America G20 Major,/aaon:us,1000,-0.09000,-0.1046,-1.25000,-1.4328,13.64000,18.8528,-6.30000,-6.8263,12.12000,16.4072,86.61010,85.61500,86.08000,87.24000,72.35000,92.29000,73.87000,2,USD,daily,9/2/1993 12:00:00 AM,7/5/2024 3:16:00 PM
```

**HTML**
```text
https://api.tradingeconomics.com/markets/stocks/country/{country}?c={your_api_key}
```

| Symbol | Ticker | Name | Country | Date | State | Last | Close | CloseDate | Group | URL | Importance	| DailyChange | DailyPercentualChange | WeeklyChange | WeeklyPercentualChange | MonthlyChange | MonthlyPercentualChange | YearlyChange | YearlyPercentualChange | YTDChange | YTDPercentualChange | day_high | day_low | yesterday | lastWeek | lastMonth | lastYear | startYear | decimals | unit | frequency | StartDate | LastUpdate |
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| 360:AU | 360 | Life360 | United States | 7/5/2024 5:59:51 AM | OPEN | 15.98000 | 15.98000 | 7/5/2024 12:00:00 AM | | /360:au | 1000 | 0.12000 | 0.7566 | -0.39000 | -2.3824 | 2.18000 | 15.7971 | 8.43000 | 111.6556 | 8.42000 | 111.3757 | 16.00000 | 15.67000 | 15.86000 | 16.37000 | 13.80000 | 7.55000 | 7.56000 | 2 | AUD | Live | 8/22/2019 12:00:00 AM | 7/5/2024 3:16:00 PM |
| 1811094D:AU | AVH | Avita Medical | United States | 7/5/2024 12:00:00 AM | CLOSED | 2.37000 | 2.37000 | 7/5/2024 12:00:00 AM | | /1811094d:au | 1000 | 0.00000 | 0.0000 | -0.05000 | -2.0661 | -0.46000 | -16.2544 | -2.32000 | -49.4670 | -1.92000 | -44.7552 | 2.39000 | 2.36000 | 2.37000 | 2.42000 | 2.83000 | 4.69000 | 4.29000 | 2 | AUD | Daily | 8/22/2019 12:00:00 AM | 7/5/2024 3:15:00 PM |
| AAON:US | AAON | AAON | United States | 7/5/2024 12:00:00 AM | CLOSED | 85.99000 | 85.99000 | 7/5/2024 12:00:00 AM | America G20 Major | /aaon:us | 1000 | -0.09000 | -0.1046 | -1.25000 | -1.4328 | 13.64000 | 18.8528 | -6.30000 | -6.8263 | 12.12000 | 16.4072 | 86.61010 | 85.61500 | 86.08000 | 87.24000 | 72.35000 | 92.29000 | 73.87000 | 2 | USD | daily | 9/2/1993 12:00:00 AM | 7/5/2024 3:16:00 PM |

## Response fields

| Field                   | Type   | Description                                                             | Example               |
| ------------------------| -------|-------------------------------------------------------------------------|-----------------------|
| Symbol                  | string | Unique symbol used by Trading Economics                                      | "6758:JP"             |
| Ticker                  | string | Unique ticker code used by Trading Economics                                 | "6758"                |
| Name                    | string | Full name of the company, commodity, or indicator                            | "Sony"                |
| Country                 | string | Country associated with the instrument                                       | "Japan"               |
| Date                    | string | Date and time of the latest release in UTC (ISO 8601 format)                 | "2023-04-13T00:00:00" |
| Type                    | string | Market type                                                                  | "stocks"              |
| Decimals                | number | Number of decimal places used in reported values                             | 2.0                   |
| State                   | string | Current market state                                                         | "CLOSED"              |
| Last                    | number | Most recent trading value or price                                           | 11900.00              |
| Close                   | number | Last recorded value before the market closed                                 | 11900.00              |
| CloseDate               | string | Date and time of the last closing price (ISO 8601 format)                    | "2023-04-13T00:00:00" |
| MarketCap               | number | Market capitalization                                                        | 14684155308900.0      |
| URL                     | string | Trading Economics link to the instrument’s detail page                       | "/commodity/eggs-ch"  |
| Importance              | number | Indicator importance score ranging from 0 (lowest) to 1000 (highest)         | 1000                  |
| DailyChange             | number | Absolute difference between previous close and current price                 | -8.00                 |
| DailyPercentualChange   | number | Percentage difference between previous close and current price               | -0.1801               |
| WeeklyChange            | number | Absolute difference between last week’s close and current price              | 56.00                 |
| WeeklyPercentualChange  | number | Percentage difference between last week’s close and current price            | 1.2788                |
| MonthlyChange           | number | Absolute difference between last month’s close and current price             | -139.00               |
| MonthlyPercentualChange | number | Percentage difference between last month’s close and current price           | -3.0389               |
| YearlyChange            | number | Absolute difference between last year’s close and current price              | -15.00                |
| YearlyPercentualChange  | number | Percentage difference between last year’s close and current price            | -0.3371               |
| YTDChange               | number | Absolute difference between last year’s final close and current price (YTD)  | 525.00                |
| YTDPercentualChange     | number | Percentage difference between last year’s final close and current price (YTD)| 13.4271               |
| day_high                | number | Highest trading value of the current day                                     | 4460.00               |
| day_low                 | number | Lowest trading value of the current day                                      | 4410.00               |
| Yesterday               | number | Previous day’s closing price                                                 | 4443.00               |
| LastWeek                | number | Closing price from the previous week                                         | 4379.00               |
| LastMonth               | number | Closing price from the previous month                                        | 4574.00               |
| LastYear                | number | Closing price from the previous year                                         | 4450.00               |
| StartYear               | number | Closing price at the start of the current year                               | 3910.00               |
| ISIN                    | string | International Securities Identification Number                               | "US0378331005"        |
| Unit                    | string | Unit of measurement for the value                                            | "CNY/T"               |
| Frequency               | string | Reporting frequency of the market data                                       | "Daily"               |
| LastUpdate              | string | Timestamp of the most recent data update (ISO 8601 format)

