v2.0 • REST API
API 文档
经济日历REST API - 获取带AI分析的实时经济新闻,专为交易者设计。
概述
Forex Calendar Pro提供从金融来源抓取的实时经济日历数据,并为交易者提供可选的AI驱动分析。API支持多时区、影响力筛选和智能缓存。
基础URL
https://api.forex-calendar.proTelegram通知
Pro用户可以在交易日开始前通过Telegram接收每日经济新闻摘要。
1
找到机器人
在Telegram搜索@ForexCalendarProBot
2
获取ID
向机器人发送/start
3
保存ID
在应用仪表板中输入您的Telegram ID并保存
4
配置
从仪表板:启用Telegram通知并选择您要接收的公告类型
5
享受
每天接收您的每日简报和经济公告列表
认证
使用X-API-Key请求头进行身份验证:
curl -H "X-API-Key: your_api_key" https://api.forex-calendar.pro/api/announcements要获取您的API密钥,请前往仪表板
Dashboard计划和访问级别
| 功能 | Free | Basic | Pro |
|---|---|---|---|
| /api/announcements (NY TZ) | |||
| /api/announcements (All TZ) | |||
| /api/announcements/week | |||
| /api/account/usage | |||
| /api/briefing/daily | |||
| /api/announcements/analyze | |||
| /api/notifications/settings | |||
| Telegram每日摘要 | |||
| AI响应语言 | — | — |
端点
GET
/返回API信息和可用端点。
GET
/api/announcements获取带影响力筛选的今日经济新闻。
GET
/api/announcements/weekFree+获取本周所有新闻。
GET
/api/briefing/dailyPro获取AI生成的交易者每日简报。
GET
/api/announcements/analyzePro获取特定经济新闻的AI分析。
GET
/api/account/usageFree+获取您的账户使用情况和速率限制状态。
GET
/api/notifications/settingsBasic+获取或更新您的通知偏好设置。
GET
/api/health健康检查端点。
GET /api/announcements
获取今日经济新闻。
| 参数 | 类型 | 默认 | 描述 |
|---|---|---|---|
impact | string | high,medium | 按影响级别筛选 |
tz | string | ny | 时区代码(仅Pro) |
{
"scrapeDate": "2025-12-23T10:30:00.000Z",
"announcementsCount": 5,
"timezone": "paris",
"announcements": [
{
"date": "Mon Dec 23",
"time": "8:30am",
"currency": "USD",
"impact": "high",
"announcement": "GDP q/q",
"actual": "2.1%",
"forecast": "2.0%",
"previous": "1.8%"
}
]
}GET /api/announcements/week
获取本周所有新闻。 需要Free计划或更高。
| 参数 | 类型 | 默认 | 描述 |
|---|---|---|---|
impact | string | all | 按影响级别筛选 |
响应格式与以下相同 /api/announcements
{
"scrapeDate": "2025-12-25T15:02:57.863Z",
"announcementsCount": 3,
"announcements": [
{
"date": "Tue Dec 23",
"time": "8:30am",
"currency": "CAD",
"impact": "high",
"announcement": "GDP m/m",
"actual": "-0.3%",
"forecast": "-0.3%",
"previous": "0.2%"
},
{
"date": "Tue Dec 23",
"time": "8:30am",
"currency": "USD",
"impact": "high",
"announcement": "Prelim GDP q/q",
"actual": "4.3%",
"forecast": "3.3%",
"previous": "3.8%"
},
{
"date": "Wed Dec 24",
"time": "8:30am",
"currency": "USD",
"impact": "high",
"announcement": "Unemployment Claims",
"actual": "214K",
"forecast": "224K",
"previous": "224K"
}
]
}GET /api/briefing/daily
获取AI生成的交易者每日简报。 需要Pro计划。
| 时区 | AI响应语言 |
|---|---|
| paris | French |
| frankfurt | German |
| london, ny, dubai, mumbai, singapore, sydney | English |
| tokyo | Japanese |
| hongkong | Chinese |
{
"date": "2025-12-25",
"announcementsCount": 14,
"briefing": {
"summary": "A mixed bag of economic data today, with Japan's Housing Starts y/y surprising with a -8.5% decline...",
"key_announcements": [
"12:00am | JPY | LOW | Housing Starts y/y",
"6:50pm | JPY | LOW | Prelim Industrial Production m/m",
"6:50pm | JPY | LOW | Retail Sales y/y"
],
"market_movers": [
"JPY: Housing Starts y/y (-8.5%) deviated significantly from forecast (0.2%)",
"JPY: Prelim Industrial Production m/m and Retail Sales y/y may also have a significant impact"
],
"risk_windows": [
"6:50pm | JPY | LOW | Prelim Industrial Production m/m",
"6:50pm | JPY | LOW | Retail Sales y/y"
],
"currencies_in_focus": [
"JPY: Surprising economic data and bank holidays will impact JPY pairs",
"CHF: Bank holiday will lead to reduced trading volumes"
],
"recommendation": "Focus on JPY pairs and be cautious of potential market volatility...",
"volatility_forecast": "medium"
},
"announcements": [
{ "date": "Thu Dec 25", "time": "12:00am", "currency": "JPY", "impact": "low", "announcement": "Housing Starts y/y", "actual": "-8.5%", "forecast": "0.2%", "previous": "3.2%" },
{ "date": "Thu Dec 25", "time": "All Day", "currency": "CHF", "impact": "holiday", "announcement": "Bank Holiday", "actual": "", "forecast": "", "previous": "" },
{ "date": "Thu Dec 25", "time": "All Day", "currency": "EUR", "impact": "holiday", "announcement": "French Bank Holiday", "actual": "", "forecast": "", "previous": "" },
"..."
],
"language": "English",
"generatedAt": "2025-12-25T15:05:15.245Z"
}GET /api/announcements/analyze
获取特定经济新闻的AI分析。 需要Pro计划。
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| announcement | string | Yes | 今日新闻标题(/api/announcements返回的'announcement'字段) |
currency | string | No | 按货币筛选 |
tz | string | No | 语言选择的时区 |
{
"announcement": {
"date": "Thu Dec 25",
"time": "All Day",
"currency": "EUR",
"impact": "holiday",
"announcement": "German Bank Holiday",
"actual": "",
"forecast": "",
"previous": ""
},
"analysis": {
"explanation": "A German Bank Holiday may cause reduced market liquidity and trading volumes in the EUR...",
"importance": "This announcement is important for Forex traders as it can impact EUR price movements.",
"scenarios": {
"above_forecast": "If the holiday results in a significant increase in economic activity, the EUR may strengthen...",
"below_forecast": "If the holiday leads to a decrease in economic activity, the EUR may weaken..."
},
"pairs_to_watch": ["EUR/USD", "EUR/GBP", "EUR/JPY", "EUR/CHF"],
"risk_level": "medium",
"trading_tip": "Consider scaling back positions or adjusting stop-loss levels ahead of the holiday..."
},
"language": "English",
"generatedAt": "2025-12-25T15:06:33.662Z"
}GET /api/account/usage
获取您的账户使用情况和速率限制状态。 需要Free计划或更高。
{
"plan": "pro",
"email": "user@example.com",
"language": "en",
"telegramConfigured": true,
"usage": {
"requestsToday": 45,
"requestsLimit": 100,
"resetAt": "2025-12-23T11:00:00.000Z"
},
"createdAt": "2025-01-15T10:00:00.000Z",
"lastUsedAt": "2025-12-23T10:30:00.000Z"
}GET /api/notifications/settings
获取或更新您的通知偏好设置。 需要Basic计划或更高。
{
"telegramEnabled": true,
"telegramId": "123456789",
"impactLevels": ["high", "medium"],
"alertDelay": 15,
"language": "en"
}时区
| 代码 | 城市 | UTC偏移 |
|---|---|---|
| ny | New York (default) | -5 |
| paris | Paris | +1 |
| frankfurt | Frankfurt | +1 |
| london | London | +0 |
| dubai | Dubai | +4 |
| mumbai | Mumbai | +5:30 |
| singapore | Singapore | +8 |
| hongkong | Hong Kong | +8 |
| tokyo | Tokyo | +9 |
| sydney | Sydney | +11 |
影响级别
🔴
high
主要市场波动新闻(NFP、利率、GDP)
🟠
medium
中等影响新闻
🟡
low
对市场影响有限的次要新闻
⚪
holiday
银行假日
缓存
| 缓存 | 持续时间 | 失效 |
|---|---|---|
| 新闻(今日) | 直到午夜 | UTC 5点Cron |
| 新闻(本周) | 直到周一 | 每周一UTC 5点Cron |
| AI简报 | 每日 | 当新结果发布时 |
| AI分析 | 每日 | 每条公告 |
错误响应
速率限制
100 请求/ 15 分钟/IP
使用示例
JavaScript (Fetch)
const response = await fetch('https://api.forex-calendar.pro/api/announcements?impact=high', {
headers: { 'X-API-Key': 'your_api_key' }
});
const data = await response.json();Python
import requests
headers = {'X-API-Key': 'your_api_key'}
response = requests.get(
'https://api.forex-calendar.pro/api/announcements',
params={'impact': 'high,medium'},
headers=headers
)
data = response.json()cURL
curl -H "X-API-Key: your_api_key" \
"https://api.forex-calendar.pro/api/announcements?impact=all"需要帮助?联系我们: wdltradingapi@gmail.com
返回首页