โ† Back to Help Center

๐Ÿฆข Swan Score API Configuration Guide

๐Ÿฆข Ethical Investment Intelligence System

Philosophy: "An important criterion for me is that the company is good for humanity"

Complete API configuration guide for Swan Score's multi-source ESG data aggregation system with centralized key management and intelligent source-key mapping.

๐ŸŒฑ ESG & Sustainability

Environmental, Social, Governance scoring from multiple validated sources

๐Ÿ’ก Innovation Metrics

R&D spending, technology advancement, and innovation scoring

๐Ÿฐ Economic Moat

Competitive advantages, market dominance, and financial strength

โš–๏ธ Technology Ethics

AI ethics, data privacy, and technology's impact on humanity

๐Ÿ”‘ Centralized Management

Save API keys once, use across all Swan Score data sources

๐Ÿ†“ Public APIs

Many sources require no API keys โ€” completely free to use

๐Ÿ“Š Swan Score Data Sources Overview

Swan Score uses multiple specialized data sources to create comprehensive ethical investment scores. The system automatically maps your saved API keys to the appropriate services based on your data source selections.

๐ŸŒฑ ESG & Sustainability Data Sources

Select Data Source
โ†’
Choose API Key
โ†’
Auto-Configuration

Available Sources:

๐ŸŒฟ Environmental Compliance Sources

Available Sources:

๐Ÿ’ก Innovation & Technology Metrics

Available Sources:

๐Ÿฐ Economic Moat Analysis

Available Sources:

โš–๏ธ Technology Ethics & Impact

Available Sources:

๐Ÿ”‘ API Keys & Configuration

๐Ÿ”‘ Centralized Key Management System

Swan Score uses a smart API key management system where you save each API key once in the API Keys section, then select which key to use for each data source via dropdown menus.

Required API Keys for Full Functionality

๐Ÿ“ˆ Alpha Vantage (Recommended)

๐Ÿ“Š Financial Modeling Prep (Recommended Enhancement)

๐Ÿ”— OpenFIGI (Optional)

๐Ÿ“‹ Step-by-Step Configuration Guide

  1. Open API Configuration Tab

    Navigate to the โš™๏ธ API Configuration tab in TradePro Portfolio Manager

  2. Configure API Keys (Once)

    Scroll down to the "๐Ÿฆข Swan Score API Keys" section and save your API keys:

    OpenFIGI API Key: your_openfigi_key (optional) Alpha Vantage: Use existing key from main API Keys section Financial Modeling Prep: Use existing key from main API Keys section

    Note: You only need to save each key once. The system will make them available across all Swan Score data sources.

  3. Configure Swan Score Data Sources

    In the "๐Ÿฆข Swan Score Data Sources" section, configure each data type:

    • ESG & Sustainability Data: Select your preferred source (Yahoo Finance is free)
    • Environmental Compliance: EPA Envirofacts (free) or European EEA
    • Innovation & Technology: Choose Alpha Vantage or FMP
    • Economic Moat Analysis: Alpha Vantage or FMP for comprehensive data
    • Technology Ethics: Alpha Vantage for news sentiment analysis
  4. Select API Keys for Each Source

    For each data source that requires an API key, use the dropdown to select which saved key to use:

    Source: Alpha Vantage
    โ†’
    Key: Alpha Vantage ๐Ÿ”‘
    โ†’
    Status: โœ… Connected
  5. Verify Connection Status

    Check the connection status indicators next to each data source:

    • โœ… API Key Available โ€” Ready to use
    • ๐Ÿ”“ Available (Public API) โ€” No key required
    • โŒ No API Key Configured โ€” Needs configuration
  6. Test Swan Score Integration

    Run a stock analysis to test Swan Score functionality:

    1. Go to ๐Ÿ“ˆ Stock Analysis tab
    2. Enter a stock symbol (e.g., AAPL, GOOGL)
    3. Click "Analyze Stock"
    4. Check Analysis Results for Swan Score section

๐Ÿฆข Swan Score Calculation & Policies

โš ๏ธ "Honest Data" Policy

Important: A Swan Score of 0 (or very low) often indicates missing data or API errors rather than poor ethical performance.

We believe in transparent data. Instead of guessing or filling gaps with averages, we report 0 to alert you that the data source failed or returned no information. Always check the individual component scores to identify which data points are missing.

๐Ÿงฎ The Swan Score Formula

The Total Swan Score (0โ€“100) is calculated using a weighted additive model that prioritizes ethical impact:

Total Score = (Innovation ร— 0.25) + (Moat ร— 0.25) + (Ethics ร— 0.50)

Note: This formula ensures that a company must be "good for humanity" (Ethics) to achieve a high score, regardless of its financial dominance.

๐Ÿ’ก Best Practices & Tips

๐Ÿ’ก Free API Strategy

To maximize free usage:

โš™๏ธ Recommended Configurations

๐Ÿ†“ Completely Free Setup

โญ Enhanced Setup (Recommended)

๐Ÿ† Professional Setup

๐Ÿ”ง Troubleshooting

Common Issues & Solutions

โŒ "No API Key Configured" Error

Solution:

  1. Save the required API key in the API Keys section
  2. Return to Swan Score data source configuration
  3. Select the saved key from the dropdown
  4. Verify connection status shows โœ…

โš ๏ธ Dropdown Shows "No API Key Required" Only

This is normal for:

โš ๏ธ API Rate Limits Exceeded

Solutions:

๐Ÿค– Swan AI Forecast (Live Features)

The Swan AI Forecast module is now fully integrated into the Community Dashboard. It leverages your configured APIs to generate predictive ethical scores with granular visibility.

๐Ÿ“Š Granular Breakdown

New in Phase 3: Visual breakdown of the "Swan Score" into 4 key components:

  • Innovation: R&D & Tech Growth
  • Economic Moat: Competitive Advantage
  • Tech Ethics: Data Privacy & AI Safety
  • Environmental: Carbon Footprint & ESG

๐Ÿ”— Smart Integration

The frontend ML engine (SwanScoringEngine) now normalizes data from disparate sources (EPA, Yahoo, World Bank) into a unified 0โ€“100% score, replacing previous simulation data.

โœจ Enhanced UI

The new scrollable detailed view allows for deep dives into component scores. The panel automatically calculates component weights when live data is engaged.

๐Ÿ”ฎ Future Enhancements

๐Ÿ‘ฅ Community Validation System

Coming soon: Peer-to-peer ESG validation where the community can validate and score companies based on ethical criteria. This will add human judgment to complement automated ESG scoring.

๐ŸŒ Global ESG Expansion

Additional data sources being integrated:

๐Ÿค– AI-Enhanced Analysis

Machine learning enhancements in development:

๐Ÿ“š Support & Resources

๐Ÿฆข Ready to Start Ethical Investing?

With Swan Score API Configuration complete, you now have access to comprehensive ethical investment analysis combining ESG data, innovation metrics, economic moat analysis, and technology ethics assessment.

Next Step: Run your first Swan Score analysis on a stock and see the detailed ethical investment breakdown!