Markets Search
The search will look into the categories: Indexes, markets (stocks), bonds, and commodities.
Search by country
Using Requests:
import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/search/united%20states?c={api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
import tradingeconomics as te
te.login('your_api_key')
te.getMarketsSearch(country='united states')
Using Requests:
const axios = require('axios');
(async () => {
const api_key = 'YOUR_API_KEY'
const response = await axios.get(`https://api.tradingeconomics.com/markets/search/united%20states?c=${api_key}`)
console.log(response.data)
})()
Or using our package:
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getMarketSnap(search_term = 'united states').then(function(data){
console.log(data)
});
Using Requests:
using (var httpClient = new HttpClient())
{
using (var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/search/united%20states?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.
| Symbol | Ticker | Name | Country | Date | Type | decimals | state | Last | Close | CloseDate | MarketCap | URL | Importance | DailyChange | DailyPercentualChange | WeeklyChange | WeeklyPercentualChange | MonthlyChange | MonthlyPercentualChange | YearlyChange | YearlyPercentualChange | YTDChange | YTDPercentualChange | day_high | day_low | yesterday | lastWeek | lastMonth | lastYear | startYear | ISIN | unit | frequency | LastUpdate |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| USGG10YR:IND | USGG10YR | US 10Y | United States | 7/12/2023 4:43:28 PM | bond | /united-states/government-bond-yield | Delayed | |||||||||||||||||||||||||||
| USGG1M:IND | UNITEDSTA4WEEBILYIE | US 4W | United States | 7/12/2023 4:04:33 PM | bond | /united-states/4-week-bill-yield | Delayed | |||||||||||||||||||||||||||
| USGG3M:IND | UNITEDSTA3MONBILYIE | US 3M | United States | 7/12/2023 4:10:35 PM | bond | /united-states/3-month-bill-yield | Delayed |
/markets/search/{country}?f=json
[{"Symbol":"USGG10YR:IND","Ticker":"USGG10YR","Name":"US 10Y","Country":"United States","Date":"2023-10-11T12:13:47","Type":"bond","decimals":null,"state":null,"Last":null,"Close":null,"CloseDate":null,"MarketCap":null,"URL":"/united-states/government-bond-yield","Importance":null,"DailyChange":null,"DailyPercentualChange":null,"WeeklyChange":null,"WeeklyPercentualChange":null,"MonthlyChange":null,"MonthlyPercentualChange":null,"YearlyChange":null,"YearlyPercentualChange":null,"YTDChange":null,"YTDPercentualChange":null,"day_high":null,"day_low":null,"yesterday":null,"lastWeek":null,"lastMonth":null,"lastYear":null,"startYear":null,"ISIN":"","unit":null,"frequency":"Delayed","LastUpdate":null},{"Symbol":"USGG1M:IND","Ticker":"UNITEDSTA4WEEBILYIE","Name":"US 4W","Country":"United States","Date":"2023-10-11T11:29:18","Type":"bond","decimals":null,"state":null,"Last":null,"Close":null,"CloseDate":null,"MarketCap":null,"URL":"/united-states/4-week-bill-yield","Importance":null,"DailyChange":null,"DailyPercentualChange":null,"WeeklyChange":null,"WeeklyPercentualChange":null,"MonthlyChange":null,"MonthlyPercentualChange":null,"YearlyChange":null,"YearlyPercentualChange":null,"YTDChange":null,"YTDPercentualChange":null,"day_high":null,"day_low":null,"yesterday":null,"lastWeek":null,"lastMonth":null,"lastYear":null,"startYear":null,"ISIN":"","unit":null,"frequency":"Delayed","LastUpdate":null},{"Symbol":"USGG3M:IND","Ticker":"UNITEDSTA3MONBILYIE","Name":"US 3M","Country":"United States","Date":"2023-10-11T11:59:51","Type":"bond","decimals":null,"state":null,"Last":null,"Close":null,"CloseDate":null,"MarketCap":null,"URL":"/united-states/3-month-bill-yield","Importance":null,"DailyChange":null,"DailyPercentualChange":null,"WeeklyChange":null,"WeeklyPercentualChange":null,"MonthlyChange":null,"MonthlyPercentualChange":null,"YearlyChange":null,"YearlyPercentualChange":null,"YTDChange":null,"YTDPercentualChange":null,"day_high":null,"day_low":null,"yesterday":null,"lastWeek":null,"lastMonth":null,"lastYear":null,"startYear":null,"ISIN":"","unit":null,"frequency":"Delayed","LastUpdate":null}]
/markets/search/{country}?f=csv
USGG10YR:IND,USGG10YR,US 10Y,United States,10/11/2023 12:14:48 PM,bond,,,,,,,/united-states/government-bond-yield,,,,,,,,,,,,,,,,,,,,,Delayed,
USGG1M:IND,UNITEDSTA4WEEBILYIE,US 4W,United States,10/11/2023 11:29:18 AM,bond,,,,,,,/united-states/4-week-bill-yield,,,,,,,,,,,,,,,,,,,,,Delayed,
USGG3M:IND,UNITEDSTA3MONBILYIE,US 3M,United States,10/11/2023 11:59:51 AM,bond,,,,,,,/united-states/3-month-bill-yield,,,,,,,,,,,,,,,,,,,,,Delayed,
/markets/search/{country}?f=xml
<ArrayOfanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketSnapItem">
<d2p1:Close i:nil="true"/>
<d2p1:CloseDate i:nil="true"/>
<d2p1:Country>United States</d2p1:Country>
<d2p1:DailyChange i:nil="true"/>
<d2p1:DailyPercentualChange i:nil="true"/>
<d2p1:Date>2023-10-11T12:13:47</d2p1:Date>
<d2p1:ISIN/>
<d2p1:Importance i:nil="true"/>
<d2p1:Last i:nil="true"/>
<d2p1:LastUpdate i:nil="true"/>
<d2p1:MarketCap i:nil="true"/>
<d2p1:MonthlyChange i:nil="true"/>
<d2p1:MonthlyPercentualChange i:nil="true"/>
<d2p1:Name>US 10Y</d2p1:Name>
<d2p1:Symbol>USGG10YR:IND</d2p1:Symbol>
<d2p1:Ticker>USGG10YR</d2p1:Ticker>
<d2p1:Type>bond</d2p1:Type>
<d2p1:URL>/united-states/government-bond-yield</d2p1:URL>
<d2p1:WeeklyChange i:nil="true"/>
<d2p1:WeeklyPercentualChange i:nil="true"/>
<d2p1:YTDChange i:nil="true"/>
<d2p1:YTDPercentualChange i:nil="true"/>
<d2p1:YearlyChange i:nil="true"/>
<d2p1:YearlyPercentualChange i:nil="true"/>
<d2p1:day_high i:nil="true"/>
<d2p1:day_low i:nil="true"/>
<d2p1:decimals i:nil="true"/>
<d2p1:frequency>Delayed</d2p1:frequency>
<d2p1:lastMonth i:nil="true"/>
<d2p1:lastWeek i:nil="true"/>
<d2p1:lastYear i:nil="true"/>
<d2p1:startYear i:nil="true"/>
<d2p1:state i:nil="true"/>
<d2p1:unit i:nil="true"/>
<d2p1:yesterday i:nil="true"/>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketSnapItem">
<d2p1:Close i:nil="true"/>
<d2p1:CloseDate i:nil="true"/>
<d2p1:Country>United States</d2p1:Country>
<d2p1:DailyChange i:nil="true"/>
<d2p1:DailyPercentualChange i:nil="true"/>
<d2p1:Date>2023-10-11T11:29:18</d2p1:Date>
<d2p1:ISIN/>
<d2p1:Importance i:nil="true"/>
<d2p1:Last i:nil="true"/>
<d2p1:LastUpdate i:nil="true"/>
<d2p1:MarketCap i:nil="true"/>
<d2p1:MonthlyChange i:nil="true"/>
<d2p1:MonthlyPercentualChange i:nil="true"/>
<d2p1:Name>US 4W</d2p1:Name>
<d2p1:Symbol>USGG1M:IND</d2p1:Symbol>
<d2p1:Ticker>UNITEDSTA4WEEBILYIE</d2p1:Ticker>
<d2p1:Type>bond</d2p1:Type>
<d2p1:URL>/united-states/4-week-bill-yield</d2p1:URL>
<d2p1:WeeklyChange i:nil="true"/>
<d2p1:WeeklyPercentualChange i:nil="true"/>
<d2p1:YTDChange i:nil="true"/>
<d2p1:YTDPercentualChange i:nil="true"/>
<d2p1:YearlyChange i:nil="true"/>
<d2p1:YearlyPercentualChange i:nil="true"/>
<d2p1:day_high i:nil="true"/>
<d2p1:day_low i:nil="true"/>
<d2p1:decimals i:nil="true"/>
<d2p1:frequency>Delayed</d2p1:frequency>
<d2p1:lastMonth i:nil="true"/>
<d2p1:lastWeek i:nil="true"/>
<d2p1:lastYear i:nil="true"/>
<d2p1:startYear i:nil="true"/>
<d2p1:state i:nil="true"/>
<d2p1:unit i:nil="true"/>
<d2p1:yesterday i:nil="true"/>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketSnapItem">
<d2p1:Close i:nil="true"/>
<d2p1:CloseDate i:nil="true"/>
<d2p1:Country>United States</d2p1:Country>
<d2p1:DailyChange i:nil="true"/>
<d2p1:DailyPercentualChange i:nil="true"/>
<d2p1:Date>2023-10-11T11:59:51</d2p1:Date>
<d2p1:ISIN/>
<d2p1:Importance i:nil="true"/>
<d2p1:Last i:nil="true"/>
<d2p1:LastUpdate i:nil="true"/>
<d2p1:MarketCap i:nil="true"/>
<d2p1:MonthlyChange i:nil="true"/>
<d2p1:MonthlyPercentualChange i:nil="true"/>
<d2p1:Name>US 3M</d2p1:Name>
<d2p1:Symbol>USGG3M:IND</d2p1:Symbol>
<d2p1:Ticker>UNITEDSTA3MONBILYIE</d2p1:Ticker>
<d2p1:Type>bond</d2p1:Type>
<d2p1:URL>/united-states/3-month-bill-yield</d2p1:URL>
<d2p1:WeeklyChange i:nil="true"/>
<d2p1:WeeklyPercentualChange i:nil="true"/>
<d2p1:YTDChange i:nil="true"/>
<d2p1:YTDPercentualChange i:nil="true"/>
<d2p1:YearlyChange i:nil="true"/>
<d2p1:YearlyPercentualChange i:nil="true"/>
<d2p1:day_high i:nil="true"/>
<d2p1:day_low i:nil="true"/>
<d2p1:decimals i:nil="true"/>
<d2p1:frequency>Delayed</d2p1:frequency>
<d2p1:lastMonth i:nil="true"/>
<d2p1:lastWeek i:nil="true"/>
<d2p1:lastYear i:nil="true"/>
<d2p1:startYear i:nil="true"/>
<d2p1:state i:nil="true"/>
<d2p1:unit i:nil="true"/>
<d2p1:yesterday i:nil="true"/>
</anyType>
</ArrayOfanyType>
Search by country and category
category = (index, markets, forex, bond and commodity).
Using Requests:
import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/search/united%20states?c={api_key}&category=index,markets'
data = requests.get(url).json()
print(data)
Or using our package:
te.getMarketsSearch(country='united states', category = 'index')
With multi categories:
te.getMarketsSearch(country='united states', category = ['index', 'markets'])
Using Requests:
const axios = require('axios');
(async () => {
const api_key = 'YOUR_API_KEY'
const response = await axios.get(`https://api.tradingeconomics.com/markets/search/united%20states?c=${api_key}&category=index,markets`)
console.log(response.data)
})()
Or using our package:
data = te.getMarketSnap(search_term = 'united states',
category = 'index').then(function(data){
console.log(data)
});
With multi categories:
data = te.getMarketSnap(search_term = 'united states',
category = ['index', 'markets']).then(function(data){
console.log(data)
});
Using Requests:
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/search/united%20states?c=your_api_key&category=index");
With multi categories:
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/search/united%20states?c=your_api_key&category=index,markets");
/markets/search/{country}?c=your_api_key&category={category}
| Symbol | Ticker | Name | Country | Date | Type | decimals | state | Last | Close | CloseDate | MarketCap | URL | Importance | DailyChange | DailyPercentualChange | WeeklyChange | WeeklyPercentualChange | MonthlyChange | MonthlyPercentualChange | YearlyChange | YearlyPercentualChange | YTDChange | YTDPercentualChange | day_high | day_low | yesterday | lastWeek | lastMonth | lastYear | startYear | ISIN | unit | frequency | LastUpdate |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| INDU:IND | INDU | US30 | United States | 7/12/2023 4:52:34 PM | index | /united-states/stock-market | Live | |||||||||||||||||||||||||||
| VIX:IND | VIX | USVIX | United States | 7/12/2023 5:07:16 PM | index | /vix:ind | Delayed | |||||||||||||||||||||||||||
| W5000:IND | W5000 | US5000 | United States | 7/12/2023 4:52:00 PM | index | /w5000:ind | Delayed |
/markets/search/{country}?c=your_api_key&category={category}?f=json
[{"Symbol":"NDX:IND","Ticker":"NDX","Name":"USNDX","Country":"United States","Date":"2023-10-11T12:16:19.69","Type":"index","decimals":null,"state":null,"Last":null,"Close":null,"CloseDate":null,"MarketCap":null,"URL":"/ndx:ind","Importance":null,"DailyChange":null,"DailyPercentualChange":null,"WeeklyChange":null,"WeeklyPercentualChange":null,"MonthlyChange":null,"MonthlyPercentualChange":null,"YearlyChange":null,"YearlyPercentualChange":null,"YTDChange":null,"YTDPercentualChange":null,"day_high":null,"day_low":null,"yesterday":null,"lastWeek":null,"lastMonth":null,"lastYear":null,"startYear":null,"ISIN":"","unit":null,"frequency":"Live","LastUpdate":null},{"Symbol":"VIX:IND","Ticker":"VIX","Name":"USVIX","Country":"United States","Date":"2023-10-11T12:16:31.383","Type":"index","decimals":null,"state":null,"Last":null,"Close":null,"CloseDate":null,"MarketCap":null,"URL":"/vix:ind","Importance":null,"DailyChange":null,"DailyPercentualChange":null,"WeeklyChange":null,"WeeklyPercentualChange":null,"MonthlyChange":null,"MonthlyPercentualChange":null,"YearlyChange":null,"YearlyPercentualChange":null,"YTDChange":null,"YTDPercentualChange":null,"day_high":null,"day_low":null,"yesterday":null,"lastWeek":null,"lastMonth":null,"lastYear":null,"startYear":null,"ISIN":"","unit":null,"frequency":"Delayed","LastUpdate":null},{"Symbol":"W5000:IND","Ticker":"W5000","Name":"US5000","Country":"United States","Date":"2023-10-10T19:46:00","Type":"index","decimals":null,"state":null,"Last":null,"Close":null,"CloseDate":null,"MarketCap":null,"URL":"/w5000:ind","Importance":null,"DailyChange":null,"DailyPercentualChange":null,"WeeklyChange":null,"WeeklyPercentualChange":null,"MonthlyChange":null,"MonthlyPercentualChange":null,"YearlyChange":null,"YearlyPercentualChange":null,"YTDChange":null,"YTDPercentualChange":null,"day_high":null,"day_low":null,"yesterday":null,"lastWeek":null,"lastMonth":null,"lastYear":null,"startYear":null,"ISIN":"","unit":null,"frequency":"Delayed","LastUpdate":null}]
/markets/search/{country}?c=your_api_key&category={category}?f=csv
NDX:IND,NDX,USNDX,United States,10/11/2023 12:17:22 PM,index,,,,,,,/ndx:ind,,,,,,,,,,,,,,,,,,,,,Live,
VIX:IND,VIX,USVIX,United States,10/11/2023 12:16:31 PM,index,,,,,,,/vix:ind,,,,,,,,,,,,,,,,,,,,,Delayed,
W5000:IND,W5000,US5000,United States,10/10/2023 7:46:00 PM,index,,,,,,,/w5000:ind,,,,,,,,,,,,,,,,,,,,,Delayed,
/markets/search/{country}?c=your_api_key&category={category}?f=xml
<ArrayOfanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketSnapItem">
<d2p1:Close i:nil="true"/>
<d2p1:CloseDate i:nil="true"/>
<d2p1:Country>United States</d2p1:Country>
<d2p1:DailyChange i:nil="true"/>
<d2p1:DailyPercentualChange i:nil="true"/>
<d2p1:Date>2023-10-11T12:16:19.69</d2p1:Date>
<d2p1:ISIN/>
<d2p1:Importance i:nil="true"/>
<d2p1:Last i:nil="true"/>
<d2p1:LastUpdate i:nil="true"/>
<d2p1:MarketCap i:nil="true"/>
<d2p1:MonthlyChange i:nil="true"/>
<d2p1:MonthlyPercentualChange i:nil="true"/>
<d2p1:Name>USNDX</d2p1:Name>
<d2p1:Symbol>NDX:IND</d2p1:Symbol>
<d2p1:Ticker>NDX</d2p1:Ticker>
<d2p1:Type>index</d2p1:Type>
<d2p1:URL>/ndx:ind</d2p1:URL>
<d2p1:WeeklyChange i:nil="true"/>
<d2p1:WeeklyPercentualChange i:nil="true"/>
<d2p1:YTDChange i:nil="true"/>
<d2p1:YTDPercentualChange i:nil="true"/>
<d2p1:YearlyChange i:nil="true"/>
<d2p1:YearlyPercentualChange i:nil="true"/>
<d2p1:day_high i:nil="true"/>
<d2p1:day_low i:nil="true"/>
<d2p1:decimals i:nil="true"/>
<d2p1:frequency>Live</d2p1:frequency>
<d2p1:lastMonth i:nil="true"/>
<d2p1:lastWeek i:nil="true"/>
<d2p1:lastYear i:nil="true"/>
<d2p1:startYear i:nil="true"/>
<d2p1:state i:nil="true"/>
<d2p1:unit i:nil="true"/>
<d2p1:yesterday i:nil="true"/>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketSnapItem">
<d2p1:Close i:nil="true"/>
<d2p1:CloseDate i:nil="true"/>
<d2p1:Country>United States</d2p1:Country>
<d2p1:DailyChange i:nil="true"/>
<d2p1:DailyPercentualChange i:nil="true"/>
<d2p1:Date>2023-10-11T12:16:31.383</d2p1:Date>
<d2p1:ISIN/>
<d2p1:Importance i:nil="true"/>
<d2p1:Last i:nil="true"/>
<d2p1:LastUpdate i:nil="true"/>
<d2p1:MarketCap i:nil="true"/>
<d2p1:MonthlyChange i:nil="true"/>
<d2p1:MonthlyPercentualChange i:nil="true"/>
<d2p1:Name>USVIX</d2p1:Name>
<d2p1:Symbol>VIX:IND</d2p1:Symbol>
<d2p1:Ticker>VIX</d2p1:Ticker>
<d2p1:Type>index</d2p1:Type>
<d2p1:URL>/vix:ind</d2p1:URL>
<d2p1:WeeklyChange i:nil="true"/>
<d2p1:WeeklyPercentualChange i:nil="true"/>
<d2p1:YTDChange i:nil="true"/>
<d2p1:YTDPercentualChange i:nil="true"/>
<d2p1:YearlyChange i:nil="true"/>
<d2p1:YearlyPercentualChange i:nil="true"/>
<d2p1:day_high i:nil="true"/>
<d2p1:day_low i:nil="true"/>
<d2p1:decimals i:nil="true"/>
<d2p1:frequency>Delayed</d2p1:frequency>
<d2p1:lastMonth i:nil="true"/>
<d2p1:lastWeek i:nil="true"/>
<d2p1:lastYear i:nil="true"/>
<d2p1:startYear i:nil="true"/>
<d2p1:state i:nil="true"/>
<d2p1:unit i:nil="true"/>
<d2p1:yesterday i:nil="true"/>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketSnapItem">
<d2p1:Close i:nil="true"/>
<d2p1:CloseDate i:nil="true"/>
<d2p1:Country>United States</d2p1:Country>
<d2p1:DailyChange i:nil="true"/>
<d2p1:DailyPercentualChange i:nil="true"/>
<d2p1:Date>2023-10-10T19:46:00</d2p1:Date>
<d2p1:ISIN/>
<d2p1:Importance i:nil="true"/>
<d2p1:Last i:nil="true"/>
<d2p1:LastUpdate i:nil="true"/>
<d2p1:MarketCap i:nil="true"/>
<d2p1:MonthlyChange i:nil="true"/>
<d2p1:MonthlyPercentualChange i:nil="true"/>
<d2p1:Name>US5000</d2p1:Name>
<d2p1:Symbol>W5000:IND</d2p1:Symbol>
<d2p1:Ticker>W5000</d2p1:Ticker>
<d2p1:Type>index</d2p1:Type>
<d2p1:URL>/w5000:ind</d2p1:URL>
<d2p1:WeeklyChange i:nil="true"/>
<d2p1:WeeklyPercentualChange i:nil="true"/>
<d2p1:YTDChange i:nil="true"/>
<d2p1:YTDPercentualChange i:nil="true"/>
<d2p1:YearlyChange i:nil="true"/>
<d2p1:YearlyPercentualChange i:nil="true"/>
<d2p1:day_high i:nil="true"/>
<d2p1:day_low i:nil="true"/>
<d2p1:decimals i:nil="true"/>
<d2p1:frequency>Delayed</d2p1:frequency>
<d2p1:lastMonth i:nil="true"/>
<d2p1:lastWeek i:nil="true"/>
<d2p1:lastYear i:nil="true"/>
<d2p1:startYear i:nil="true"/>
<d2p1:state i:nil="true"/>
<d2p1:unit i:nil="true"/>
<d2p1:yesterday i:nil="true"/>
</anyType>
</ArrayOfanyType>
Search by term
Using Requests:
import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/search/msft?c={api_key}'
data = requests.get(url).json()
print(data)
Or using our package:
te.getMarketsSearch(country ='msft')
Using Requests:
const axios = require('axios');
(async () => {
const api_key = 'YOUR_API_KEY'
const response = await axios.get(`https://api.tradingeconomics.com/markets/search/msft?c=${api_key}`)
console.log(response.data)
})()
Or using our package:
data = te.getMarketSnap(search_term = 'msft').then(function(data){
console.log(data)
});
Using Requests:
new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/search/msft?c=your_api_key");
| Symbol | Ticker | Name | Country | Date | Type | decimals | state | Last | Close | CloseDate | MarketCap | URL | Importance | DailyChange | DailyPercentualChange | WeeklyChange | WeeklyPercentualChange | MonthlyChange | MonthlyPercentualChange | YearlyChange | YearlyPercentualChange | YTDChange | YTDPercentualChange | day_high | day_low | yesterday | lastWeek | lastMonth | lastYear | startYear | ISIN | unit | frequency | LastUpdate |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MSFT:US | MSFT | Microsoft | United States | 7/12/2023 5:09:46 PM | stocks | /msft:us | US5949181045 | Live |
[{"Symbol":"MSFT:US","Ticker":"MSFT","Name":"Microsoft","Country":"United States","Date":"2023-10-10T19:59:11.157","Type":"stocks","decimals":null,"state":null,"Last":null,"Close":null,"CloseDate":null,"MarketCap":null,"URL":"/msft:us","Importance":null,"DailyChange":null,"DailyPercentualChange":null,"WeeklyChange":null,"WeeklyPercentualChange":null,"MonthlyChange":null,"MonthlyPercentualChange":null,"YearlyChange":null,"YearlyPercentualChange":null,"YTDChange":null,"YTDPercentualChange":null,"day_high":null,"day_low":null,"yesterday":null,"lastWeek":null,"lastMonth":null,"lastYear":null,"startYear":null,"ISIN":"US5949181045","unit":null,"frequency":"Live","LastUpdate":null}]
MSFT:US,MSFT,Microsoft,United States,10/10/2023 7:59:11 PM,stocks,,,,,,,/msft:us,,,,,,,,,,,,,,,,,,,US5949181045,,Live,
<ArrayOfanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketSnapItem">
<d2p1:Close i:nil="true"/>
<d2p1:CloseDate i:nil="true"/>
<d2p1:Country>United States</d2p1:Country>
<d2p1:DailyChange i:nil="true"/>
<d2p1:DailyPercentualChange i:nil="true"/>
<d2p1:Date>2023-10-10T19:59:11.157</d2p1:Date>
<d2p1:ISIN>US5949181045</d2p1:ISIN>
<d2p1:Importance i:nil="true"/>
<d2p1:Last i:nil="true"/>
<d2p1:LastUpdate i:nil="true"/>
<d2p1:MarketCap i:nil="true"/>
<d2p1:MonthlyChange i:nil="true"/>
<d2p1:MonthlyPercentualChange i:nil="true"/>
<d2p1:Name>Microsoft</d2p1:Name>
<d2p1:Symbol>MSFT:US</d2p1:Symbol>
<d2p1:Ticker>MSFT</d2p1:Ticker>
<d2p1:Type>stocks</d2p1:Type>
<d2p1:URL>/msft:us</d2p1:URL>
<d2p1:WeeklyChange i:nil="true"/>
<d2p1:WeeklyPercentualChange i:nil="true"/>
<d2p1:YTDChange i:nil="true"/>
<d2p1:YTDPercentualChange i:nil="true"/>
<d2p1:YearlyChange i:nil="true"/>
<d2p1:YearlyPercentualChange i:nil="true"/>
<d2p1:day_high i:nil="true"/>
<d2p1:day_low i:nil="true"/>
<d2p1:decimals i:nil="true"/>
<d2p1:frequency>Live</d2p1:frequency>
<d2p1:lastMonth i:nil="true"/>
<d2p1:lastWeek i:nil="true"/>
<d2p1:lastYear i:nil="true"/>
<d2p1:startYear i:nil="true"/>
<d2p1:state i:nil="true"/>
<d2p1:unit i:nil="true"/>
<d2p1:yesterday i:nil="true"/>
</anyType>
</ArrayOfanyType>
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 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.0000 |
| Close | number | Last recorded value before the market closed | 11900.0000 |
| 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.0000 |
| 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.0000 |
| 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.0000 |
| 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.0000 |
| 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.0000 |
| 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.0000 |
| day_low | number | Lowest trading value of the current day | 4410.0000 |
| Yesterday | number | Previous day’s closing price | 4443.0000 |
| LastWeek | number | Closing price from the previous week | 4379.0000 |
| LastMonth | number | Closing price from the previous month | 4574.0000 |
| LastYear | number | Closing price from the previous year | 4450.0000 |
| StartYear | number | Closing price at the start of the current year | 3910.0000 |
| 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) | “2023-04-13T18:24:00” |