行情模块概览
公开、无需鉴权的端点,覆盖 Binance USDⓈ-M 永续合约行情数据,外加少量平台自维护的辅助接口。
调用域名
https://api.pipai.org
两类路由
api.pipai.org 上市场行情端点通过两类路由对外提供,按需选择:
/fapi/v1/*—— Binance 透明镜像。 nginx 把请求原样转发到fapi.binance.com/fapi/v1/*,路径、查询参数、头、签名、响应全部透传。Binance 原生提供的端点尽量走这条路径,开销最小。/<网关路径>—— FastAPI 网关。 用于无法 1 对 1 映射到单次 Binance 调用的场景:经过过滤/排序的辅助端点(/ticker/24hr/active、/launchfutures、/delist),平台自定义形态的封装(/funding/rates*、/long-short/*),以及 Binance 中不在/fapi/v1/*之下的端点(例如/futures/data/openInterestHist、/bapi/...)。
端点一览
| 主题 | 端点 | 路由类型 | 页面 |
|---|---|---|---|
| K 线 | GET /fapi/v1/klines | Binance 镜像 | Klines |
| 24h ticker | GET /fapi/v1/ticker/24hr、GET /ticker/24hr/active | 镜像 + 网关辅助 | Ticker |
| 订单簿深度 | GET /fapi/v1/depth | Binance 镜像 | Depth |
| 交易所信息 | GET /fapi/v1/exchangeInfo | Binance 镜像 | Exchange Info |
| 溢价指数 | GET /fapi/v1/premiumIndex | Binance 镜像 | Premium Index |
| 资金费率 | GET /fapi/v1/fundingRate、GET /funding/rates、GET /funding/rates/{symbol}、GET /funding/rates/{symbol}/history | 镜像 + 网关 | Funding Rate |
| 持仓量 | GET /fapi/v1/openInterest | Binance 镜像 | Open Interest |
| 持仓量历史 | GET /openInterestHist | FastAPI 网关 | Open Interest History |
| 多空比 | GET /topLongShortPositionRatio、GET /topLongShortAccountRatio、GET /long-short/position-ratio/{symbol}、GET /long-short/account-ratio/{symbol} | FastAPI 网关 | Long/Short Ratio |
| 合约上线 | GET /launchfutures | FastAPI 网关 | Launch Futures |
| 合约下架 | GET /delist | FastAPI 网关 | Delist |
| 保险基金 | GET /fapi/v1/insuranceBalance | Binance 镜像 | Insurance Balance |
| 现货资金流 | GET /spot/capital-flow | FastAPI 网关 | Spot Capital Flow |
通用约定
- 所有端点公开。FastAPI 网关路径按每 IP 限流(1000/min);Binance 镜像在此之外另外继承 Binance 自身的 IP 权重限 制。
- Binance 镜像端点的响应与 Binance 原生响应字节级一致 —— 字符串编码的数字、Unix 毫秒时间戳,以及 Binance 自身的字段命名。字段含义参考 Binance USDⓈ-M 永续合约 API 对应端点。
- 查询参数大小写因端点而异(多数 camelCase;
/funding/rates/{symbol}/history网关端点使用 snake_casestart_time/end_time)。各页单独说明。
不提供
- 无 WebSocket 流(后端只有 REST)。
- 无公开成交流接口(
/trades/history存在但是账户维度,不在本站点范围内)。