Quotes by Symbol

The Snapshot endpoint offers a momentary view of data, capturing specific information at a particular point in time. It generally includes details such as date, units, and general information, providing a static representation of current data.

Markets

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/symbol/aapl:us,gac:com?c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

import tradingeconomics as te
te.login('your_api_key')
te.getMarketsBySymbol(symbols='aapl:us') 

With multi symbols:

te.getMarketsBySymbol(symbols=['aapl:us', 'gac:com'])  

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/markets/symbol/aapl:us,gac:com?c=${api_key}`)
    console.log(response.data)
})()

Or using our package:

const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getMarketSnap(symbol = 'aapl:us').then(function(data){
  console.log(data)     
});

With multi symbols:

data = te.getMarketSnap(symbol = ['aapl:us', 'gac:com']).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/symbol/aapl:us?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);
        }
    }
}

With multi symbols:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/symbol/aapl:us,gac:com?c=your_api_key");

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

/markets/symbol/{symbol}

SymbolTickerNameCountryDateTypedecimalsstateLastCloseCloseDateMarketCapURLImportanceDailyChangeDailyPercentualChangeWeeklyChangeWeeklyPercentualChangeMonthlyChangeMonthlyPercentualChangeYearlyChangeYearlyPercentualChangeYTDChangeYTDPercentualChangeday_highday_lowyesterdaylastWeeklastMonthlastYearstartYearISINunitfrequencyLastUpdate
AAPL:USAAPLAppleUnited States7/12/2023 1:46:04 PMstocks2OPEN191.34191.347/12/2023 1:46:00 PM30763082/aapl:us5003.261.73000.010.00527.554.107945.4831.180661.4147.2639191.34186.60188.08191.33183.79145.86129.93US0378331005USDLive7/12/2023 1:46:00 PM
GAC:COMGACGalliumcommodity7/11/2023 12:00:00 AMcommodity2CLOSED1675.001675.007/11/2023 12:00:00 AM/commodity/gallium10000.000.00000.000.000020.001.2085-1550.00-48.0620-250.00-12.98701675.001675.001675.001675.001655.003225.001925.00CNY/Kgdaily7/12/2023 1:02:00 PM

/markets/symbol/{symbol}?f=json

[{"Symbol":"AAPL:US","Ticker":"AAPL","Name":"Apple","Country":"United States","Date":"2023-10-10T17:45:39.677","Type":"stocks","decimals":2.0,"state":"OPEN","Last":178.41,"Close":178.41,"CloseDate":"2023-10-10T17:46:00","MarketCap":28052502.0,"URL":"/aapl:us","Importance":500,"DailyChange":-0.58,"DailyPercentualChange":-0.3200,"WeeklyChange":6.01,"WeeklyPercentualChange":3.4861,"MonthlyChange":-0.95,"MonthlyPercentualChange":-0.5297,"YearlyChange":39.43,"YearlyPercentualChange":28.3710,"YTDChange":48.48,"YTDPercentualChange":37.3124,"day_high":179.72,"day_low":178.10,"yesterday":178.99,"lastWeek":172.40,"lastMonth":179.36,"lastYear":138.98,"startYear":129.93,"ISIN":"US0378331005","unit":"USD","frequency":"Live","LastUpdate":"2023-10-10T17:46:00"},{"Symbol":"GAC:COM","Ticker":"GAC","Name":"Gallium","Country":"commodity","Date":"2023-10-09T00:00:00","Type":"commodity","decimals":2.0,"state":"CLOSED","Last":1955.00,"Close":1955.00,"CloseDate":"2023-10-09T00:00:00","MarketCap":null,"URL":"/commodity/gallium","Importance":1000,"DailyChange":50.00,"DailyPercentualChange":2.6247,"WeeklyChange":50.00,"WeeklyPercentualChange":2.6247,"MonthlyChange":230.00,"MonthlyPercentualChange":13.3333,"YearlyChange":-550.00,"YearlyPercentualChange":-21.9561,"YTDChange":30.00,"YTDPercentualChange":1.5584,"day_high":1980.00,"day_low":1930.00,"yesterday":1905.00,"lastWeek":1905.00,"lastMonth":1725.00,"lastYear":2505.00,"startYear":1925.00,"ISIN":"","unit":"CNY/Kg","frequency":"daily","LastUpdate":"2023-10-10T17:02:00"}]

/markets/symbol/{symbol}?f=csv

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
AAPL:US,AAPL,Apple,United States,10/10/2023 5:45:39 PM,stocks,2,OPEN,178.41,178.41,10/10/2023 5:46:00 PM,28052502,/aapl:us,500,-0.58,-0.3200,6.01,3.4861,-0.95,-0.5297,39.43,28.3710,48.48,37.3124,179.72,178.10,178.99,172.40,179.36,138.98,129.93,US0378331005,USD,Live,10/10/2023 5:46:00 PM
GAC:COM,GAC,Gallium,commodity,10/9/2023 12:00:00 AM,commodity,2,CLOSED,1955.00,1955.00,10/9/2023 12:00:00 AM,,/commodity/gallium,1000,50.00,2.6247,50.00,2.6247,230.00,13.3333,-550.00,-21.9561,30.00,1.5584,1980.00,1930.00,1905.00,1905.00,1725.00,2505.00,1925.00,,CNY/Kg,daily,10/10/2023 5:02:00 PM

/markets/symbol/{symbol}?f=xml

<ArrayOfMarkets.MarketSnapItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APILib.DB">
<Markets.MarketSnapItem>
<Close>178.41</Close>
<CloseDate>2023-10-10T17:46:00</CloseDate>
<Country>United States</Country>
<DailyChange>-0.58</DailyChange>
<DailyPercentualChange>-0.3200</DailyPercentualChange>
<Date>2023-10-10T17:45:39.677</Date>
<ISIN>US0378331005</ISIN>
<Importance>500</Importance>
<Last>178.41</Last>
<LastUpdate>2023-10-10T17:46:00</LastUpdate>
<MarketCap>28052502</MarketCap>
<MonthlyChange>-0.95</MonthlyChange>
<MonthlyPercentualChange>-0.5297</MonthlyPercentualChange>
<Name>Apple</Name>
<Symbol>AAPL:US</Symbol>
<Ticker>AAPL</Ticker>
<Type>stocks</Type>
<URL>/aapl:us</URL>
<WeeklyChange>6.01</WeeklyChange>
<WeeklyPercentualChange>3.4861</WeeklyPercentualChange>
<YTDChange>48.48</YTDChange>
<YTDPercentualChange>37.3124</YTDPercentualChange>
<YearlyChange>39.43</YearlyChange>
<YearlyPercentualChange>28.3710</YearlyPercentualChange>
<day_high>179.72</day_high>
<day_low>178.10</day_low>
<decimals>2</decimals>
<frequency>Live</frequency>
<lastMonth>179.36</lastMonth>
<lastWeek>172.40</lastWeek>
<lastYear>138.98</lastYear>
<startYear>129.93</startYear>
<state>OPEN</state>
<unit>USD</unit>
<yesterday>178.99</yesterday>
</Markets.MarketSnapItem>
<Markets.MarketSnapItem>
<Close>1955.00</Close>
<CloseDate>2023-10-09T00:00:00</CloseDate>
<Country>commodity</Country>
<DailyChange>50.00</DailyChange>
<DailyPercentualChange>2.6247</DailyPercentualChange>
<Date>2023-10-09T00:00:00</Date>
<ISIN/>
<Importance>1000</Importance>
<Last>1955.00</Last>
<LastUpdate>2023-10-10T17:02:00</LastUpdate>
<MarketCap i:nil="true"/>
<MonthlyChange>230.00</MonthlyChange>
<MonthlyPercentualChange>13.3333</MonthlyPercentualChange>
<Name>Gallium</Name>
<Symbol>GAC:COM</Symbol>
<Ticker>GAC</Ticker>
<Type>commodity</Type>
<URL>/commodity/gallium</URL>
<WeeklyChange>50.00</WeeklyChange>
<WeeklyPercentualChange>2.6247</WeeklyPercentualChange>
<YTDChange>30.00</YTDChange>
<YTDPercentualChange>1.5584</YTDPercentualChange>
<YearlyChange>-550.00</YearlyChange>
<YearlyPercentualChange>-21.9561</YearlyPercentualChange>
<day_high>1980.00</day_high>
<day_low>1930.00</day_low>
<decimals>2</decimals>
<frequency>daily</frequency>
<lastMonth>1725.00</lastMonth>
<lastWeek>1905.00</lastWeek>
<lastYear>2505.00</lastYear>
<startYear>1925.00</startYear>
<state>CLOSED</state>
<unit>CNY/Kg</unit>
<yesterday>1905.00</yesterday>
</Markets.MarketSnapItem>
</ArrayOfMarkets.MarketSnapItem>

Peers

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/peers/aapl:us?c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

te.getMarketsPeers(symbols='aapl:us')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/markets/peers/aapl:us?c=${api_key}`)
    console.log(response.data)
})()

Or using our package:

data = te.getMarketSnap(peers_symbol = 'aapl:us').then(function(data){
  console.log(data)     
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/peers/aapl:us?c=your_api_key");

/markets/peers/{symbol}

SymbolrelationshipTickerNameCountryDateTypedecimalsstateLastCloseCloseDateMarketCapURLImportanceDailyChangeDailyPercentualChangeWeeklyChangeWeeklyPercentualChangeMonthlyChangeMonthlyPercentualChangeYearlyChangeYearlyPercentualChangeYTDChangeYTDPercentualChangeday_highday_lowyesterdaylastWeeklastMonthlastYearstartYearISINunitfrequencyLastUpdate
6758:JP16758SonyJapan7/12/2023 12:00:00 AMstocks2CLOSED12450.0012450.007/12/2023 12:00:00 AM157423500/6758:jp1000-225.00-1.7751-860.00-6.4613-1470.00-10.56031260.0011.26012415.0024.065812560.0012330.0012675.0013310.0013920.0011190.0010035.00JP34359JPYDaily7/12/2023 1:50:00 PM
AAPL:US1AAPLAppleUnited States7/12/2023 2:29:52 PMstocks2OPEN190.35190.357/12/2023 2:30:00 PM30763082/aapl:us5002.271.2100-0.98-0.51227.043.840544.8630.833760.4246.5020190.99189.45188.08191.33183.31145.49129.93US0378331005USDLive7/12/2023 2:30:00 PM
ADI:US1ADIAnalog DevicesUnited States7/12/2023 2:30:17 PMstocks2OPEN194.62194.627/12/2023 2:30:00 PM964599/adi:us9503.671.92004.622.43162.251.169645.4330.451130.5918.6490194.66192.5750000190.95190.00192.37149.19164.03US0326541051USDLive7/12/2023 2:30:00 PM

/markets/peers/{symbol}?f=json

[{"Symbol":"2368:TT","relationship":1,"Ticker":"2368","Name":"Gold Circuit Elect","Country":"Taiwan","Date":"2023-10-06T00:00:00","Type":"stocks","decimals":2.0,"state":"CLOSED","Last":221.00,"Close":221.00,"CloseDate":"2023-10-06T00:00:00","MarketCap":107558048000.0,"URL":"/2368:tt","Importance":1000,"DailyChange":-1.50,"DailyPercentualChange":-0.6742,"WeeklyChange":5.50,"WeeklyPercentualChange":2.5522,"MonthlyChange":11.50,"MonthlyPercentualChange":5.4893,"YearlyChange":129.50,"YearlyPercentualChange":141.5301,"YTDChange":134.20,"YTDPercentualChange":154.6083,"day_high":227.00,"day_low":219.00,"yesterday":222.50,"lastWeek":215.50,"lastMonth":209.50,"lastYear":91.50,"startYear":86.80,"ISIN":"TW0002368008","unit":"TWD","frequency":"Daily","LastUpdate":"2023-10-10T16:34:00"},{"Symbol":"2415:TT","relationship":1,"Ticker":"2415","Name":"Cx Technology","Country":"Taiwan","Date":"2023-10-06T00:00:00","Type":"stocks","decimals":2.0,"state":"CLOSED","Last":30.05,"Close":30.05,"CloseDate":"2023-10-06T00:00:00","MarketCap":27045.0,"URL":"/2415:tt","Importance":1000,"DailyChange":-0.75,"DailyPercentualChange":-2.4351,"WeeklyChange":1.30,"WeeklyPercentualChange":4.5217,"MonthlyChange":-1.20,"MonthlyPercentualChange":-3.8400,"YearlyChange":6.10,"YearlyPercentualChange":25.4697,"YTDChange":9.65,"YTDPercentualChange":47.3039,"day_high":31.40,"day_low":30.00,"yesterday":30.80,"lastWeek":28.75,"lastMonth":31.25,"lastYear":23.95,"startYear":20.40,"ISIN":"TW0002415007","unit":"TWD","frequency":"Daily","LastUpdate":"2023-10-10T16:35:00"},{"Symbol":"3149:TT","relationship":1,"Ticker":"3149","Name":"G-tech Optoelectron","Country":"Taiwan","Date":"2023-10-06T00:00:00","Type":"stocks","decimals":2.0,"state":"CLOSED","Last":13.90,"Close":13.90,"CloseDate":"2023-10-06T00:00:00","MarketCap":3118181440.0,"URL":"/3149:tt","Importance":1000,"DailyChange":0.10,"DailyPercentualChange":0.7246,"WeeklyChange":0.25,"WeeklyPercentualChange":1.8315,"MonthlyChange":-1.70,"MonthlyPercentualChange":-10.8974,"YearlyChange":-7.45,"YearlyPercentualChange":-34.8946,"YTDChange":-4.60,"YTDPercentualChange":-24.8649,"day_high":14.35,"day_low":13.80,"yesterday":13.80,"lastWeek":13.65,"lastMonth":15.60,"lastYear":21.35,"startYear":18.50,"ISIN":"TW0003149001","unit":"TWD","frequency":"Daily","LastUpdate":"2023-10-10T13:41:00"}]

/markets/peers/{symbol}?f=csv

2368:TT,1,2368,Gold Circuit Elect,Taiwan,10/6/2023 12:00:00 AM,stocks,2,CLOSED,221.00,221.00,10/6/2023 12:00:00 AM,107558048000,/2368:tt,1000,-1.50,-0.6742,5.50,2.5522,11.50,5.4893,129.50,141.5301,134.20,154.6083,227.00,219.00,222.50,215.50,209.50,91.50,86.80,TW0002368008,TWD,Daily,10/10/2023 4:34:00 PM
2415:TT,1,2415,Cx Technology,Taiwan,10/6/2023 12:00:00 AM,stocks,2,CLOSED,30.05,30.05,10/6/2023 12:00:00 AM,27045,/2415:tt,1000,-0.75,-2.4351,1.30,4.5217,-1.20,-3.8400,6.10,25.4697,9.65,47.3039,31.40,30.00,30.80,28.75,31.25,23.95,20.40,TW0002415007,TWD,Daily,10/10/2023 4:35:00 PM
3149:TT,1,3149,G-tech Optoelectron,Taiwan,10/6/2023 12:00:00 AM,stocks,2,CLOSED,13.90,13.90,10/6/2023 12:00:00 AM,3118181440,/3149:tt,1000,0.10,0.7246,0.25,1.8315,-1.70,-10.8974,-7.45,-34.8946,-4.60,-24.8649,14.35,13.80,13.80,13.65,15.60,21.35,18.50,TW0003149001,TWD,Daily,10/10/2023 1:41:00 PM

/markets/peers/{symbol}?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.MarketPeersItem">
<d2p1:Close>221.00</d2p1:Close>
<d2p1:CloseDate>2023-10-06T00:00:00</d2p1:CloseDate>
<d2p1:Country>Taiwan</d2p1:Country>
<d2p1:DailyChange>-1.50</d2p1:DailyChange>
<d2p1:DailyPercentualChange>-0.6742</d2p1:DailyPercentualChange>
<d2p1:Date>2023-10-06T00:00:00</d2p1:Date>
<d2p1:ISIN>TW0002368008</d2p1:ISIN>
<d2p1:Importance>1000</d2p1:Importance>
<d2p1:Last>221.00</d2p1:Last>
<d2p1:LastUpdate>2023-10-10T16:34:00</d2p1:LastUpdate>
<d2p1:MarketCap>107558048000</d2p1:MarketCap>
<d2p1:MonthlyChange>11.50</d2p1:MonthlyChange>
<d2p1:MonthlyPercentualChange>5.4893</d2p1:MonthlyPercentualChange>
<d2p1:Name>Gold Circuit Elect</d2p1:Name>
<d2p1:Symbol>2368:TT</d2p1:Symbol>
<d2p1:Ticker>2368</d2p1:Ticker>
<d2p1:Type>stocks</d2p1:Type>
<d2p1:URL>/2368:tt</d2p1:URL>
<d2p1:WeeklyChange>5.50</d2p1:WeeklyChange>
<d2p1:WeeklyPercentualChange>2.5522</d2p1:WeeklyPercentualChange>
<d2p1:YTDChange>134.20</d2p1:YTDChange>
<d2p1:YTDPercentualChange>154.6083</d2p1:YTDPercentualChange>
<d2p1:YearlyChange>129.50</d2p1:YearlyChange>
<d2p1:YearlyPercentualChange>141.5301</d2p1:YearlyPercentualChange>
<d2p1:day_high>227.00</d2p1:day_high>
<d2p1:day_low>219.00</d2p1:day_low>
<d2p1:decimals>2</d2p1:decimals>
<d2p1:frequency>Daily</d2p1:frequency>
<d2p1:lastMonth>209.50</d2p1:lastMonth>
<d2p1:lastWeek>215.50</d2p1:lastWeek>
<d2p1:lastYear>91.50</d2p1:lastYear>
<d2p1:relationship>1</d2p1:relationship>
<d2p1:startYear>86.80</d2p1:startYear>
<d2p1:state>CLOSED</d2p1:state>
<d2p1:unit>TWD</d2p1:unit>
<d2p1:yesterday>222.50</d2p1:yesterday>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketPeersItem">
<d2p1:Close>30.05</d2p1:Close>
<d2p1:CloseDate>2023-10-06T00:00:00</d2p1:CloseDate>
<d2p1:Country>Taiwan</d2p1:Country>
<d2p1:DailyChange>-0.75</d2p1:DailyChange>
<d2p1:DailyPercentualChange>-2.4351</d2p1:DailyPercentualChange>
<d2p1:Date>2023-10-06T00:00:00</d2p1:Date>
<d2p1:ISIN>TW0002415007</d2p1:ISIN>
<d2p1:Importance>1000</d2p1:Importance>
<d2p1:Last>30.05</d2p1:Last>
<d2p1:LastUpdate>2023-10-10T16:35:00</d2p1:LastUpdate>
<d2p1:MarketCap>27045</d2p1:MarketCap>
<d2p1:MonthlyChange>-1.20</d2p1:MonthlyChange>
<d2p1:MonthlyPercentualChange>-3.8400</d2p1:MonthlyPercentualChange>
<d2p1:Name>Cx Technology</d2p1:Name>
<d2p1:Symbol>2415:TT</d2p1:Symbol>
<d2p1:Ticker>2415</d2p1:Ticker>
<d2p1:Type>stocks</d2p1:Type>
<d2p1:URL>/2415:tt</d2p1:URL>
<d2p1:WeeklyChange>1.30</d2p1:WeeklyChange>
<d2p1:WeeklyPercentualChange>4.5217</d2p1:WeeklyPercentualChange>
<d2p1:YTDChange>9.65</d2p1:YTDChange>
<d2p1:YTDPercentualChange>47.3039</d2p1:YTDPercentualChange>
<d2p1:YearlyChange>6.10</d2p1:YearlyChange>
<d2p1:YearlyPercentualChange>25.4697</d2p1:YearlyPercentualChange>
<d2p1:day_high>31.40</d2p1:day_high>
<d2p1:day_low>30.00</d2p1:day_low>
<d2p1:decimals>2</d2p1:decimals>
<d2p1:frequency>Daily</d2p1:frequency>
<d2p1:lastMonth>31.25</d2p1:lastMonth>
<d2p1:lastWeek>28.75</d2p1:lastWeek>
<d2p1:lastYear>23.95</d2p1:lastYear>
<d2p1:relationship>1</d2p1:relationship>
<d2p1:startYear>20.40</d2p1:startYear>
<d2p1:state>CLOSED</d2p1:state>
<d2p1:unit>TWD</d2p1:unit>
<d2p1:yesterday>30.80</d2p1:yesterday>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketPeersItem">
<d2p1:Close>13.90</d2p1:Close>
<d2p1:CloseDate>2023-10-06T00:00:00</d2p1:CloseDate>
<d2p1:Country>Taiwan</d2p1:Country>
<d2p1:DailyChange>0.10</d2p1:DailyChange>
<d2p1:DailyPercentualChange>0.7246</d2p1:DailyPercentualChange>
<d2p1:Date>2023-10-06T00:00:00</d2p1:Date>
<d2p1:ISIN>TW0003149001</d2p1:ISIN>
<d2p1:Importance>1000</d2p1:Importance>
<d2p1:Last>13.90</d2p1:Last>
<d2p1:LastUpdate>2023-10-10T13:41:00</d2p1:LastUpdate>
<d2p1:MarketCap>3118181440</d2p1:MarketCap>
<d2p1:MonthlyChange>-1.70</d2p1:MonthlyChange>
<d2p1:MonthlyPercentualChange>-10.8974</d2p1:MonthlyPercentualChange>
<d2p1:Name>G-tech Optoelectron</d2p1:Name>
<d2p1:Symbol>3149:TT</d2p1:Symbol>
<d2p1:Ticker>3149</d2p1:Ticker>
<d2p1:Type>stocks</d2p1:Type>
<d2p1:URL>/3149:tt</d2p1:URL>
<d2p1:WeeklyChange>0.25</d2p1:WeeklyChange>
<d2p1:WeeklyPercentualChange>1.8315</d2p1:WeeklyPercentualChange>
<d2p1:YTDChange>-4.60</d2p1:YTDChange>
<d2p1:YTDPercentualChange>-24.8649</d2p1:YTDPercentualChange>
<d2p1:YearlyChange>-7.45</d2p1:YearlyChange>
<d2p1:YearlyPercentualChange>-34.8946</d2p1:YearlyPercentualChange>
<d2p1:day_high>14.35</d2p1:day_high>
<d2p1:day_low>13.80</d2p1:day_low>
<d2p1:decimals>2</d2p1:decimals>
<d2p1:frequency>Daily</d2p1:frequency>
<d2p1:lastMonth>15.60</d2p1:lastMonth>
<d2p1:lastWeek>13.65</d2p1:lastWeek>
<d2p1:lastYear>21.35</d2p1:lastYear>
<d2p1:relationship>1</d2p1:relationship>
<d2p1:startYear>18.50</d2p1:startYear>
<d2p1:state>CLOSED</d2p1:state>
<d2p1:unit>TWD</d2p1:unit>
<d2p1:yesterday>13.80</d2p1:yesterday>
</anyType>
</ArrayOfanyType>

Components

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/markets/components/psi20:ind?c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

te.getMarketsComponents(symbols='psi20:ind')

With multi tickers:

te.getMarketsComponents(symbols=['indu:ind', 'psi20:ind'])

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/markets/components/psi20:ind?c=${api_key}`)
    console.log(response.data)
})()

Or using our package:

data = te.getMarketSnap(components_symbol = 'psi20:ind').then(function(data){
  console.log(data)     
});

With multi tickers:

data = te.getMarketSnap(components_symbol = ['indu:ind', 'psi20:ind']).then(function(data){
  console.log(data)     
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/components/psi20:ind?c=your_api_key");

With multi tickers:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/markets/components/indu:ind,psi20:ind?c=your_api_key");

/markets/components/{symbol}

SymbolrelationshipTickerNameCountryDateTypedecimalsstateLastCloseCloseDateMarketCapURLImportanceDailyChangeDailyPercentualChangeWeeklyChangeWeeklyPercentualChangeMonthlyChangeMonthlyPercentualChangeYearlyChangeYearlyPercentualChangeYTDChangeYTDPercentualChangeday_highday_lowyesterdaylastWeeklastMonthlastYearstartYearISINunitfrequencyLastUpdate
ALTR:PL0ALSSAltriPortugal7/12/2023 12:00:00 AMstocks2CLOSED4.16804.16807/12/2023 12:00:00 AM854981840/altr:pl1000-0.01-0.2393-0.0660-1.55880.00400.0961-1.9170-31.5037-0.8370-16.72334.194.14604.17804.23404.16406.08505.0050PTALT0AE0002EURDaily7/12/2023 2:18:00 PM
BCP:PL0BCPBCPPortugal7/12/2023 12:00:00 AMstocks2CLOSED0.22690.22697/12/2023 12:00:00 AM3366511200/bcp:pl10000.000512.29940.00662.99590.01718.15060.090966.83820.080554.98630.22740.22250.22180.22030.20980.13600.1464PTBCP0AM0007EURDaily7/12/2023 2:15:00 PM
COR:PL0CORACorticeira AmorimPortugal7/12/2023 12:00:00 AMstocks2CLOSED9.989.987/12/2023 12:00:00 AM13167/cor:pl10000.121.21700.191.94080.131.3198-0.06-0.59761.2614.44959.989.789.869.799.8510.048.72PTCOR0AE0006EURDaily7/12/2023 2:22:00 PM

/markets/components/{symbol}?f=json

[{"Symbol":"ALTR:PL","relationship":0,"Ticker":"ALSS","Name":"Altri","Country":"Portugal","Date":"2023-10-10T00:00:00","Type":"stocks","decimals":2.0,"state":"CLOSED","Last":4.40,"Close":4.40,"CloseDate":"2023-10-10T00:00:00","MarketCap":900938303.0,"URL":"/altr:pl","Importance":1000,"DailyChange":0.07,"DailyPercentualChange":1.6166,"WeeklyChange":0.17,"WeeklyPercentualChange":4.0189,"MonthlyChange":-0.16,"MonthlyPercentualChange":-3.5088,"YearlyChange":-0.69,"YearlyPercentualChange":-13.5560,"YTDChange":-0.6050000,"YTDPercentualChange":-12.0879,"day_high":4.41,"day_low":4.3380000,"yesterday":4.33,"lastWeek":4.23,"lastMonth":4.56,"lastYear":5.09,"startYear":5.0050,"ISIN":"PTALT0AE0002","unit":"EUR","frequency":"Daily","LastUpdate":"2023-10-10T17:15:00"},{"Symbol":"BCP:PL","relationship":0,"Ticker":"BCP","Name":"BCP","Country":"Portugal","Date":"2023-10-10T00:00:00","Type":"stocks","decimals":2.0,"state":"CLOSED","Last":0.2776000,"Close":0.2776000,"CloseDate":"2023-10-10T00:00:00","MarketCap":4192620813.0,"URL":"/bcp:pl","Importance":1000,"DailyChange":0.0080000,"DailyPercentualChange":2.9674,"WeeklyChange":0.0168000,"WeeklyPercentualChange":6.4417,"MonthlyChange":0.0296000,"MonthlyPercentualChange":11.9355,"YearlyChange":0.1503000,"YearlyPercentualChange":118.0676,"YTDChange":0.1312000,"YTDPercentualChange":89.6175,"day_high":0.2790000,"day_low":0.2715000,"yesterday":0.2696000,"lastWeek":0.2608000,"lastMonth":0.2480000,"lastYear":0.1273000,"startYear":0.1464,"ISIN":"PTBCP0AM0007","unit":"EUR","frequency":"Daily","LastUpdate":"2023-10-10T17:19:00"},{"Symbol":"COR:PL","relationship":0,"Ticker":"CORA","Name":"Corticeira Amorim","Country":"Portugal","Date":"2023-10-10T00:00:00","Type":"stocks","decimals":2.0,"state":"CLOSED","Last":9.52,"Close":9.52,"CloseDate":"2023-10-10T00:00:00","MarketCap":1280790000.0,"URL":"/cor:pl","Importance":1000,"DailyChange":0.16,"DailyPercentualChange":1.7094,"WeeklyChange":-0.12,"WeeklyPercentualChange":-1.2448,"MonthlyChange":-0.54,"MonthlyPercentualChange":-5.3678,"YearlyChange":0.73,"YearlyPercentualChange":8.3049,"YTDChange":0.80,"YTDPercentualChange":9.1743,"day_high":9.63,"day_low":9.35,"yesterday":9.36,"lastWeek":9.64,"lastMonth":10.06,"lastYear":8.79,"startYear":8.72,"ISIN":"PTCOR0AE0006","unit":"EUR","frequency":"Daily","LastUpdate":"2023-10-10T17:21:00"}]

/markets/components/{symbol}?f=csv

ALTR:PL,0,ALSS,Altri,Portugal,10/10/2023 12:00:00 AM,stocks,2,CLOSED,4.40,4.40,10/10/2023 12:00:00 AM,900938303,/altr:pl,1000,0.07,1.6166,0.17,4.0189,-0.16,-3.5088,-0.69,-13.5560,-0.6050000,-12.0879,4.41,4.3380000,4.33,4.23,4.56,5.09,5.0050,PTALT0AE0002,EUR,Daily,10/10/2023 5:15:00 PM
BCP:PL,0,BCP,BCP,Portugal,10/10/2023 12:00:00 AM,stocks,2,CLOSED,0.2776000,0.2776000,10/10/2023 12:00:00 AM,4192620813,/bcp:pl,1000,0.0080000,2.9674,0.0168000,6.4417,0.0296000,11.9355,0.1503000,118.0676,0.1312000,89.6175,0.2790000,0.2715000,0.2696000,0.2608000,0.2480000,0.1273000,0.1464,PTBCP0AM0007,EUR,Daily,10/10/2023 5:19:00 PM
COR:PL,0,CORA,Corticeira Amorim,Portugal,10/10/2023 12:00:00 AM,stocks,2,CLOSED,9.52,9.52,10/10/2023 12:00:00 AM,1280790000,/cor:pl,1000,0.16,1.7094,-0.12,-1.2448,-0.54,-5.3678,0.73,8.3049,0.80,9.1743,9.63,9.35,9.36,9.64,10.06,8.79,8.72,PTCOR0AE0006,EUR,Daily,10/10/2023 5:21:00 PM

/markets/components/{symbol}?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.MarketPeersItem">
<d2p1:Close>4.40</d2p1:Close>
<d2p1:CloseDate>2023-10-10T00:00:00</d2p1:CloseDate>
<d2p1:Country>Portugal</d2p1:Country>
<d2p1:DailyChange>0.07</d2p1:DailyChange>
<d2p1:DailyPercentualChange>1.6166</d2p1:DailyPercentualChange>
<d2p1:Date>2023-10-10T00:00:00</d2p1:Date>
<d2p1:ISIN>PTALT0AE0002</d2p1:ISIN>
<d2p1:Importance>1000</d2p1:Importance>
<d2p1:Last>4.40</d2p1:Last>
<d2p1:LastUpdate>2023-10-10T17:15:00</d2p1:LastUpdate>
<d2p1:MarketCap>900938303</d2p1:MarketCap>
<d2p1:MonthlyChange>-0.16</d2p1:MonthlyChange>
<d2p1:MonthlyPercentualChange>-3.5088</d2p1:MonthlyPercentualChange>
<d2p1:Name>Altri</d2p1:Name>
<d2p1:Symbol>ALTR:PL</d2p1:Symbol>
<d2p1:Ticker>ALSS</d2p1:Ticker>
<d2p1:Type>stocks</d2p1:Type>
<d2p1:URL>/altr:pl</d2p1:URL>
<d2p1:WeeklyChange>0.17</d2p1:WeeklyChange>
<d2p1:WeeklyPercentualChange>4.0189</d2p1:WeeklyPercentualChange>
<d2p1:YTDChange>-0.6050000</d2p1:YTDChange>
<d2p1:YTDPercentualChange>-12.0879</d2p1:YTDPercentualChange>
<d2p1:YearlyChange>-0.69</d2p1:YearlyChange>
<d2p1:YearlyPercentualChange>-13.5560</d2p1:YearlyPercentualChange>
<d2p1:day_high>4.41</d2p1:day_high>
<d2p1:day_low>4.3380000</d2p1:day_low>
<d2p1:decimals>2</d2p1:decimals>
<d2p1:frequency>Daily</d2p1:frequency>
<d2p1:lastMonth>4.56</d2p1:lastMonth>
<d2p1:lastWeek>4.23</d2p1:lastWeek>
<d2p1:lastYear>5.09</d2p1:lastYear>
<d2p1:relationship>0</d2p1:relationship>
<d2p1:startYear>5.0050</d2p1:startYear>
<d2p1:state>CLOSED</d2p1:state>
<d2p1:unit>EUR</d2p1:unit>
<d2p1:yesterday>4.33</d2p1:yesterday>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketPeersItem">
<d2p1:Close>0.2776000</d2p1:Close>
<d2p1:CloseDate>2023-10-10T00:00:00</d2p1:CloseDate>
<d2p1:Country>Portugal</d2p1:Country>
<d2p1:DailyChange>0.0080000</d2p1:DailyChange>
<d2p1:DailyPercentualChange>2.9674</d2p1:DailyPercentualChange>
<d2p1:Date>2023-10-10T00:00:00</d2p1:Date>
<d2p1:ISIN>PTBCP0AM0007</d2p1:ISIN>
<d2p1:Importance>1000</d2p1:Importance>
<d2p1:Last>0.2776000</d2p1:Last>
<d2p1:LastUpdate>2023-10-10T17:19:00</d2p1:LastUpdate>
<d2p1:MarketCap>4192620813</d2p1:MarketCap>
<d2p1:MonthlyChange>0.0296000</d2p1:MonthlyChange>
<d2p1:MonthlyPercentualChange>11.9355</d2p1:MonthlyPercentualChange>
<d2p1:Name>BCP</d2p1:Name>
<d2p1:Symbol>BCP:PL</d2p1:Symbol>
<d2p1:Ticker>BCP</d2p1:Ticker>
<d2p1:Type>stocks</d2p1:Type>
<d2p1:URL>/bcp:pl</d2p1:URL>
<d2p1:WeeklyChange>0.0168000</d2p1:WeeklyChange>
<d2p1:WeeklyPercentualChange>6.4417</d2p1:WeeklyPercentualChange>
<d2p1:YTDChange>0.1312000</d2p1:YTDChange>
<d2p1:YTDPercentualChange>89.6175</d2p1:YTDPercentualChange>
<d2p1:YearlyChange>0.1503000</d2p1:YearlyChange>
<d2p1:YearlyPercentualChange>118.0676</d2p1:YearlyPercentualChange>
<d2p1:day_high>0.2790000</d2p1:day_high>
<d2p1:day_low>0.2715000</d2p1:day_low>
<d2p1:decimals>2</d2p1:decimals>
<d2p1:frequency>Daily</d2p1:frequency>
<d2p1:lastMonth>0.2480000</d2p1:lastMonth>
<d2p1:lastWeek>0.2608000</d2p1:lastWeek>
<d2p1:lastYear>0.1273000</d2p1:lastYear>
<d2p1:relationship>0</d2p1:relationship>
<d2p1:startYear>0.1464</d2p1:startYear>
<d2p1:state>CLOSED</d2p1:state>
<d2p1:unit>EUR</d2p1:unit>
<d2p1:yesterday>0.2696000</d2p1:yesterday>
</anyType>
<anyType xmlns:d2p1="http://schemas.datacontract.org/2004/07/APILib.DB" i:type="d2p1:Markets.MarketPeersItem">
<d2p1:Close>9.52</d2p1:Close>
<d2p1:CloseDate>2023-10-10T00:00:00</d2p1:CloseDate>
<d2p1:Country>Portugal</d2p1:Country>
<d2p1:DailyChange>0.16</d2p1:DailyChange>
<d2p1:DailyPercentualChange>1.7094</d2p1:DailyPercentualChange>
<d2p1:Date>2023-10-10T00:00:00</d2p1:Date>
<d2p1:ISIN>PTCOR0AE0006</d2p1:ISIN>
<d2p1:Importance>1000</d2p1:Importance>
<d2p1:Last>9.52</d2p1:Last>
<d2p1:LastUpdate>2023-10-10T17:21:00</d2p1:LastUpdate>
<d2p1:MarketCap>1280790000</d2p1:MarketCap>
<d2p1:MonthlyChange>-0.54</d2p1:MonthlyChange>
<d2p1:MonthlyPercentualChange>-5.3678</d2p1:MonthlyPercentualChange>
<d2p1:Name>Corticeira Amorim</d2p1:Name>
<d2p1:Symbol>COR:PL</d2p1:Symbol>
<d2p1:Ticker>CORA</d2p1:Ticker>
<d2p1:Type>stocks</d2p1:Type>
<d2p1:URL>/cor:pl</d2p1:URL>
<d2p1:WeeklyChange>-0.12</d2p1:WeeklyChange>
<d2p1:WeeklyPercentualChange>-1.2448</d2p1:WeeklyPercentualChange>
<d2p1:YTDChange>0.80</d2p1:YTDChange>
<d2p1:YTDPercentualChange>9.1743</d2p1:YTDPercentualChange>
<d2p1:YearlyChange>0.73</d2p1:YearlyChange>
<d2p1:YearlyPercentualChange>8.3049</d2p1:YearlyPercentualChange>
<d2p1:day_high>9.63</d2p1:day_high>
<d2p1:day_low>9.35</d2p1:day_low>
<d2p1:decimals>2</d2p1:decimals>
<d2p1:frequency>Daily</d2p1:frequency>
<d2p1:lastMonth>10.06</d2p1:lastMonth>
<d2p1:lastWeek>9.64</d2p1:lastWeek>
<d2p1:lastYear>8.79</d2p1:lastYear>
<d2p1:relationship>0</d2p1:relationship>
<d2p1:startYear>8.72</d2p1:startYear>
<d2p1:state>CLOSED</d2p1:state>
<d2p1:unit>EUR</d2p1:unit>
<d2p1:yesterday>9.36</d2p1:yesterday>
</anyType>
</ArrayOfanyType>

Response fields

FieldTypeDescriptionExample
SymbolstringUnique symbol used by Trading Economics“6758:JP”
TickerstringUnique ticker code used by Trading Economics“6758”
NamestringFull name of the company, commodity, or indicator“Sony”
CountrystringCountry associated with the instrument“Japan”
DatestringDate and time of the latest release in UTC (ISO 8601 format)“2023-04-13T00:00:00”
TypestringMarket type“stocks”
DecimalsnumberNumber of decimal places used in reported values2.0
StatestringCurrent market state“CLOSED”
LastnumberMost recent trading value or price11900.00
ClosenumberLast recorded value before the market closed11900.00
CloseDatestringDate and time of the last closing price (ISO 8601 format)“2023-04-13T00:00:00”
MarketCapnumberMarket capitalization14684155308900.0
URLstringTrading Economics link to the instrument’s detail page“/commodity/eggs-ch”
ImportancenumberIndicator importance score ranging from 0 (lowest) to 1000 (highest)1000
DailyChangenumberAbsolute difference between previous close and current price-8.00
DailyPercentualChangenumberPercentage difference between previous close and current price-0.1801
WeeklyChangenumberAbsolute difference between last week’s close and current price56.00
WeeklyPercentualChangenumberPercentage difference between last week’s close and current price1.2788
MonthlyChangenumberAbsolute difference between last month’s close and current price-139.00
MonthlyPercentualChangenumberPercentage difference between last month’s close and current price-3.0389
YearlyChangenumberAbsolute difference between last year’s close and current price-15.00
YearlyPercentualChangenumberPercentage difference between last year’s close and current price-0.3371
YTDChangenumberAbsolute difference between last year’s final close and current price (YTD)525.00
YTDPercentualChangenumberPercentage difference between last year’s final close and current price (YTD)13.4271
day_highnumberHighest trading value of the current day4460.00
day_lownumberLowest trading value of the current day4410.00
YesterdaynumberPrevious day’s closing price4443.00
LastWeeknumberClosing price from the previous week4379.00
LastMonthnumberClosing price from the previous month4574.00
LastYearnumberClosing price from the previous year4450.00
StartYearnumberClosing price at the start of the current year3910.00
ISINstringInternational Securities Identification Number“US0378331005”
UnitstringUnit of measurement for the value“CNY/T”
FrequencystringReporting frequency of the market data“Daily”
LastUpdatestringTimestamp of the most recent data update (ISO 8601 format)“2023-04-13T18:24:00”

Relationship field available only in ‘Peers’ and ‘Components’

FieldTypeDescriptionExample
RelationshipnumberIndicates the relationship type:
0 = component, 1 = peer
0