跳到主要内容

行情模块概览

公开、无需鉴权的端点,覆盖 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/klinesBinance 镜像Klines
24h tickerGET /fapi/v1/ticker/24hrGET /ticker/24hr/active镜像 + 网关辅助Ticker
订单簿深度GET /fapi/v1/depthBinance 镜像Depth
交易所信息GET /fapi/v1/exchangeInfoBinance 镜像Exchange Info
溢价指数GET /fapi/v1/premiumIndexBinance 镜像Premium Index
资金费率GET /fapi/v1/fundingRateGET /funding/ratesGET /funding/rates/{symbol}GET /funding/rates/{symbol}/history镜像 + 网关Funding Rate
持仓量GET /fapi/v1/openInterestBinance 镜像Open Interest
持仓量历史GET /openInterestHistFastAPI 网关Open Interest History
多空比GET /topLongShortPositionRatioGET /topLongShortAccountRatioGET /long-short/position-ratio/{symbol}GET /long-short/account-ratio/{symbol}FastAPI 网关Long/Short Ratio
合约上线GET /launchfuturesFastAPI 网关Launch Futures
合约下架GET /delistFastAPI 网关Delist
保险基金GET /fapi/v1/insuranceBalanceBinance 镜像Insurance Balance
现货资金流GET /spot/capital-flowFastAPI 网关Spot Capital Flow

通用约定

  • 所有端点公开。FastAPI 网关路径按每 IP 限流(1000/min);Binance 镜像在此之外另外继承 Binance 自身的 IP 权重限制。
  • Binance 镜像端点的响应与 Binance 原生响应字节级一致 —— 字符串编码的数字、Unix 毫秒时间戳,以及 Binance 自身的字段命名。字段含义参考 Binance USDⓈ-M 永续合约 API 对应端点。
  • 查询参数大小写因端点而异(多数 camelCase;/funding/rates/{symbol}/history 网关端点使用 snake_case start_time/end_time)。各页单独说明。

不提供

  • 无 WebSocket 流(后端只有 REST)。
  • 无公开成交流接口(/trades/history 存在但是账户维度,不在本站点范围内)。