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 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..54770c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ Flask Flask-Cors python-dotenv -pandas -yfinance marko brapi google-generativeai plotly requests gunicorn +gevent +werkzeug