Skip to content

johnalbertini14-glitch/openclaw-skills / skills/0xjordansg-yolo/openclaw-aisa-us-stock-analyst

us-stock-analyst

Verified

Professional US stock analysis with financial data, news, social sentiment, and multi-model AI. Comprehensive reports at $0.02-0.10 per analysis.

FileKindSize
README.mdmarkdown5.5 KB
SKILL.mdskill md10.1 KB
TEST_REPORT.mdmarkdown7.1 KB
_meta.jsonconfig411 B
examples/basic_analysis.pyscript3.4 KB
examples/batch_analysis.pyscript3.9 KB
examples/deep_analysis.pyscript5.3 KB
requirements.txtmanifest22 B
scripts/stock_analyst.pyscript20.1 KB
scripts/test_api_data.pyscript2.8 KB

scripts/test_api_data.py

View on GitHub
#!/usr/bin/env python3
"""
Simple test to show successfully retrieved data from AIsa APIs
"""

import asyncio
import sys
import os
import json

sys.path.insert(0, os.path.dirname(__file__))
from scripts.stock_analyst import AIsaStockAnalyst


async def main():
    """Test API data retrieval."""
    
    api_key = os.environ.get("AISA_API_KEY")
    if not api_key:
        print("Error: AISA_API_KEY not set")
        return
    
    analyst = AIsaStockAnalyst(api_key=api_key)
    ticker = "AAPL"
    
    try:
        print(f"\n{'='*70}")
        print(f"Testing API Data Retrieval for {ticker}")
        print(f"{'='*70}\n")
        
        # Test individual API calls
        print("1. Testing Financial Metrics API...")
        try:
            metrics = await analyst._get_financial_metrics(ticker)
            print("   ✓ Success!")
            if "data" in metrics:
                data = metrics["data"]
                print(f"   - Market Cap: ${data.get('market_cap', 0)/1e9:.2f}B")
                print(f"   - P/E Ratio: {data.get('pe_ratio', 'N/A')}")
                print(f"   - Revenue: ${data.get('revenue', 0)/1e9:.2f}B")
        except Exception as e:
            print(f"   ✗ Failed: {e}")
        
        print("\n2. Testing Stock News API...")
        try:
            news = await analyst._get_stock_news(ticker)
            print("   ✓ Success!")
            if "data" in news and news["data"]:
                print(f"   - Retrieved {len(news['data'])} news articles")
                print(f"   - Latest: {news['data'][0].get('title', 'N/A')[:60]}...")
        except Exception as e:
            print(f"   ✗ Failed: {e}")
        
        print("\n3. Testing Twitter API...")
        try:
            twitter = await analyst._get_twitter_data(ticker)
            print("   ✓ Success!")
            if "data" in twitter:
                tweets_data = twitter["data"]
                if "tweets" in tweets_data:
                    print(f"   - Retrieved {len(tweets_data['tweets'])} tweets")
                else:
                    print(f"   - Twitter data structure: {list(tweets_data.keys())}")
        except Exception as e:
            print(f"   ✗ Failed: {e}")
        
        print("\n4. Testing YouTube API...")
        try:
            youtube = await analyst._get_youtube_content(ticker)
            print("   ✓ Success!")
            print(f"   - Response keys: {list(youtube.keys())}")
        except Exception as e:
            print(f"   ✗ Failed: {e}")
        
        print(f"\n{'='*70}")
        print("Test Complete!")
        print(f"{'='*70}\n")
        
    except Exception as e:
        print(f"\nError: {e}")
        import traceback
        traceback.print_exc()
    finally:
        await analyst.close()


if __name__ == "__main__":
    asyncio.run(main())
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall