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

# Financial Context

> 由 openapi.fcontext.com 提供的认证市场数据接口

Financial Context 提供经过认证、按量计费的只读美股市场数据访问。请使用 `/api/market-data/*` 下受支持的路径获取行情、K 线、公司数据、新闻、日历、选股器和相关分析数据。

## Base URL

```text theme={null}
https://openapi.fcontext.com
```

本参考中的每个接口都以 `https://openapi.fcontext.com/api/market-data` 为根路径；当接口需要 symbol 或 market 筛选条件时，请使用 `.US` 标的或 `US` 市场。

## 认证

使用账户设置中的 Financial Context key：

```bash theme={null}
curl "https://openapi.fcontext.com/api/market-data/quote?symbols=AAPL.US" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"
```

OAuth 客户端可以使用带有市场数据访问权限的 bearer token：

```bash theme={null}
curl "https://openapi.fcontext.com/api/market-data/quote?symbols=AAPL.US" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

## 路径格式

在 `/api/market-data` 前缀之后使用受支持的只读 `GET` 接口。例如，实时行情使用 `https://openapi.fcontext.com/api/market-data/quote`，新闻使用 `https://openapi.fcontext.com/api/market-data/content/news`，公司概况使用 `https://openapi.fcontext.com/api/market-data/fundamental/company`。API 参考会列出当前接口范围。

筛选条件、日期范围、分页和接口特定选项都通过查询字符串传入。

## 限制与错误

所有市场数据请求都会作为 Financial Context 数据请求计量。

| 状态码   | 含义                             |
| ----- | ------------------------------ |
| `400` | 路径或查询参数无效                      |
| `401` | 缺少或使用了无效的 Financial Context 凭证 |
| `402` | 需要套餐或数据请求额度                    |
| `403` | 凭证无权访问市场数据接口                   |
| `405` | 不支持该方法；请使用 `GET`               |

完整接口列表和参数详情请查看 API Reference 区域。
