Credit Ratings
Trading Economics API provides Credit Rating data from many agencies.
Latest
Get latest credit ratings
/ratings
import tradingeconomics as te
te.login('your_api_key')
te.getRatings()
const te = require('tradingeconomics');
te.login('your_api_key');
data = te.getRatings().then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/ratings?c=guest:guest");
Country | TE | TE_Outlook | SP | SP_Outlook | Moodys | Moodys_Outlook | Fitch | Fitch_Outlook | DBRS | DBRS_Outlook |
---|
Albania | 35 | Stable | B+ | Stable | B1 | Stable | | | | |
Andorra | 65 | Stable | BBB+ | Positive | Baa2 | Stable | A- | Stable | | |
Angola | 25 | Stable | B- | Stable | B3 | Positive | B- | Stable | | |
By country
Get credit rating data by specific country
/ratings/{country}
te.getRatings(country= 'mexico')
data = te.getRatings(country = 'mexico').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/ratings/mexico?c=guest:guest");
Country | TE | TE_Outlook | SP | SP_Outlook | Moodys | Moodys_Outlook | Fitch | Fitch_Outlook | DBRS | DBRS_Outlook |
---|
Mexico | 60 | Stable | BBB | Stable | Baa2 | Stable | BBB- | Stable | BBB | Stable |
/ratings/{countries}
te.getRatings(country=['mexico','sweden'])
data = te.getRatings(country = ['mexico', 'sweden']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/ratings/mexico,sweden?c=guest:guest");
Country | TE | TE_Outlook | SP | SP_Outlook | Moodys | Moodys_Outlook | Fitch | Fitch_Outlook | DBRS | DBRS_Outlook |
---|
Mexico | 60 | Stable | BBB | Stable | Baa2 | Stable | BBB- | Stable | BBB | Stable |
Sweden | 99 | Stable | AAA | Stable | Aaa | Stable | AAA | Stable | AAA | Stable |
Historical
Get credit rating historical data
/ratings/historical/{country}
te.getHistoricalRatings(country= 'mexico')
data = te.getRatings(historical = 'mexico').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/ratings/historical/mexico?c=guest:guest");
Country | Date | Agency | Rating | Outlook |
---|
Mexico | 7/8/2022 | Moody’s | Baa2 | Stable |
Mexico | 7/6/2022 | S&P | BBB | Stable |
Mexico | 5/6/2021 | DBRS | BBB | Stable |
/ratings/historical/{countries}
te.getHistoricalRatings(country=['mexico','sweden'])
data = te.getRatings(historical = ['mexico', 'sweden']).then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/ratings/historical/mexico,sweden?c=guest:guest");
Country | Date | Agency | Rating | Outlook |
---|
Mexico | 7/8/2022 | Moody’s | Baa2 | Stable |
Mexico | 7/6/2022 | S&P | BBB | Stable |
Sweden | 4/17/2012 | DBRS | AAA | Stable |
/ratings/historical/{country}/{yyyy-mm-dd}/{yyyy-mm-dd}
te.getHistoricalRatings(country='mexico', initDate='2013-01-01',
endDate='2014-01-01')
data = te.getRatings(historical = 'mexico',
start_date = '2013-01-01', end_date = '2014-01-01').then(function(data){
console.log(data)
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/ratings/historical/mexico/2013-01-01/2014-01-01?c=guest:guest");
Country | Date | Agency | Rating | Outlook |
---|
Mexico | 12/19/2013 | S&P | BBB+ | Stable |
Mexico | 5/8/2013 | Fitch | BBB+ | Stable |
Mexico | 3/12/2013 | S&P | BBB | Positive |
Response fields
Field | Type | Description | Example |
---|
Country | string | Country name | “Mexico” |
TE | string | Trading Economics rating | “60” |
TE_Outlook | string | Trading Economics outlook | “Stable” |
SP | string | Standard & Poor’s rating | “BBB” |
SP_Outlook | string | Standard & Poor’s outlook | “Stable” |
Moodys | string | Moody’s rating | “Baa2” |
Moodys_Outlook | string | Moody’s outlook | “Stable” |
Fitch | string | Fitch rating | “BBB-” |
Fitch_outlook | string | Fitch outlook | Stable" |
DBRS | string | DBRS rating | “BBB” |
DBRS_Outlook | string | DBRS outlook | “Stable” |
Fields available in ‘Historical’
Field | Type | Description | Example |
---|
Country | string | Country name | “Mexico” |
Date | string | Release time and date in UTC | “12/19/2013” |
Agency | string | Rating agency | “S&P” |
Rating | string | Rating score | “BBB+” |
Outlook | string | Rating outlook | “Stable” |