ESG Risk Ratings for Stocks

फ्रीमियम
द्वारा alphawave | अपडेट किया गया a month ago | Finance
लोकप्रियता

0.1 / 10

लेटेंसी

1,995ms

सेवा का स्तर

0%

Health Check

N/A

फॉलोवर: 2
संसाधन:
उत्पाद वेबसाइट
API निर्माता:
Rapid account: Alphawave
alphawave
alphawave
API को रेट करने के लिए लॉग इन करें
रेटिंग: 5 - वोट: 1

रीडमी

First, we import the necessary Python libraries.

import json
import requests
import pandas as pd

Using the AlphaWave Data ESG Risk Ratings for Stocks API, we can get the ESG Risk Rating and Controversy Risk for a given stock symbol. To call this API with Python, you can choose one of the supported Python code snippets provided in the API console. Here is an example of how to invoke the API with Python Requests.

url = "https://esg-risk-ratings-for-stocks.p.rapidapi.com/api/v1/resources/esg"

headers = {
    'x-rapidapi-host': "YOUR_X-RAPIDAPI-HOST_WILL_COPY_DIRECTLY_FROM_RAPIDAPI_PYTHON_CODE_SNIPPETS",
    'x-rapidapi-key': "YOUR_X-RAPIDAPI-KEY_WILL_COPY_DIRECTLY_FROM_RAPIDAPI_PYTHON_CODE_SNIPPETS"
    }

querystring = {"ticker":"AAPL"}

# Create ESG DataFrame
esg_score_response = requests.request("GET", url, headers=headers, params=querystring)
esg_score_df = pd.DataFrame.from_dict(esg_score_response.json())
esg_score_df = esg_score_df.transpose()
esg_score_df

That’s it!

Now you have ESG Risk Rating and Controversy Risk in a pandas DataFrame for a given stock symbol (AAPL in this example).