Latest Updates

Latest Updates

Using Requests:

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

Or using our package:

import tradingeconomics as te
te.login('your_api_key')
te.getLatestUpdates()

Using Requests:

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

Or using our package:

const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getLatestUpdates().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/updates?client=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.

/updates

CountryCategoryHistoricalDataSymbolLastUpdate
United KingdomElectricity PriceGBRELEPRI7/11/2023 6:01:28 PM
SpainElectricity PriceESPELEPRI7/11/2023 6:01:23 PM
ItalyElectricity PriceITAELEPRI7/11/2023 6:01:00 PM

/updates?f=json

[{"Country":"Colombia","Category":"Food Inflation","HistoricalDataSymbol":"COLOMBIAFOOINF","LastUpdate":"2023-10-09T19:06:33.953"},{"Country":"France","Category":"Electricity Price","HistoricalDataSymbol":"FRAELEPRI","LastUpdate":"2023-10-09T18:00:18.223"},{"Country":"Tanzania","Category":"Inflation Rate","HistoricalDataSymbol":"TANZANIAIR","LastUpdate":"2023-10-09T17:17:49.073"}]

/updates?f=csv

Country,Category,HistoricalDataSymbol,LastUpdate
Colombia,Inflation Rate,COCPIYOY,10/9/2023 7:12:11 PM
Colombia,Food Inflation,COLOMBIAFOOINF,10/9/2023 7:06:33 PM
France,Electricity Price,FRAELEPRI,10/9/2023 6:00:18 PM

/updates?f=xml

<ArrayOfUpdatedItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<UpdatedItem>
<Category>Food Inflation</Category>
<Country>Colombia</Country>
<HistoricalDataSymbol>COLOMBIAFOOINF</HistoricalDataSymbol>
<LastUpdate>2023-10-09T19:06:33.953</LastUpdate>
</UpdatedItem>
<UpdatedItem>
<Category>Electricity Price</Category>
<Country>France</Country>
<HistoricalDataSymbol>FRAELEPRI</HistoricalDataSymbol>
<LastUpdate>2023-10-09T18:00:18.223</LastUpdate>
</UpdatedItem>
<UpdatedItem>
<Category>Inflation Rate</Category>
<Country>Tanzania</Country>
<HistoricalDataSymbol>TANZANIAIR</HistoricalDataSymbol>
<LastUpdate>2023-10-09T17:17:49.073</LastUpdate>
</UpdatedItem>
</ArrayOfUpdatedItem>

By date

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/updates/2021-10-18?c={api_key}&time=15:20'
data = requests.get(url).json()
print(data)

Or using our package:

te.getLatestUpdates(init_date='2018-01-01')

With datetime:

te.getLatestUpdates(init_date='2021-10-18', time='15:20')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/updates/2021-10-18?c=${api_key}&time=15:20`)
    console.log(response.data)
})()

Or using our package:

data = te.getLatestUpdates(start_date = '2018-01-01').then(function(data){
  console.log(data)       
});

With datetime:

data = te.getLatestUpdates(start_date = '2021-10-18', time = '15:20').then(function(data){
  console.log(data)       
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/2018-01-01?c=your_api_key");

With datetime:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/2021-10-18?c=your_api_key&time=15:20");

/updates/{date}?c=your_api_key&time={hh:mm}

CountryCategoryHistoricalDataSymbolLastUpdate
United KingdomElectricity PriceGBRELEPRI7/11/2023 6:01:28 PM
SpainElectricity PriceESPELEPRI7/11/2023 6:01:23 PM
ItalyElectricity PriceITAELEPRI7/11/2023 6:01:00 PM

/updates/{date}?c=your_api_key&time={hh:mm}?f=json

[{"Country":"Colombia","Category":"Inflation Rate","HistoricalDataSymbol":"COCPIYOY","LastUpdate":"2023-10-09T19:12:11.61"},{"Country":"Colombia","Category":"Food Inflation","HistoricalDataSymbol":"COLOMBIAFOOINF","LastUpdate":"2023-10-09T19:06:33.953"},{"Country":"France","Category":"Electricity Price","HistoricalDataSymbol":"FRAELEPRI","LastUpdate":"2023-10-09T18:00:18.223"}]

/updates/{date}?c=your_api_key&time={hh:mm}?f=csv

Country,Category,HistoricalDataSymbol,LastUpdate
Colombia,Inflation Rate,COCPIYOY,10/9/2023 7:12:11 PM
Colombia,Food Inflation,COLOMBIAFOOINF,10/9/2023 7:06:33 PM
France,Electricity Price,FRAELEPRI,10/9/2023 6:00:18 PM

/updates/{date}?c=your_api_key&time={hh:mm}?f=xml

<ArrayOfUpdatedItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<UpdatedItem>
<Category>Inflation Rate</Category>
<Country>Colombia</Country>
<HistoricalDataSymbol>COCPIYOY</HistoricalDataSymbol>
<LastUpdate>2023-10-09T19:12:11.61</LastUpdate>
</UpdatedItem>
<UpdatedItem>
<Category>Food Inflation</Category>
<Country>Colombia</Country>
<HistoricalDataSymbol>COLOMBIAFOOINF</HistoricalDataSymbol>
<LastUpdate>2023-10-09T19:06:33.953</LastUpdate>
</UpdatedItem>
<UpdatedItem>
<Category>Electricity Price</Category>
<Country>France</Country>
<HistoricalDataSymbol>FRAELEPRI</HistoricalDataSymbol>
<LastUpdate>2023-10-09T18:00:18.223</LastUpdate>
</UpdatedItem>
</ArrayOfUpdatedItem>

By country

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/updates/country/portugal?c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

te.getLatestUpdates(country='portugal')

With multi countries

te.getLatestUpdates(country = ['portugal', 'spain'])

Using Requests:

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

Or using our package:

data = te.getLatestUpdates(country = 'portugal').then(function(data){
  console.log(data)       
});

With multi countries

data = te.getLatestUpdates(country = ['portugal', 'spain']).then(function(data){
  console.log(data)       
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/country/portugal?client=your_api_key");

With multi countries

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/country/portugal,spain?client=your_api_key");

/updates/country/{country}

CountryCategoryHistoricalDataSymbolLastUpdate
PortugalMoney Supply M3PORTUGALMONSUPM37/11/2023 2:54:29 AM
PortugalLoan GrowthPORTUGALLOAGRO7/11/2023 2:53:33 AM
PortugalBanks Balance SheetPORTUGALBANBALSHE7/11/2023 2:43:18 AM

/updates/country/{country}?f=json

[{"Country":"Portugal","Category":"Credit Rating","HistoricalDataSymbol":"","LastUpdate":"2023-10-09T11:13:23.75"},{"Country":"Portugal","Category":"Tourist Arrivals","HistoricalDataSymbol":"PORTUGALTOUARR","LastUpdate":"2023-10-09T03:12:41.74"},{"Country":"Portugal","Category":"Electricity Production","HistoricalDataSymbol":"PTELECTRICITY","LastUpdate":"2023-10-07T10:15:15.927"}]

/updates/country/{country}?f=csv

Country,Category,HistoricalDataSymbol,LastUpdate
Portugal,Credit Rating,,10/9/2023 11:13:23 AM
Portugal,Tourist Arrivals,PORTUGALTOUARR,10/9/2023 3:12:41 AM
Portugal,Electricity Production,PTELECTRICITY,10/7/2023 10:15:15 AM

/updates/country/{country}?f=xml

<ArrayOfUpdatedItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<UpdatedItem>
<Category>Credit Rating</Category>
<Country>Portugal</Country>
<HistoricalDataSymbol/>
<LastUpdate>2023-10-09T11:13:23.75</LastUpdate>
</UpdatedItem>
<UpdatedItem>
<Category>Tourist Arrivals</Category>
<Country>Portugal</Country>
<HistoricalDataSymbol>PORTUGALTOUARR</HistoricalDataSymbol>
<LastUpdate>2023-10-09T03:12:41.74</LastUpdate>
</UpdatedItem>
<UpdatedItem>
<Category>Electricity Production</Category>
<Country>Portugal</Country>
<HistoricalDataSymbol>PTELECTRICITY</HistoricalDataSymbol>
<LastUpdate>2023-10-07T10:15:15.927</LastUpdate>
</UpdatedItem>
</ArrayOfUpdatedItem>

By country and date

Using Requests:

import requests
api_key = 'YOUR_API_KEY'
url = f'https://api.tradingeconomics.com/updates/country/portugal/2018-01-01?c={api_key}'
data = requests.get(url).json()
print(data)

Or using our package:

te.getLatestUpdates(country='portugal', init_date='2018-01-01')

Using Requests:

const axios = require('axios');
(async () => {
    const api_key = 'YOUR_API_KEY'
    const response = await axios.get(`https://api.tradingeconomics.com/updates/country/portugal/2018-01-01?c=${api_key}`)
    console.log(response.data)
})()

Or using our package:

data = te.getLatestUpdates(start_date = '2018-01-01', country = 'portugal').then(function(data){
  console.log(data)       
});

Using Requests:

new HttpRequestMessage(new HttpMethod("GET"), "https://api.tradingeconomics.com/updates/country/portugal/2018-01-01?client=your_api_key");

/updates/country/{country}/{date}

CountryCategoryHistoricalDataSymbolLastUpdate
PortugalMoney Supply M3PORTUGALMONSUPM37/11/2023 2:54:29 AM
PortugalLoan GrowthPORTUGALLOAGRO7/11/2023 2:53:33 AM
PortugalBanks Balance SheetPORTUGALBANBALSHE7/11/2023 2:43:18 AM

/updates/country/{country}/{date}?f=json

[{"Country":"Portugal","Category":"Credit Rating","HistoricalDataSymbol":"","LastUpdate":"2023-10-09T11:13:23.75"},{"Country":"Portugal","Category":"Tourist Arrivals","HistoricalDataSymbol":"PORTUGALTOUARR","LastUpdate":"2023-10-09T03:12:41.74"},{"Country":"Portugal","Category":"Electricity Production","HistoricalDataSymbol":"PTELECTRICITY","LastUpdate":"2023-10-07T10:15:15.927"}]

/updates/country/{country}/{date}?f=csv

Country,Category,HistoricalDataSymbol,LastUpdate
Portugal,Credit Rating,,10/9/2023 11:13:23 AM
Portugal,Tourist Arrivals,PORTUGALTOUARR,10/9/2023 3:12:41 AM
Portugal,Electricity Production,PTELECTRICITY,10/7/2023 10:15:15 AM

/updates/country/{country}/{date}?f=xml

<ArrayOfUpdatedItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models">
<UpdatedItem>
<Category>Credit Rating</Category>
<Country>Portugal</Country>
<HistoricalDataSymbol/>
<LastUpdate>2023-10-09T11:13:23.75</LastUpdate>
</UpdatedItem>
<UpdatedItem>
<Category>Tourist Arrivals</Category>
<Country>Portugal</Country>
<HistoricalDataSymbol>PORTUGALTOUARR</HistoricalDataSymbol>
<LastUpdate>2023-10-09T03:12:41.74</LastUpdate>
</UpdatedItem>
<UpdatedItem>
<Category>Electricity Production</Category>
<Country>Portugal</Country>
<HistoricalDataSymbol>PTELECTRICITY</HistoricalDataSymbol>
<LastUpdate>2023-10-07T10:15:15.927</LastUpdate>
</UpdatedItem>
</ArrayOfUpdatedItem>

Response fields

FieldTypeDescriptionExample
CountrystringCountry name“Australia”
CategorystringCategory name“Inflation Expectations”
HistoricalDataSymbolstringUnique symbol used by Trading Economics“AUSTRALIAINFEXP”
LastUpdatestringTime when new data was inserted or changed“2023-04-13T17:23:32.933”