TypeScript SDK

@pontx/twelve-data-forex

Twelve Data 外汇 API 的运营方发布 SDK,覆盖当前 PontxSpec 的全部接口。

v0.1.1Node.js 18 / 20 / 22 CIESM + CommonJSTypeScript declarationsSDK 接口覆盖 111/111

SDK 质量门禁

v0.1.1 对应源码已在 Node.js 18 / 20 / 22 完成 100% UT 通过率与构建产物 E2E。

SDK quality: UT 100%, E2E passed
单元测试
4/4 · 100%
E2E
通过
测试提交
528a39a
验证日期
2026-08-15

安装并调用

SDK 由 Pontx 生成器产生,并在发布前完成类型检查与构建验证。

安装 SDK
pnpm add @pontx/twelve-data-forex
TypeScript 调用
import { createTwelveDataForexClient } from "@pontx/twelve-data-forex";

const client = createTwelveDataForexClient({
  apiKey: process.env.PONTX_TWELVE_DATA_API_KEY!
});
const result = await client.currencies.GetExchangeRate({ symbol: "EUR/USD" });

命令行调用

此 npm 包同时发布面向该 API 的独立 CLI;先用 dry-run 检查参数,再按供应商要求提供自己的凭证。

独立 API CLI
pnpm add --global @pontx/twelve-data-forex

pontx-twelve-data-forex call currencies GetExchangeRate --symbol EUR/USD --dry-run