MacroTrends Finance

FREEMIUM
Par BeyzCoder | Mise à jour לפני 20 ימים | Finance
Popularité

9.4 / 10

Latence

1,959ms

Niveau de service

100%

Health Check

N/A

Retour à toutes les discussions

No stock price data since 29 Nov 2023

Rapid account: Vincentbourgeois 33
vincentbourgeois33
לפני 3 חודשים
Hello,

I just discovered that I have no stock price data since 29 Nov 2023. Did something happen ?

Did range parameter change ? 
Is it still "quotes/history-price" ?

When I test the endpoint here, i get error 404 ...
Rapid account: Vincentbourgeois 33
vincentbourgeois33 Commented לפני חודשיים

thanks for that.
why not 20y like before ?
also, the q parameter works but it load data from 2022 only…

Rapid account: Stevenbaes
stevenbaes Commented לפני חודשיים

I added a 10y parameter for the range and the “Q” parameter as well for the freq.

Rapid account: Vincentbourgeois 33
vincentbourgeois33 Commented לפני 3 חודשים

Yes it works.
But I have 2 more issues :

  • The MAX parameter of stock prices doesn’t seem to work as intended. It returns only the last price.
  • Could you make the “Q” parameter work like the “quarterly” (which is already working)
Rapid account: Stevenbaes
stevenbaes Commented לפני 3 חודשים

Hello, sorry about that. I have fixed the problem can you check if the endpoints are working for you?

Rapid account: Vincentbourgeois 33
vincentbourgeois33 Commented לפני 3 חודשים

def fetch_financial_data(endpoint, symbol, freq=“quarterly”, formstyle=“dataframe”, **additional_params):
url = f"https://macrotrends-finance.p.rapidapi.com/{endpoint}"
headers = {
‘X-RapidAPI-Key’: api_keys[0],
‘X-RapidAPI-Host’: ‘macrotrends-finance.p.rapidapi.com
}
params = {
‘symbol’: symbol,
‘freq’: freq,
‘formstyle’: formstyle,
**additional_params
}
future = session.get(url, headers=headers, params=params)
response = future.result()

if response.status_code == 200:
    data = response.json()
    df = pd.DataFrame(data)
    df = df.transpose()
    df.reset_index(inplace=True)
    df.rename(columns={'index': 'Date'}, inplace=True)
    return df
else:
    print(f"Error {response.status_code}: {response.text}")
    return None

data = fetch_financial_data(‘statements/income’, ‘AAPL’, formstyle=“dataframe”, transpose=True)
if data is not None:
print(data.head())
else:
print(“Failed to fetch data.”)

Rapid account: Vincentbourgeois 33
vincentbourgeois33 Commented לפני 3 חודשים

Error 404: {“message”:“Endpoint ‘/statements/income’ does not exist”}
Failed to fetch data.

Rapid account: Vincentbourgeois 33
vincentbourgeois33 Commented לפני 3 חודשים

Upon further inspection, your API endpoints are not working anymore ! I can’t get any data since Nov 29 !

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires