from datetime import date
from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCE_DEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCE_DEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.estimates.get_upgrades_downgrades(from_=date.fromisoformat("2024-01-01"), to=date.fromisoformat("2024-12-31"))
assert res.upgrades_downgrades_response is not None
# Handle response
print(res.upgrades_downgrades_response)curl --request GET \
--url https://api.aries.com/v1/stock/upgrade-downgrade \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/stock/upgrade-downgrade', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aries.com/v1/stock/upgrade-downgrade",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aries.com/v1/stock/upgrade-downgrade"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aries.com/v1/stock/upgrade-downgrade")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/stock/upgrade-downgrade")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"action": "main",
"company": "Citigroup",
"fromGrade": "Buy",
"gradeTime": 1765238400,
"symbol": "AAPL",
"toGrade": "Buy"
},
{
"action": "upgrade",
"company": "Goldman Sachs",
"fromGrade": "Neutral",
"gradeTime": 1765065600,
"symbol": "AAPL",
"toGrade": "Buy"
},
{
"action": "main",
"company": "Morgan Stanley",
"fromGrade": "Overweight",
"gradeTime": 1764547200,
"symbol": "AAPL",
"toGrade": "Overweight"
}
]
}Analyst Upgrades & Downgrades
Retrieve analyst rating changes including upgrades, downgrades, and reiterations from investment banks and research firms. Track sentiment shifts and potential catalysts.
Use Case: Alert users when major investment banks upgrade a stock to Buy rating.
from datetime import date
from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCE_DEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCE_DEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.estimates.get_upgrades_downgrades(from_=date.fromisoformat("2024-01-01"), to=date.fromisoformat("2024-12-31"))
assert res.upgrades_downgrades_response is not None
# Handle response
print(res.upgrades_downgrades_response)curl --request GET \
--url https://api.aries.com/v1/stock/upgrade-downgrade \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/stock/upgrade-downgrade', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aries.com/v1/stock/upgrade-downgrade",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aries.com/v1/stock/upgrade-downgrade"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aries.com/v1/stock/upgrade-downgrade")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/stock/upgrade-downgrade")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"action": "main",
"company": "Citigroup",
"fromGrade": "Buy",
"gradeTime": 1765238400,
"symbol": "AAPL",
"toGrade": "Buy"
},
{
"action": "upgrade",
"company": "Goldman Sachs",
"fromGrade": "Neutral",
"gradeTime": 1765065600,
"symbol": "AAPL",
"toGrade": "Buy"
},
{
"action": "main",
"company": "Morgan Stanley",
"fromGrade": "Overweight",
"gradeTime": 1764547200,
"symbol": "AAPL",
"toGrade": "Overweight"
}
]
}Authorizations
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Query Parameters
Stock ticker to filter by. Send the plain uppercase symbol (e.g. AAPL). Omit to return data across all symbols.
Start of the date window, inclusive. Format: YYYY-MM-DD (e.g. 2024-01-01). Omit to read from the earliest available data.
"2024-01-01"
End of the date window, inclusive. Format: YYYY-MM-DD (e.g. 2024-12-31). Omit to read up to today.
"2024-12-31"
Response
Analyst upgrades and downgrades.
Analyst rating upgrades and downgrades for a stock, sourced from Finnhub.
List of analyst rating change events
Show child attributes
Show child attributes
Was this page helpful?