### Complete WebSocket Connection Example Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/websockets-realtime.md This example demonstrates the sequence of actions: opening a connection, subscribing to symbols, receiving data, and unsubscribing. ```bash # 1. Open connection wss://ws.eodhistoricaldata.com/ws/us?api_token=demo # 2. Send subscribe command {"action": "subscribe", "symbols": "AMZN,TSLA"} # 3. Receive streaming data... # 4. Unsubscribe when done {"action": "unsubscribe", "symbols": "AMZN"} ``` -------------------------------- ### Get Fund General Info using Python Client Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-fund.md Example of using the EODHD Python client to fetch general information for a specific fund. ```python # Get fund general info python eodhd_client.py --endpoint fundamentals --symbol SWPPX.US --filter General ``` -------------------------------- ### Demo Account Response Example Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/authentication.md This is an example of the JSON response for a demo account, showing no Marketplace subscriptions. ```json { "name": "API Documentation 2", "email": "supportlevel1@eodhistoricaldata.com", "subscriptionType": "test", "paymentMethod": "Not Available", "apiRequests": 19340, "apiRequestsDate": "2026-02-16", "dailyRateLimit": 100000, "extraLimit": 0, "inviteToken": null, "inviteTokenClicked": 0, "subscriptionMode": "demo", "canManageOrganizations": false, "availableDataFeeds": [], "availableMarketplaceDataFeeds": [] } ``` -------------------------------- ### Live/Intraday Data API Examples Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/special-exchanges-guide.md Examples of how to use the Live/Intraday Data API for various special exchange tickers. ```APIDOC ## Live/Intraday Data API ### Description Demonstrates fetching real-time or intraday data for special exchanges using the Live/Intraday Data API. ### Usage Examples #### Index (Real-time) ```bash curl "https://eodhd.com/api/real-time/GSPC.INDX?api_token=demo&fmt=json" ``` #### Forex (Real-time) ```bash curl "https://eodhd.com/api/real-time/EURUSD.FOREX?api_token=demo&fmt=json" ``` #### Crypto (Real-time) ```bash curl "https://eodhd.com/api/real-time/BTC-USD.CC?api_token=demo&fmt=json" ``` #### Intraday 5-minute data ```bash curl "https://eodhd.com/api/intraday/GSPC.INDX?interval=5m&api_token=demo&fmt=json" ``` ### Parameters - **ticker** (string) - Required - The ticker symbol for the asset, including its exchange or asset type suffix (e.g., `GSPC.INDX`, `EURUSD.FOREX`, `BTC-USD.CC`). - **api_token** (string) - Required - Your EOD Historical Data API token. - **fmt** (string) - Optional - The desired response format (e.g., `json`). Defaults to `json`. - **interval** (string) - Optional - The interval for intraday data (e.g., `5m`, `15m`, `1h`). Only applicable for intraday endpoints. ``` -------------------------------- ### Register and Install Claude Plugin Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/README.md Commands to register the EODHD plugin in the Claude marketplace and then install it. ```bash # Register the marketplace /plugin marketplace add EodHistoricalData/eodhd-claude-skills # Install the plugin /plugin install eodhd-api@eodhd-claude-skills ``` -------------------------------- ### Paid Account Response Example with Marketplace Subscriptions Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/authentication.md This is an example of the JSON response for a paid account that includes Marketplace subscriptions. ```json { "name": "John Doe", "email": "john.doe@gmx.de", "subscriptionType": "monthly", "paymentMethod": "PayPal", "apiRequests": 5301, "apiRequestsDate": "2026-01-25", "dailyRateLimit": 100000, "extraLimit": 500, "inviteToken": null, "inviteTokenClicked": 0, "subscriptionMode": "paid", "canManageOrganizations": false, "availableDataFeeds": [ "Bulk Splits and Dividends API", "News API", "EOD Historical Data", "Search API", "dividends", "Dividends Data Feed", "Split Data Feed", "Live (delayed) Data API", "CBOE Data API", "Sentiment Data API", "Exchanges List API", "Daily Treasury Bill Rates", "Daily Treasury Real Long-Term Rates, Daily Treasury Long-Term Rates", "Daily Treasury Par Yield Curve Rates", "Daily Treasury Par Real Yield Curve Rates" ], "availableMarketplaceDataFeeds": { "dailyRateLimit": 100000, "requestsSpent": 80, "timeToReset": "19:01 GMT+0000", "subscriptions": ["US Stock Options Data API"] } } ``` -------------------------------- ### curl: Get Stock Highlights Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-api.md Retrieve highlight data for a stock using curl. This example shows how to get 'Highlights' data for AAPL.US with the demo API token. ```bash curl "https://eodhd.com/api/fundamentals/AAPL.US?api_token=demo&fmt=json&filter=Highlights" ``` -------------------------------- ### Manual Setup with API Token Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/README.md Steps for cloning the repository and setting the EODHD API token as an environment variable. ```bash git clone https://github.com/EodHistoricalData/eodhd-claude-skills.git export EODHD_API_TOKEN="your_token_here" ``` -------------------------------- ### Python Client: Get Specific Fundamentals Section Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-api.md Retrieve a specific subsection of fundamentals data for an ETF by specifying the endpoint, symbol, and a detailed filter. For example, to get the top 10 holdings of an ETF. ```bash python eodhd_client.py --endpoint fundamentals --symbol VTI.US --filter ETF_Data::Top_10_Holdings ``` -------------------------------- ### Get Top Holdings using curl Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-fund.md Example using curl to fetch the 'Top_Holdings' data for a specific fund. ```bash # Get top holdings curl "https://eodhd.com/api/fundamentals/SWPPX.US?api_token=demo&fmt=json&filter=MutualFund_Data::Top_Holdings" ``` -------------------------------- ### Environment Setup Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/README.md Instructions for setting up your API token as an environment variable and testing your connection. ```APIDOC ## Environment Setup ### Set API token ```bash export EODHD_API_TOKEN="your_token_here" ``` ### Test connection ```bash curl "https://eodhd.com/api/internal-user?api_token=$EODHD_API_TOKEN" ``` ``` -------------------------------- ### Python Client Usage Examples Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/README.md Demonstrates how to use the stdlib-only Python client to fetch financial data for different endpoints. ```bash python skills/eodhd-api/scripts/eodhd_client.py --endpoint eod --symbol AAPL.US --from-date 2025-01-01 --to-date 2025-03-31 python skills/eodhd-api/scripts/eodhd_client.py --endpoint fundamentals --symbol MSFT.US python skills/eodhd-api/scripts/eodhd_client.py --endpoint screener --limit 20 ``` -------------------------------- ### Get Historical Data with Range for Mutual Fund Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/api-authentication-demo-access.md Retrieve historical end-of-day data for a mutual fund starting from a specified date. ```bash https://eodhd.com/api/eod/SWPPX.US?api_token=demo&from=2015-01-01&fmt=json ``` -------------------------------- ### Demo Access: WebSocket Subscription (Crypto) Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/api-authentication-demo-access.md This example shows how to subscribe to real-time cryptocurrency data streams via WebSocket using the 'demo' token. Ensure the correct symbol format (e.g., BTC-USD) is used. ```bash # Crypto wss://ws.eodhistoricaldata.com/ws/crypto?api_token=demo {"action": "subscribe", "symbols": "BTC-USD,ETH-USD"} ``` -------------------------------- ### Basic API Token Usage Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/authentication.md Your API key goes into the URL as a query parameter: `?api_token=YOUR_KEY`. For example, to get EOD data for AAPL. ```APIDOC ## Basic API Token Usage ### Description This example shows how to include your API token as a query parameter in a request to fetch EOD data for AAPL. ### Method GET ### Endpoint `https://eodhd.com/api/eod/AAPL.US?api_token=YOUR_KEY` ### Parameters #### Query Parameters - **api_token** (string) - Required - Your unique EODHD API token. - **fmt** (string) - Optional - The desired output format (e.g., `json`). ### Request Example ```bash curl "https://eodhd.com/api/eod/AAPL.US?api_token=YOUR_KEY&fmt=json" ``` ### Response #### Success Response (200) - **Data**: JSON object containing End-of-Day stock data. #### Response Example ```json { "...": "..." } ``` ``` -------------------------------- ### Using the Helper Client Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/bulk-fundamentals.md Examples of how to use the provided helper client to fetch bulk fundamental data. ```APIDOC ## Using the Helper Client ### Description Examples of how to use the provided helper client to fetch bulk fundamental data. ### Code Snippets #### Using the helper client (exchange-based) ```bash python eodhd_client.py --endpoint bulk-fundamentals --symbol NASDAQ --limit 100 ``` #### Using the helper client (specific symbols via --symbols) ```bash python eodhd_client.py --endpoint bulk-fundamentals --symbol NASDAQ --symbols AAPL.US,MSFT.US ``` ``` -------------------------------- ### Get Expense Ratio and Yields using curl Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-fund.md Example using curl and jq to extract 'Expense_Ratio' and specific yield metrics from the fundamentals data. ```bash # Get expense ratio and yields curl "https://eodhd.com/api/fundamentals/SWPPX.US?api_token=demo&fmt=json&filter=MutualFund_Data" | jq '{Expense_Ratio, Yield_1Year_YTD, Yield_5Year_YTD}' ``` -------------------------------- ### Example Cryptocurrency Fundamentals Request Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-crypto-currency.md An example of a direct API call to fetch general fundamental data for Bitcoin (BTC-USD). Ensure you replace 'demo' with your actual API token. ```bash https://eodhd.com/api/fundamentals/BTC-USD.CC?api_token=demo&fmt=json ``` -------------------------------- ### Get Fund Top Holdings using Python Client Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-fund.md Example of using the EODHD Python client to retrieve the top holdings for a specific fund. ```python # Get top holdings python eodhd_client.py --endpoint fundamentals --symbol SWPPX.US --filter MutualFund_Data::Top_Holdings ``` -------------------------------- ### Make API Request - Examples Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-api.md Examples of cURL requests for different instrument types. Ensure you use the correct ticker format and replace 'demo' with your API token. ```bash # Stock curl "https://eodhd.com/api/fundamentals/AAPL.US?api_token=demo&fmt=json&filter=General" # ETF curl "https://eodhd.com/api/fundamentals/VTI.US?api_token=demo&fmt=json&filter=General" # Mutual Fund curl "https://eodhd.com/api/fundamentals/VFIAX.US?api_token=demo&fmt=json&filter=General" # Index curl "https://eodhd.com/api/fundamentals/GSPC.INDX?api_token=demo&fmt=json&filter=General" ``` -------------------------------- ### Fetch All Fundamental Data (Not Recommended) Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-fund.md This example shows how to fetch all mutual fund fundamental data without using filters. It is not recommended due to large data size and potential performance issues. ```bash # Bad - gets everything curl "https://eodhd.com/api/fundamentals/SWPPX.US?api_token=demo&fmt=json" ``` -------------------------------- ### Get Fund Performance Metrics using Python Client Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-fund.md Example of using the EODHD Python client to fetch comprehensive performance metrics for a specific fund. ```python # Get performance metrics python eodhd_client.py --endpoint fundamentals --symbol SWPPX.US --filter MutualFund_Data ``` -------------------------------- ### Command Line Client Usage Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/authentication.md Shows how to use a command-line client with an API token set as an environment variable. ```bash # Command line with client export EODHD_API_TOKEN="your_token_here" python eodhd_client.py --endpoint eod --symbol AAPL.US ``` -------------------------------- ### Get Fund Asset Allocation using Python Client Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-fund.md Example of using the EODHD Python client to retrieve asset allocation details for a specific fund. ```python # Get asset allocation python eodhd_client.py --endpoint fundamentals --symbol SWPPX.US --filter MutualFund_Data::Asset_Allocation ``` -------------------------------- ### Get Fund Sector Allocation using Python Client Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-fund.md Example of using the EODHD Python client to fetch sector allocation data for a specific fund. ```python # Get sector allocation python eodhd_client.py --endpoint fundamentals --symbol SWPPX.US --filter MutualFund_Data::Sector_Weights ``` -------------------------------- ### List All Exchanges (Python Client) Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/exchanges-list.md Demonstrates how to use a helper Python client to list all exchanges. Ensure the `eodhd_client.py` script is available in your environment. ```bash python eodhd_client.py --endpoint exchanges-list ``` -------------------------------- ### Get Nasdaq-100 Performance Insights Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/illio-performance-insights.md This example shows how to retrieve performance insights for the Nasdaq-100 index. Remember to replace 'YOUR_API_TOKEN' with your valid EODHD API key. ```APIDOC ## Get Nasdaq-100 Performance Insights ### Description Retrieves detailed performance insights for the Nasdaq-100 index, including various metrics across different time periods. ### Method GET ### Endpoint https://eodhd.com/api/mp/illio/categories/performance/NDX?api_token=YOUR_API_TOKEN ### Parameters #### Query Parameters - **api_token** (string) - Required - Your EODHD API key. ### Response #### Success Response (200) Returns a JSON object containing various performance insight categories, each with data for different time periods. The response includes details on market outperformance, price and total returns, potential breakouts/breakdowns, and average up/down days. #### Response Example { "example": "{\"date\": \"2023-10-26\", \"code\": \"NDX\", \"id\": \"performance\", \"name\": \"Performance\", \"available_time_periods\": [\"1d\", \"1w\", \"1m\", \"3m\", \"6m\", \"1y\", \"YTD\", \"3y\", \"5y\"], \"insights\": [{\"insight_id\": \"PRICE_RETURN\", \"title\": \"Price Return\", \"time_periods\": {\"1y\": {\"highest\": [{\"code\": \"AAPL\", \"name\": \"Apple Inc.\", \"value\": \"+45.2%\"}, ...], \"lowest\": [{\"code\": \"GOOGL\", \"name\": \"Alphabet Inc. Class A\", \"value\": \"-10.1%\"}, ...]}, ...}, ...}, ...]}" ``` -------------------------------- ### Example: Technology Sector Screening Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/stock-screener/SKILL.md This example demonstrates how to screen for stocks within the Technology sector that have a significant market capitalization. It uses the `screener` endpoint with a filter for the 'Technology' sector and a minimum market cap. ```bash python eodhd_client.py --endpoint screener --filters '{"sector":"Technology","market_capitalization.gte":5000000000}' --limit 30 ``` -------------------------------- ### Get Intraday Forex Data (Python) Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/special-exchanges-guide.md Retrieve 5-minute interval intraday data for a Forex pair using the EODHD API. This requires the 'requests' library to be installed. ```python import requests # Get 5-minute EUR/USD data url = "https://eodhd.com/api/intraday/EURUSD.FOREX" params = { "interval": "5m", "api_token": "your_api_token", "fmt": "json" } intraday_data = requests.get(url, params=params).json() print(f"Latest EUR/USD rate: {intraday_data[-1]['close']}") ``` -------------------------------- ### Get S&P 500 Performance Insights Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/illio-performance-insights.md This example demonstrates how to retrieve performance insights for the S&P 500 index. Replace 'YOUR_API_TOKEN' with your actual EODHD API key. ```APIDOC ## Get S&P 500 Performance Insights ### Description Retrieves detailed performance insights for the S&P 500 index, including various metrics across different time periods. ### Method GET ### Endpoint https://eodhd.com/api/mp/illio/categories/performance/SnP500?api_token=YOUR_API_TOKEN ### Parameters #### Query Parameters - **api_token** (string) - Required - Your EODHD API key. ### Response #### Success Response (200) Returns a JSON object containing various performance insight categories, each with data for different time periods. The response includes details on market outperformance, price and total returns, potential breakouts/breakdowns, and average up/down days. #### Response Example { "example": "{\"date\": \"2023-10-26\", \"code\": \"SnP500\", \"id\": \"performance\", \"name\": \"Performance\", \"available_time_periods\": [\"1d\", \"1w\", \"1m\", \"3m\", \"6m\", \"1y\", \"YTD\", \"3y\", \"5y\"], \"insights\": [{\"insight_id\": \"LARGEST_MARKET_OUT_PERFORMANCE\", \"title\": \"Largest Market Out and Under Performers\", \"time_periods\": {\"1m\": {\"highest\": [{\"code\": \"MSFT\", \"name\": \"Microsoft Corp\", \"value\": \"+10.5%\", \"relative_to_index\": \"+3.2%\"}, ...], \"lowest\": [{\"code\": \"NVDA\", \"name\": \"NVIDIA Corp\", \"value\": \"-5.1%\", \"relative_to_index\": \"-12.8%\"}, ...]}, ...}, ...}, ...]}" ``` -------------------------------- ### Execute Live Price Data Request with Python Client Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/live-price-data.md This command shows how to use a hypothetical Python client script to fetch real-time data for a specified symbol. ```bash python eodhd_client.py --endpoint real-time --symbol AAPL.US ``` -------------------------------- ### Python Client: Screener with Filters and Sort Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/stock-screener-data.md Shows how to use the helper Python client to make a screener request with custom filters and sorting by market capitalization, limiting to 20 results. ```python python eodhd_client.py --endpoint screener --filters '[["market_capitalization",">",1000000000],["sector","=","Technology"]]' --sort market_capitalization --limit 20 ``` -------------------------------- ### Linux/Unix wscat Command Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/websockets-realtime.md Connect to the WebSocket API using the 'wscat' command-line tool, which requires Node.js and npm for installation. This example shows how to subscribe to US stock symbols. ```bash wscat -c "wss://ws.eodhistoricaldata.com/ws/us?api_token=demo" # Then type: {"action":"subscribe","symbols":"AAPL,MSFT"} ``` -------------------------------- ### Demo Access for Best and Worst Days Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/illio-market-insights-best-worst.md This command demonstrates accessing the API using a demo token. It's useful for testing the endpoint without a valid API key. ```bash curl "https://eodhd.com/api/mp/illio/chapters/best-and-worst/SnP500?api_token=demo" ``` -------------------------------- ### curl: Get Latest Quarter Financials Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-common-stock.md Retrieve the latest quarterly income statement data using curl. This example demonstrates fetching data for a specific date range. ```bash # Latest quarter financials (NEW) curl "https://eodhd.com/api/fundamentals/AAPL.US?api_token=demo&fmt=json&filter=Financials::Income_Statement::quarterly&from=2024-09-30&to=2024-09-30" ``` -------------------------------- ### Get Market Status with Python Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/tradinghours-market-status.md Fetch real-time market status for a specific exchange using its FinID. Ensure you have the 'requests' library installed. The response is a JSON object containing market details. ```python import requests from datetime import datetime def get_market_status(fin_id, api_token): """Get real-time market status by FinID.""" url = "https://eodhd.com/api/mp/tradinghours/markets/status" params = { "api_token": api_token, "fin_id": fin_id } response = requests.get(url, params=params) response.raise_for_status() return response.json()["data"] # Check NYSE status status_data = get_market_status("us.nyse", "demo") nyse = status_data["US.NYSE"] print(f"Market: {nyse['exchange']}") print(f"Status: {nyse['status']}") print(f"Reason: {nyse['reason'] or 'Normal schedule'}") print(f"Until: {nyse['until']}") print(f"Next Bell: {nyse['next_bell']}") ``` -------------------------------- ### Example: High-Dividend Large Cap Stocks Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/stock-screener/SKILL.md This example demonstrates how to screen for large-cap stocks with a high dividend yield. It uses the `screener` endpoint with specific filters for market capitalization and dividend yield, sorted by market capitalization in descending order. ```bash python eodhd_client.py --endpoint screener --filters '{"market_capitalization.gte":10000000000,"dividend_yield.gte":3}' --sort market_capitalization.desc --limit 20 ``` -------------------------------- ### Example: Undervalued Growth Stocks Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/stock-screener/SKILL.md This example shows how to find undervalued growth stocks. It filters for stocks with a minimum market capitalization and positive earnings per share, and applies a signal for stocks hitting a 200-day low. ```bash python eodhd_client.py --endpoint screener --filters '{"market_capitalization.gte":1000000000,"earnings_share.gte":1}' --signals 200d_new_lo --limit 20 ``` -------------------------------- ### Authenticate API Request with Authorization Header (Python) Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/api-authentication-demo-access.md This Python example demonstrates how to include the API token in the Authorization header when making requests using the 'requests' library. Ensure the 'requests' library is installed. ```python import requests headers = {"Authorization": "Bearer demo"} response = requests.get( "https://eodhd.com/api/eod/AAPL.US", headers=headers, params={"fmt": "json"} ) data = response.json() ``` -------------------------------- ### ETF Filters - Examples Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/general/fundamentals-api.md Examples of `filter` parameters for ETF data, including general information, top holdings, sector allocation, geographic exposure, and performance metrics. ```bash # ETF overview &filter=General # Top 10 holdings &filter=ETF_Data::Top_10_Holdings # Sector allocation &filter=ETF_Data::Sector_Weights # Geographic exposure &filter=ETF_Data::World_Regions # Performance metrics &filter=ETF_Data::Performance ``` -------------------------------- ### Get Upcoming IPOs (Specific Date Range) Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/upcoming-ipos.md Retrieves upcoming IPOs within a specified date range. The `from` and `to` parameters define the start and end dates in YYYY-MM-DD format. JSON format is recommended. ```bash curl "https://eodhd.com/api/calendar/ipos?from=2018-12-02&to=2018-12-06&api_token=demo&fmt=json" ``` -------------------------------- ### Fetch All NASDAQ Stocks (First 500) Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/bulk-fundamentals.md Use this command to retrieve fundamental data for the first 500 stocks listed on the NASDAQ exchange. Replace YOUR_TOKEN with your actual API token. ```bash # All NASDAQ stocks (first 500) curl "https://eodhd.com/api/bulk-fundamentals/NASDAQ?api_token=YOUR_TOKEN&fmt=json" ``` -------------------------------- ### Get Insider Transactions for a Date Range Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/insider-transactions.md Retrieves insider transactions within a specified date range for a given company. Requires company code, start date, end date, and API token. ```bash curl "https://eodhd.com/api/insider-transactions?code=MSFT.US&from=2025-01-01&to=2025-01-31&api_token=demo&fmt=json" ``` -------------------------------- ### Get Market Status Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/tradinghours-market-status.md This Python example demonstrates how to fetch the real-time market status for a given FinID using the EODHD API. It includes error handling for the request and processes the response to extract market details. ```APIDOC ## GET /api/mp/tradinghours/markets/status ### Description Retrieves the real-time trading status for a specified market or exchange. ### Method GET ### Endpoint https://eodhd.com/api/mp/tradinghours/markets/status ### Parameters #### Query Parameters - **api_token** (string) - Required - Your EODHD API token. - **fin_id** (string) - Required - The financial instrument ID of the market (e.g., "us.nyse"). ### Request Example ```python import requests api_token = "YOUR_API_TOKEN" fin_id = "us.nyse" url = f"https://eodhd.com/api/mp/tradinghours/markets/status?api_token={api_token}&fin_id={fin_id}" response = requests.get(url) print(response.json()) ``` ### Response #### Success Response (200) - **data** (object) - An object containing market status details, keyed by FinID. - **exchange** (string) - The name of the exchange. - **status** (string) - The current status of the market (e.g., "Open", "Closed"). - **reason** (string) - The reason for the current status (e.g., "Normal schedule", "Holiday"). - **until** (string) - The ISO 8601 timestamp until which the current status is valid. - **next_bell** (string) - The ISO 8601 timestamp of the next scheduled market bell (open or close). #### Response Example ```json { "data": { "US.NYSE": { "exchange": "NYSE", "status": "Open", "reason": "Normal schedule", "until": "2023-10-27T20:00:00+00:00", "next_bell": "2023-10-27T20:00:00+00:00" } } } ``` ### Error Handling - **401 Unauthorized**: Invalid or missing API key. - **403 Forbidden**: Access denied, subscription required. - **429 Too Many Requests**: Rate limit exceeded. ``` -------------------------------- ### Demo Access for Performance Insights Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/illio-performance-insights.md This example shows how to access performance insights using a demo API token. This is useful for testing the endpoint without a valid API key. ```bash curl "https://eodhd.com/api/mp/illio/categories/performance/SnP500?api_token=demo" ``` -------------------------------- ### Fetch Paginated Bulk Fundamentals Data Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/bulk-fundamentals.md Retrieve a specific range of bulk fundamental data by using the `offset` and `limit` parameters. This example fetches 100 symbols starting from the 500th symbol on the NASDAQ exchange. ```bash # Paginated: 100 symbols starting from position 500 curl "https://eodhd.com/api/bulk-fundamentals/NASDAQ?offset=500&limit=100&api_token=YOUR_TOKEN&fmt=json" ``` -------------------------------- ### Use Helper Client for Exchange-Based Bulk Fundamentals Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/bulk-fundamentals.md Demonstrates using a Python helper client to fetch bulk fundamental data for an entire exchange. This command specifies the `bulk-fundamentals` endpoint and the NASDAQ exchange, limiting results to 100. ```python # Using the helper client (exchange-based) python eodhd_client.py --endpoint bulk-fundamentals --symbol NASDAQ --limit 100 ``` -------------------------------- ### Get Market Details using Python Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/tradinghours-market-details.md A Python function to retrieve detailed market information using the FinID and API token. It handles the API request and returns the data as a JSON object. Ensure the 'requests' library is installed. ```python import requests def get_market_details(fin_id, api_token): """Get detailed information about a market by FinID.""" url = "https://eodhd.com/api/mp/tradinghours/markets/details" params = { "api_token": api_token, "fin_id": fin_id } response = requests.get(url, params=params) response.raise_for_status() return response.json()["data"] # Get NYSE details details = get_market_details("us.nyse", "demo") for market in details: print(f"Exchange: {market['exchange']}") print(f"FinID: {market['fin_id']}") print(f"Timezone: {market['timezone']}") print(f"MIC: {market['mic']}") print(f"Weekend: {market['weekend_definition']}") ``` -------------------------------- ### Using the helper client Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/intraday-historical-data.md This command shows how to use a hypothetical Python helper client (`eodhd_client.py`) to fetch intraday data. It specifies the endpoint, symbol, and interval. ```bash python eodhd_client.py --endpoint intraday --symbol AAPL.US --interval 5m ``` -------------------------------- ### Get 10 ticks for AAPL in a time window Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/marketplace-tick-data.md This example shows how to fetch a specific number of tick data points for a given ticker within a defined time range using cURL. Ensure you replace 'YOUR_API_TOKEN' with your actual API key. ```bash curl "https://eodhd.com/api/mp/unicornbay/tickdata/ticks?s=AAPL&from=1694077200&to=1694080800&limit=10&api_token=YOUR_API_TOKEN" ``` -------------------------------- ### Demo Access for Risk-Return Data Source: https://github.com/eodhistoricaldata/eodhd-claude-skills/blob/main/skills/eodhd-api/references/endpoints/illio-market-insights-risk-return.md This command demonstrates accessing risk-return data using the 'demo' API token. It is useful for testing the API without a valid key. ```bash curl "https://eodhd.com/api/mp/illio/chapters/risk/SnP500?api_token=demo" ```