Stocks and Financial Data Pull Crypto Finance Cryptocurrency Price Earnings Dividends
by @lkcair
Stock and Crypto Data information pull skill. 56+ financial data tools via Yahoo Finance. Auto-routes stock prices, fundamentals, earnings, dividends, option...
clawhub install stocksπ About This Skill
name: stocks description: Stock and Crypto Data information pull skill. 56+ financial data tools via Yahoo Finance. Auto-routes stock prices, fundamentals, earnings, dividends, options, crypto, forex, commodities, news, and more.
Stocks Skill
56+ financial tools via Yahoo Finance. Prices, fundamentals, earnings, options, crypto, forex, commodities, news.
Github Open-Souce
Please star Github if you like the skill.Also available for OpenWebUI.
https://github.com/lkcair/yfinance-ai
Setup
Run from the skill directory:
python3 -m venv .venv
.venv/bin/python3 -m pip install -r requirements.txt
> Windows: use .venv\Scripts\python3 instead of .venv/bin/python3.
AGNOSTIC OS / One-shot Design ( Goals )
Quotation / Command Execution Reliability (common pitfall)
python3 might not use the correct interpreter if the venv is not activated, leading to ModuleNotFoundError./home/openclaw/.openclaw/venv/stocks/bin/python3
pydantic for yfinance-ai) are installed within this specific venv using its associated pip command:/home/openclaw/.openclaw/venv/stocks/bin/pip install
/home/openclaw/.openclaw/venv/stocks/bin/python3 - << 'PY'
import asyncio, sys
sys.path.insert(0, '.')
from yfinance_ai import Toolst = Tools()
async def main():
r = await t.get_key_ratios(ticker='UNH')
print(r)
asyncio.run(main())
PY
scripts/) and execute that script using the venv's Python interpreter.Agent Quick-Start
After setup, copy the template below into your agent's TOOLS.md (or whichever file your framework injects into every session). This is the single most important step β if the agent can see the invocation pattern, it will work every time.
Replace SKILL_DIR with the absolute path to this skill's directory (e.g. where scripts/ and .venv/ live).
# Stocks Skill
Usage
bash cd SKILL_DIR/scripts && SKILL_DIR/.venv/bin/python3 -c " import asyncio, sys sys.path.insert(0, '.') from yfinance_ai import Tools t = Tools() async def main(): result = await t.METHOD(ARGS) print(result) asyncio.run(main()) " 2>/dev/null
Replace METHOD(ARGS) with any call below. Suppress stderr (2>/dev/null) to hide warnings.get_stock_price(ticker='AAPL')Common Calls
| Need | Method | |---|---| | Stock price |
| | Key ratios (P/E, ROE, margins) |get_key_ratios(ticker='AAPL')| | Company overview |get_company_overview(ticker='AAPL')| | Full deep-dive |get_complete_analysis(ticker='AAPL')| | Compare stocks |compare_stocks(tickers='AAPL,MSFT,GOOGL')| | Crypto |get_crypto_price(symbol='BTC')| | Forex |get_forex_rate(pair='EURUSD')| | Commodities |get_commodity_price(commodity='gold')| | News |get_stock_news(ticker='AAPL')| | Market indices |get_market_indices()| | Dividends |get_dividends(ticker='AAPL')| | Earnings |get_earnings_history(ticker='AAPL')| | Analyst recs |get_analyst_recommendations(ticker='AAPL')| | Options chain |get_options_chain(ticker='SPY')| | Market open/closed |get_market_status()|get_stock_priceRouting
Price / quote β get_key_ratiosRatios / valuation β get_company_overview"Tell me about" β get_complete_analysisDeep dive β compare_stocksCompare β get_crypto_priceCrypto β get_forex_rateForex β get_commodity_priceCommodities β get_stock_newsNews β
All Functions
By Categories:
get_stock_price, get_stock_quote, get_fast_info, get_historical_dataget_company_info, get_company_overview, get_company_officersget_income_statement, get_balance_sheet, get_cash_flow, get_key_ratios, get_financial_summaryget_earnings_history, get_earnings_dates, get_analyst_estimates, get_eps_trendget_analyst_recommendations, get_analyst_price_targets, get_upgrades_downgradesget_institutional_holders, get_insider_transactions, get_major_holdersget_dividends, get_stock_splits, get_corporate_actionsget_options_chain, get_options_expirationsget_market_indices, get_sector_performance, get_market_statusget_crypto_price, get_forex_rate, get_commodity_pricecompare_stocks, get_peer_comparison, get_historical_comparisonget_stock_news, get_sec_filingssearch_ticker, validate_ticker, run_self_testNotes
asyncio.run() wrapper handles this.π‘ Examples
cd SKILL_DIR/scripts && SKILL_DIR/.venv/bin/python3 -c "
import asyncio, sys
sys.path.insert(0, '.')
from yfinance_ai import Tools
t = Tools()
async def main():
result = await t.METHOD(ARGS)
print(result)
asyncio.run(main())
" 2>/dev/null
Replace METHOD(ARGS) with any call below. Suppress stderr (2>/dev/null) to hide warnings.
βοΈ Configuration
Run from the skill directory:
python3 -m venv .venv
.venv/bin/python3 -m pip install -r requirements.txt
> Windows: use .venv\Scripts\python3 instead of .venv/bin/python3.
π Tips & Best Practices
asyncio.run() wrapper handles this.