跳到主要内容

资金费率 (Funding Rates)

查询市场资金费率及历史记录。资金费率是永续合约特有的机制,用于使合约价格锚定现货价格。

获取所有市场费率

接口信息

  • Method: GET
  • Path: /api/v1/funding-rates
  • Authentication: 不需要

响应示例

{
"rates": [
{
"symbol": "BTCUSDT",
"funding_rate": "0.0001",
"next_funding_rate": "0.00012",
"next_funding_time": 1704096000000,
"mark_price": "65000.00",
"index_price": "64995.00",
"updated_at": "2024-01-01T00:00:00Z"
},
{
"symbol": "ETHUSDT",
"funding_rate": "0.00015",
"next_funding_rate": "0.00018",
"next_funding_time": 1704096000000,
"mark_price": "3500.00",
"index_price": "3498.00",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}

响应字段说明

字段类型描述
ratesarray资金费率列表

FundingRateInfo 对象字段

字段类型描述
symbolstring交易对
funding_ratestring当前资金费率
next_funding_ratestring预测下次资金费率
next_funding_timenumber下次结算时间(Unix 时间戳,毫秒)
mark_pricestring标记价格
index_pricestring指数价格
updated_atstring更新时间

获取特定市场费率

接口信息

  • Method: GET
  • Path: /api/v1/funding-rates/:symbol
  • Authentication: 不需要

路径参数

参数类型必须描述
symbolstring交易对名称(如 BTCUSDT)

响应示例

{
"symbol": "BTCUSDT",
"funding_rate": "0.0001",
"next_funding_rate": "0.00012",
"next_funding_time": 1704096000000,
"mark_price": "65000.00",
"index_price": "64995.00",
"updated_at": "2024-01-01T00:00:00Z"
}

获取费率历史

接口信息

  • Method: GET
  • Path: /api/v1/funding-rates/:symbol/history
  • Authentication: 不需要

路径参数

参数类型必须描述
symbolstring交易对名称(如 BTCUSDT)

查询参数

参数类型必须描述
limitnumber返回数量(默认 100,最大 1000)

响应示例

{
"rates": [
{
"symbol": "BTCUSDT",
"funding_rate": "0.0001",
"next_funding_rate": "0.00012",
"next_funding_time": 1704096000000,
"mark_price": "65000.00",
"index_price": "64995.00",
"updated_at": "2024-01-01T00:00:00Z"
},
{
"symbol": "BTCUSDT",
"funding_rate": "0.00008",
"next_funding_rate": "0.0001",
"next_funding_time": 1704067200000,
"mark_price": "64800.00",
"index_price": "64795.00",
"updated_at": "2023-12-31T16:00:00Z"
}
]
}

获取用户结算记录

接口信息

  • Method: GET
  • Path: /api/v1/funding/settlements
  • Authentication: 需要身份验证

查询参数

参数类型必须描述
limitnumber返回数量(默认 100)

响应示例

{
"settlements": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"symbol": "BTCUSDT",
"position_id": "550e8400-e29b-41d4-a716-446655440001",
"funding_rate": "0.0001",
"position_size": "6500.00",
"payment": "-0.65",
"settled_at": "2024-01-01T00:00:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"symbol": "ETHUSDT",
"position_id": "550e8400-e29b-41d4-a716-446655440003",
"funding_rate": "0.00015",
"position_size": "3500.00",
"payment": "-0.525",
"settled_at": "2024-01-01T00:00:00Z"
}
]
}

响应字段说明

字段类型描述
settlementsarray结算记录列表

FundingSettlement 对象字段

字段类型描述
idstring结算记录 ID
symbolstring交易对
position_idstring仓位 ID
funding_ratestring资金费率
position_sizestring仓位大小(USD)
paymentstring支付金额(负数表示支付,正数表示收取)
settled_atstring结算时间

资金费率说明

计算公式

资金费用 = 仓位价值 × 资金费率
  • 多头仓位: 当资金费率为正时,多头支付给空头
  • 空头仓位: 当资金费率为负时,空头支付给多头

结算周期

  • 资金费率每 8 小时 结算一次
  • 结算时间:00:00 UTC、08:00 UTC、16:00 UTC
  • 只有在结算时刻持有仓位的用户才需要支付或收取资金费用

费率范围

  • 通常在 -0.05% 到 +0.05% 之间
  • 极端市场情况下可能超出此范围
  • 费率为正表示多头支付空头
  • 费率为负表示空头支付多头

说明

  • 资金费率数据来源于 OKX 交易所
  • 所有金额和费率均为字符串格式以保证精度
  • 历史记录按时间倒序排列(最新的在前)
  • 用户结算记录仅显示实际持仓期间的结算

相关接口