From dbc1c62be04ce118ce9ce7623890bc3060370926 Mon Sep 17 00:00:00 2001 From: Raul Castro Date: Thu, 27 Nov 2025 02:36:48 -0300 Subject: [PATCH 1/3] fix: deleting pandas and yfinance, deleting old requests for now --- controllers/mainprices.py | 38 -------------------------------------- requirements.txt | 2 -- 2 files changed, 40 deletions(-) delete mode 100644 controllers/mainprices.py diff --git a/controllers/mainprices.py b/controllers/mainprices.py deleted file mode 100644 index eba779a..0000000 --- a/controllers/mainprices.py +++ /dev/null @@ -1,38 +0,0 @@ -import pandas as pd -import yfinance as yf -from flask import jsonify -import json - -class ShowMarket: - - def result_show(): - timeprices = yf.download("BOVA11.SA SPY") - return timeprices.head(-1) - - def show_ticker(cls): - quote = yf.Ticker(cls) - return quote.info - """ - return { - "Name": quote.info['shortName'], - "Symbol": quote.info['symbol'], - "Price": quote.info['currentPrice'], - "Profit": quote.info['profitMargins'], - "Volume": quote.info['volume'], - "AverageVolume": quote.info['averageVolume'], - "MarketCap": quote.info['marketCap'], - } - """ - - - def fundamentals_ticker(cls): - quote = yf.Ticker(cls) - return quote.quarterly_financials.to_json() - - def cashflow_ticker(cls): - quote = yf.Ticker(cls) - return quote.quarterly_cashflow.to_json() - - def quote(cls): - price = yf.download(cls) - return price.info \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 5ba1271..9cded44 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,6 @@ Flask Flask-Cors python-dotenv -pandas -yfinance marko brapi google-generativeai From 5548864cca593d2f0d24d86f42a55d56a2da98b2 Mon Sep 17 00:00:00 2001 From: Raul Castro Date: Thu, 27 Nov 2025 02:39:38 -0300 Subject: [PATCH 2/3] fix / endpoint return --- api.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/api.py b/api.py index f37bbea..a0756c3 100644 --- a/api.py +++ b/api.py @@ -31,8 +31,14 @@ def decorated_function(*args, **kwargs): @require_api_key def get_generic(): return { - '/genai/resume_market':'Resume market', - '/genai/resume_ticker/TICKER.sa':'Basic info about TICKSER.sa', + '/genai/resume_market': 'Resume market', + '/genai/resume_ticker/TICKER': 'Resume for specific ticker', + '/brapi/quote/TICKER': 'Get stock quote data', + '/brapi/async_quote/TICKER': 'Get stock quote data (async)', + '/brapi/sync_quote/TICKER': 'Get stock quote data with modules', + '/brapi/sync_quote_list': 'Get list of predefined stocks', + '/brapi/sync_quote_by_sector/SECTOR': 'Get stocks by sector (top 10 by volume)', + '/brapi/sync_quote_list_sectors': 'Get available sectors list', }, 200 From 0d1ff3f2165e8c63d01fd12b9367843c2451c986 Mon Sep 17 00:00:00 2001 From: Raul Castro Date: Thu, 27 Nov 2025 02:47:58 -0300 Subject: [PATCH 3/3] fix libs --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 9cded44..54770c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,3 +7,5 @@ google-generativeai plotly requests gunicorn +gevent +werkzeug