Examples
- Examples
- Getting Started
- Agents
- Teams
- Workflows
- Applications
- Streamlit Apps
- Evals
Agent Concepts
- Reasoning
- Multimodal
- RAG
- Knowledge
- Memory
- Async
- Hybrid Search
- Storage
- Tools
- Search
- Social
- Web Scraping
- Database
- Local
- APIs & External Services
- Airflow Tools
- Apify Tools
- AWS Lambda Tools
- Cal.com Tools
- Composio Tools
- Confluence Tools
- DALL-E Tools
- Desi Vocal Tools
- E2B Code Execution
- Fal Tools
- Financial Datasets Tools
- Giphy Tools
- GitHub Tools
- Google Calendar Tools
- Google Maps Tools
- Jira Tools
- Linear Tools
- Luma Labs Tools
- MLX Transcribe Tools
- Models Labs Tools
- OpenBB Tools
- Replicate Tools
- Resend Tools
- Todoist Tools
- YFinance Tools
- YouTube Tools
- Zendesk Tools
- MCP
- Vector Databases
- Context
- Embedders
- Agent State
- Observability
- Miscellaneous
Models
- Anthropic
- AWS Bedrock
- AWS Bedrock Claude
- Azure AI Foundry
- Azure OpenAI
- Cerebras
- Cerebras OpenAI
- Cohere
- DeepInfra
- DeepSeek
- Fireworks
- Gemini
- Groq
- Hugging Face
- IBM
- LM Studio
- LiteLLM
- LiteLLM OpenAI
- Meta
- Mistral
- NVIDIA
- Ollama
- OpenAI
- Perplexity
- Together
- XAI
APIs & External Services
Financial Datasets Tools
Code
cookbook/tools/financial_datasets_tools.py
Copy
from agno.agent import Agent
from agno.tools.financial_datasets import FinancialDatasetsTools
agent = Agent(
name="Financial Data Agent",
tools=[
FinancialDatasetsTools(), # For accessing financial data
],
description="You are a financial data specialist that helps analyze financial information for stocks and cryptocurrencies.",
instructions=[
"When given a financial query:",
"1. Use appropriate Financial Datasets methods based on the query type",
"2. Format financial data clearly and highlight key metrics",
"3. For financial statements, compare important metrics with previous periods when relevant",
"4. Calculate growth rates and trends when appropriate",
"5. Handle errors gracefully and provide meaningful feedback",
],
markdown=True,
show_tool_calls=True,
)
# Example 1: Financial Statements
print("\n=== Income Statement Example ===")
agent.print_response(
"Get the most recent income statement for AAPL and highlight key metrics",
stream=True,
)
# Example 2: Balance Sheet Analysis
print("\n=== Balance Sheet Analysis Example ===")
agent.print_response(
"Analyze the balance sheets for MSFT over the last 3 years. Focus on debt-to-equity ratio and cash position.",
stream=True,
)
Usage
1
Create a virtual environment
Open the Terminal
and create a python virtual environment.
Copy
python3 -m venv .venv
source .venv/bin/activate
2
Set your API credentials
Copy
export FINANCIAL_DATASETS_API_KEY=xxx
3
Install libraries
Copy
pip install -U agno
4
Run Agent
Copy
python cookbook/tools/financial_datasets_tools.py
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.