alphavantage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Alpha Vantage Skill

Alpha Vantage Skill

Reference documentation for Alpha Vantage API endpoints and functionality.
Alpha Vantage API端点与功能的参考文档。

Setup

配置

  1. Get your free API key at https://www.alphavantage.co/support/#api-key
  2. Set the API key using either method:
    • Add
      ALPHAVANTAGE_API_KEY
      to your
      .env
      file in the running directory
    • Or export
      ALPHAVANTAGE_API_KEY
      as an environment variable
bash
undefined
  1. 前往 https://www.alphavantage.co/support/#api-key 获取免费API密钥
  2. 通过以下任意一种方式设置API密钥:
    • 在运行目录的
      .env
      文件中添加
      ALPHAVANTAGE_API_KEY
    • 或者将
      ALPHAVANTAGE_API_KEY
      导出为环境变量
bash
undefined

Option 1: Add to .env file in running directory

Option 1: Add to .env file in running directory

echo "ALPHAVANTAGE_API_KEY=your_api_key_here" >> .env
echo "ALPHAVANTAGE_API_KEY=your_api_key_here" >> .env

Option 2: Export as environment variable

Option 2: Export as environment variable

export ALPHAVANTAGE_API_KEY=your_api_key_here
undefined
export ALPHAVANTAGE_API_KEY=your_api_key_here
undefined

Usage Guidelines for Agents

Agent使用指南

When working with Alpha Vantage APIs:
  1. Data Format: Prefer CSV over JSON when both formats are available
    • CSV is more compact and easier to parse for tabular data
    • Use
      datatype=csv
      parameter in API requests
  2. Response Handling: Always write API responses to files first
    • Save responses to temporary or data files before processing
    • Read from files with appropriate limits to avoid context burden
    • Example: Use Read tool with
      limit
      parameter to control data size
使用Alpha Vantage API时:
  1. 数据格式:当同时提供CSV和JSON格式时,优先选择CSV
    • CSV格式更紧凑,更易于解析表格数据
    • 在API请求中使用
      datatype=csv
      参数
  2. 响应处理:始终先将API响应写入文件
    • 在处理前将响应保存到临时文件或数据文件中
    • 读取文件时设置适当的限制,避免上下文过载
    • 示例:使用Read工具并配合
      limit
      参数控制数据大小

Structure

结构

  • references/
    - All API documentation organized by category
  • references/index.md
    - Full tree view of all available APIs
  • references/
    - 所有按类别整理的API文档
  • references/index.md
    - 所有可用API的完整树形视图

Source

来源