关于 data912
data912 是用于访问 data912.com 免费市场数据 API 的 skill,面向证券分析场景。它提供定期刷新的阿根廷及美国市场报价、历史 OHLC 数据和日终波动率信息。
主要功能
- 01获取多个资产类别的市场报价
- 02查询历史 OHLC 数据
- 03查看日终波动率指标
- 04将历史数据下载为 CSV
- 05无需身份验证即可使用 API
适用场景
- 01跟踪阿根廷股票、债券和 CEDEARs
- 02查看指定代码的历史价格
- 03检查某个代码的波动率指标
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ gauss314/ skills --skill data912安装后在 Claude Code 中输入/data912确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
references/tickers_bonds.mdtickers_cedears.mdtickers_stocks.mdscripts/download_historical.py详细介绍
Data912 — data912.com API
提供阿根廷市场数据的免费 API。每 20 秒刷新一次,速率限制为 120 req/min。
基础 URL: https://data912.com
实时端点
查询实时价格:
| 端点 | 描述 |
|---|---|
/live/mep | 隐含 USD MEP |
/live/ccl | 隐含 USD CCL |
/live/arg_stocks | 阿根廷股票 |
/live/arg_options | 期权 |
/live/arg_cedears | CEDEARs |
/live/arg_notes | 政府票据 |
/live/arg_corp | 公司债务 |
/live/arg_bonds | 政府债券 |
/live/usa_adrs | 美国 ADR |
/live/usa_stocks | 美国股票 |
实时示例
import requests
r = requests.get("https://data912.com/live/arg_stocks")
df = pd.DataFrame(r.json())
历史端点(OHLC)
在 ./references/tickers_stocks.md、./references/tickers_cedears.md 和 ./references/tickers_bonds.md 中下载代码目录。
| 端点 | 描述 |
|---|---|
/historical/stocks/{ticker} | 阿根廷股票 OHLC |
/historical/cedears/{ticker} | CEDEARs OHLC |
/historical/bonds/{ticker} | 债券 OHLC |
历史示例
ticker = "GGAL"
r = requests.get(f"https://data912.com/historical/stocks/{ticker}")
df = pd.DataFrame(r.json())
df["date"] = pd.to_datetime(df["date"])
df = df.set_index("date").sort_index()
OHLC 字段: date、o(开盘价)、h(最高价)、l(最低价)、c(收盘价)、v(成交量)、dr(日收益率)、sa(年化 sigma)
波动率(EOD)
ticker = "YPF"
r = requests.get(f"https://data912.com/eod/volatilities/{ticker}")
**字段:**短期/中期/长期 IV、短期/中期/长期 HV、IV/HV 比率和百分位数、公允 IV。
下载历史 CSV
使用脚本 ./scripts/download_historical.py:
python ./scripts/download_historical.py --type stocks --tickers GGAL,PAMP,YPFD --output data/
python ./scripts/download_historical.py --type cedears --tickers AAPL,GOOGL,MSFT --output data/
python ./scripts/download_historical.py --type bonds --tickers AL30,GD30,GD35 --output data/
python ./scripts/download_historical.py --type all --tickers GGAL,AL30,AAPL --output data/
速率限制
- 每个端点 120 requests/分钟
- 数据每 20 秒刷新一次(并非真正实时)
- 无需身份验证
评论
支持 Markdown