跳到主要内容

获取所有交易品种保证金要求

API说明

此接口允许查询所有交易品种的分层保证金要求,包括初始保证金、维持保证金和最大杠杆率。

注意:保证金要求数据只能通过 RESTful API 获取。

注意事项

  1. 此接口提供公共市场信息,需要认证。

认证

这是一个公共接口,需要认证。有关使用RESTful API的详细信息,请参考简介 > 认证和代码示例 > 合约 > RESTful私有接口。

请求方法

GET

接口地址

/v1/perpum/ladders

频率限制

该接口的调用频率限制为:每个 IP 和用户 ID 每2秒最多请求10次。
此外,该接口还受到全局频率限制的约束。
有关"全局速率限制"和"API限频策略"的详细信息,请参阅“频率限制”部分,跳转

请求参数

此接口不需要任何请求参数。

响应参数

参数类型描述
idString此保证金级别的唯一ID(级别ID)
instrumentString交易品种的基础货币,例如BTC、ETH
ladderInteger级别,例如1、2、3等
lastLadderbooleanTrue:如果这是最终级别,否则为false
marginKeepRateBigDecimal维持保证金率
maxLeverageInteger允许的最大杠杆率
marginStartRateBigDecimal开仓所需的初始保证金率
maxPieceInteger最大合约大小

请求示例

以下Python代码展示了如何获取所有交易品种分层保证金要求。

注意:完整代码示例请参考一般信息 > 认证和代码示例 > 合约 > RESTful私有接口。

params = {}
api_url = "/v1/perpum/ladders"
method = "GET"
response_code, response_data = FuturesRestfulPrivate(params, api_url, method, sec_key, api_key) # function FuturesRestfulPrivate() is defined in section (Introduction > Authentication & Code Snippet > Futures > Restful Public Interface)

注意:完整Java代码示例请参考简介 > 认证和代码示例 > 合约 > RESTful私有接口。

响应示例

上述Python请求的实际响应包含所有交易品种分层保证金要求。为简洁起见,以下仅显示BTC保证金要求:

{
'code': 0,
'data': {
'ladderConfig':
[{'ladderList': [{'id': 276,
'instrument': 'BTC',
'ladder': 11,
'lastLadder': False,
'marginKeepRate': 0.5,
'marginStartRate': 1,
'maxLeverage': 1,
'maxPiece': 16399400},
{'id': 275,
'instrument': 'BTC',
'ladder': 10,
'lastLadder': False,
'marginKeepRate': 0.25,
'marginStartRate': 0.5,
'maxLeverage': 2,
'maxPiece': 9820000},
{'id': 274,
'instrument': 'BTC',
'ladder': 9,
'lastLadder': False,
'marginKeepRate': 0.15,
'marginStartRate': 0.333,
'maxLeverage': 3,
'maxPiece': 6420000},
{'id': 273,
'instrument': 'BTC',
'ladder': 8,
'lastLadder': False,
'marginKeepRate': 0.125,
'marginStartRate': 0.25,
'maxLeverage': 4,
'maxPiece': 4820000},
{'id': 272,
'instrument': 'BTC',
'ladder': 7,
'lastLadder': False,
'marginKeepRate': 0.1,
'marginStartRate': 0.2,
'maxLeverage': 5,
'maxPiece': 3820000},
{'id': 271,
'instrument': 'BTC',
'ladder': 6,
'lastLadder': False,
'marginKeepRate': 0.05,
'marginStartRate': 0.1,
'maxLeverage': 10,
'maxPiece': 750000},
{'id': 270,
'instrument': 'BTC',
'ladder': 5,
'lastLadder': False,
'marginKeepRate': 0.025,
'marginStartRate': 0.05,
'maxLeverage': 20,
'maxPiece': 330000},
{'id': 269,
'instrument': 'BTC',
'ladder': 4,
'lastLadder': False,
'marginKeepRate': 0.01,
'marginStartRate': 0.02,
'maxLeverage': 50,
'maxPiece': 100000},
{'id': 268,
'instrument': 'BTC',
'ladder': 3,
'lastLadder': False,
'marginKeepRate': 0.005,
'marginStartRate': 0.01,
'maxLeverage': 100,
'maxPiece': 60000},
{'id': 267,
'instrument': 'BTC',
'ladder': 2,
'lastLadder': False,
'marginKeepRate': 0.004,
'marginStartRate': 0.008,
'maxLeverage': 125,
'maxPiece': 30000},
{'id': 266,
'instrument': 'BTC',
'ladder': 1,
'lastLadder': True,
'marginKeepRate': 0.003,
'marginStartRate': 0.005,
'maxLeverage': 200,
'maxPiece': 20000}],
'name': 'BTC'},{....}...]
}, 'msg': ''}