> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# AIsa Market

> 查询股票、加密货币、SEC 文件、分析师、内幕交易及宏观市场数据。

[在 GitHub 上查看 →](https://github.com/AIsa-team/agent-skills/tree/main/financial/market)

**面向智能体工作流的市场数据。** 通过 AIsa 查询股票、加密货币、SEC 文件、分析师数据、内幕交易活动和宏观背景。

## 安装

```bash npx skills theme={null}
npx skills add AIsa-team/agent-skills --skill market
```

```bash AIsa CLI theme={null}
npm install -g @aisa-one/cli
aisa skills install market
```

安装完成后请启动一个新的智能体会话，以便加载该 Skill。

## 智能体能用它做什么？

> [card] 股票研究
>
> 获取价格、新闻、基本面和分析师观点。

> [card] 加密货币行情
>
> 检索 token 价格、图表、分类和市场动向。

> [card] 财务报表
>
> 分析利润表、资产负债表和现金流数据。

> [card] 宏观叠加
>
> 将利率和市场背景纳入研究。

## 🔥 你可以做什么？

### 跨资产组合

```
"获取 BTC、ETH 价格以及 AAPL、NVDA 股票数据，用于我的投资组合"
```

### 投资研究

```
"全面分析：NVDA 价格趋势、内幕交易、分析师预估、SEC 文件"
```

### 加密货币追踪

```
"获取 BTC、ETH、SOL 的实时价格及 30 天历史图表"
```

### 财报分析

```
"获取 Tesla 财报、分析师预估及价格反应"
```

### 市场筛选

```
"查找 P/E < 15 且营收增长 > 20% 的股票"
```

### 巨鲸追踪

```
"追踪 Apple 的内幕交易并与价格走势做关联分析"
```

## 快速开始

```bash theme={null}
export AISA_API_KEY="your-key"
```

***

## 🏦 传统金融

### 股票价格

```bash theme={null}
# Historical price data (daily)
curl "https://api.aisa.one/apis/v1/financial/prices?ticker=AAPL&interval=day&interval_multiplier=1&start_date=2025-01-01&end_date=2025-12-31" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Weekly price data
curl "https://api.aisa.one/apis/v1/financial/prices?ticker=AAPL&interval=week&interval_multiplier=1&start_date=2025-01-01&end_date=2025-12-31" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Minute-level data (intraday)
curl "https://api.aisa.one/apis/v1/financial/prices?ticker=AAPL&interval=minute&interval_multiplier=5&start_date=2025-01-15&end_date=2025-01-15" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

**参数**：

* `ticker`：股票代码（必填）
* `interval`：`second`、`minute`、`day`、`week`、`month`、`year`（必填）
* `interval_multiplier`：间隔倍数，例如 5 表示 5 分钟 K 线（必填）
* `start_date`：起始日期 YYYY-MM-DD（必填）
* `end_date`：结束日期 YYYY-MM-DD（必填）

### 公司新闻

```bash theme={null}
# Get news by ticker
curl "https://api.aisa.one/apis/v1/financial/news?ticker=AAPL&limit=10" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 财务报表

```bash theme={null}
# All financial statements
curl "https://api.aisa.one/apis/v1/financial/financial_statements/all?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Income statements
curl "https://api.aisa.one/apis/v1/financial/financial_statements/income?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Balance sheets
curl "https://api.aisa.one/apis/v1/financial/financial_statements/balance?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Cash flow statements
curl "https://api.aisa.one/apis/v1/financial/financial_statements/cash?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 财务指标

```bash theme={null}
# Real-time financial metrics snapshot
curl "https://api.aisa.one/apis/v1/financial/financial-metrics/snapshot?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Historical financial metrics
curl "https://api.aisa.one/apis/v1/financial/financial-metrics?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 分析师预估

```bash theme={null}
# Earnings per share estimates
curl "https://api.aisa.one/apis/v1/financial/analyst/eps?ticker=AAPL&period=annual" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 内幕交易

```bash theme={null}
# Get insider trades
curl "https://api.aisa.one/apis/v1/financial/insider/trades?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 机构持仓

```bash theme={null}
# Get institutional ownership
curl "https://api.aisa.one/apis/v1/financial/institutional/ownership?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### SEC 文件

```bash theme={null}
# Get SEC filings
curl "https://api.aisa.one/apis/v1/financial/sec/filings?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Get SEC filing items
curl "https://api.aisa.one/apis/v1/financial/sec/items?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 公司基本信息

```bash theme={null}
# Get company facts by CIK
curl "https://api.aisa.one/apis/v1/financial/company/facts?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 股票筛选器

```bash theme={null}
# Screen for stocks matching criteria
curl -X POST "https://api.aisa.one/apis/v1/financial/search/stock" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filters":{"pe_ratio":{"max":15},"revenue_growth":{"min":0.2}}}'
```

### 利率

```bash theme={null}
# Current interest rates
curl "https://api.aisa.one/apis/v1/financial/interest_rates/snapshot" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Historical interest rates
curl "https://api.aisa.one/apis/v1/financial/interest_rates/historical?bank=fed" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

***

## ₿ 加密货币

### 实时价格快照

```bash theme={null}
# Get current BTC price (use ticker format: SYMBOL-USD)
curl "https://api.aisa.one/apis/v1/financial/crypto/prices/snapshot?ticker=BTC-USD" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Get current ETH price
curl "https://api.aisa.one/apis/v1/financial/crypto/prices/snapshot?ticker=ETH-USD" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Get current SOL price
curl "https://api.aisa.one/apis/v1/financial/crypto/prices/snapshot?ticker=SOL-USD" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Get TRUMP token price
curl "https://api.aisa.one/apis/v1/financial/crypto/prices/snapshot?ticker=TRUMP-USD" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

**注意**：加密货币 ticker 使用 `SYMBOL-USD` 格式（例如 `BTC-USD`、`ETH-USD`）。

### 历史价格数据

```bash theme={null}
# Get BTC historical prices (daily)
curl "https://api.aisa.one/apis/v1/financial/crypto/prices?ticker=BTC-USD&interval=day&interval_multiplier=1&start_date=2025-01-01&end_date=2025-01-31" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Get ETH hourly data
curl "https://api.aisa.one/apis/v1/financial/crypto/prices?ticker=ETH-USD&interval=minute&interval_multiplier=60&start_date=2025-01-15&end_date=2025-01-16" \
  -H "Authorization: Bearer $AISA_API_KEY"
```

### 支持的加密货币

| Ticker | 名称 |
| - | - |
| BTC-USD | Bitcoin |
| ETH-USD | Ethereum |
| SOL-USD | Solana |
| BNB-USD | Binance Coin |
| XRP-USD | Ripple |
| DOGE-USD | Dogecoin |
| ADA-USD | Cardano |
| AVAX-USD | Avalanche |
| DOT-USD | Polkadot |
| MATIC-USD | Polygon |
| LINK-USD | Chainlink |
| UNI-USD | Uniswap |
| ATOM-USD | Cosmos |
| LTC-USD | Litecoin |
| TRUMP-USD | Trump Token |
| ... | 以及更多 |

***

## Python 客户端

```bash theme={null}
# ==================== Stock Data ====================
# Note: start_date and end_date are REQUIRED for prices
python3 scripts/market_client.py stock prices --ticker AAPL --start 2025-01-01 --end 2025-01-31
python3 scripts/market_client.py stock prices --ticker AAPL --start 2025-01-01 --end 2025-01-31 --interval week
python3 scripts/market_client.py stock news --ticker AAPL --count 10

# ==================== Financial Statements ====================
python3 scripts/market_client.py stock statements --ticker AAPL --type all
python3 scripts/market_client.py stock statements --ticker AAPL --type income
python3 scripts/market_client.py stock statements --ticker AAPL --type balance
python3 scripts/market_client.py stock statements --ticker AAPL --type cash

# ==================== Metrics & Analysis ====================
python3 scripts/market_client.py stock metrics --ticker AAPL
python3 scripts/market_client.py stock analyst --ticker AAPL

# ==================== Insider & Institutional ====================
python3 scripts/market_client.py stock insider --ticker AAPL
python3 scripts/market_client.py stock ownership --ticker AAPL

# ==================== SEC Filings ====================
python3 scripts/market_client.py stock filings --ticker AAPL

# ==================== Stock Screener ====================
python3 scripts/market_client.py stock screen --pe-max 15 --growth-min 0.2

# ==================== Interest Rates ====================
python3 scripts/market_client.py stock rates
python3 scripts/market_client.py stock rates --historical

# ==================== Crypto Data ====================
# Note: Use ticker format SYMBOL-USD (or just SYMBOL, auto-converted)
python3 scripts/market_client.py crypto snapshot --ticker BTC-USD
python3 scripts/market_client.py crypto snapshot --ticker ETH  # Auto-converts to ETH-USD
python3 scripts/market_client.py crypto historical --ticker BTC-USD --start 2025-01-01 --end 2025-01-31
python3 scripts/market_client.py crypto portfolio --tickers BTC-USD,ETH-USD,SOL-USD
```

***

## API 端点参考

### 传统金融

| 端点 | 方法 | 说明 |
| - | - | - |
| `/financial/prices` | GET | 历史股票价格（需要 interval 参数） |
| `/financial/news` | GET | 按 ticker 查询公司新闻 |
| `/financial/financial_statements/all` | GET | 全部财务报表 |
| `/financial/financial_statements/income` | GET | 利润表 |
| `/financial/financial_statements/balance` | GET | 资产负债表 |
| `/financial/financial_statements/cash` | GET | 现金流量表 |
| `/financial/financial-metrics/snapshot` | GET | 实时财务指标 |
| `/financial/financial-metrics` | GET | 历史指标 |
| `/financial/analyst/eps` | GET | EPS 预估 |
| `/financial/insider/trades` | GET | 内幕交易 |
| `/financial/institutional/ownership` | GET | 机构持仓 |
| `/financial/sec/filings` | GET | SEC 文件 |
| `/financial/sec/items` | GET | SEC 文件条目 |
| `/financial/company/facts` | GET | 公司基本信息 |
| `/financial/search/stock` | POST | 股票筛选器 |
| `/financial/interest_rates/snapshot` | GET | 当前利率 |
| `/financial/interest_rates/historical` | GET | 历史利率 |

### 加密货币

| 端点 | 方法 | 说明 |
| - | - | - |
| `/financial/crypto/prices/snapshot` | GET | 实时价格快照 |
| `/financial/crypto/prices` | GET | 历史 OHLCV 数据 |

***

## 定价

每次 API 调用按请求计费；当前单次调用价格见 [aisa.one/api](https://aisa.one/api)。

每个响应都包含 `usage.cost` 和 `usage.credits_remaining`。

***

## 完整 API 参考

查看 [API 参考](https://aisa.one/docs/zh/api-reference.md) 获取完整的端点文档。

## 开始使用

1. 在 [aisa.one](https://aisa.one) 注册并在控制台中创建 API key。
2. 在 shell 中设置：`export AISA_API_KEY="your-key"`。
3. 使用[安装](#安装)部分的命令安装 Skill，然后启动一个新的智能体会话。

## 相关

> [card] [MarketPulse](https://aisa.one/docs/zh/agent-skills/marketpulse.md)
>
> 深度股票市场数据和财务报表。

> [card] [Crypto Market Data](https://aisa.one/docs/zh/agent-skills/crypto-market-data.md)
>
> 基于 CoinGecko 的加密货币数据。

> [card] [Financial API 参考](https://aisa.one/docs/zh/api-reference/financial/get_analyst-estimates.md)
>
> 浏览金融端点。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.