From 3428998240c3bffdaf0936ab19a05d55725381c6 Mon Sep 17 00:00:00 2001 From: Sarthak7Gautam Date: Fri, 27 Mar 2026 11:22:39 +0530 Subject: [PATCH] fix:corrected the get available crypto tickers API URL --- server.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index b605551..d2f9e92 100644 --- a/server.py +++ b/server.py @@ -26,7 +26,7 @@ async def make_request(url: str) -> dict[str, any] | None: """Make a request to the Financial Datasets API with proper error handling.""" # Load environment variables from .env file load_dotenv() - + headers = {} if api_key := os.environ.get("FINANCIAL_DATASETS_API_KEY"): headers["X-API-KEY"] = api_key @@ -228,7 +228,7 @@ async def get_available_crypto_tickers() -> str: Gets all available crypto tickers. """ # Fetch data from the API - url = f"{FINANCIAL_DATASETS_API_BASE}/crypto/prices/tickers" + url = f"{FINANCIAL_DATASETS_API_BASE}/prices/tickers/" ## Fixed the url here data = await make_request(url) # Check if data is found @@ -351,7 +351,7 @@ async def get_sec_filings( url = f"{FINANCIAL_DATASETS_API_BASE}/filings/?ticker={ticker}&limit={limit}" if filing_type: url += f"&filing_type={filing_type}" - + # Call the API data = await make_request(url) @@ -365,6 +365,7 @@ async def get_sec_filings( # Stringify the SEC filings return json.dumps(filings, indent=2) + if __name__ == "__main__": # Log server startup logger.info("Starting Financial Datasets MCP Server...")