获取合约信息

/sapi/v1/public/contract_info

请求类型: GET

是否验签: 否

接口权限: 读取

限频: 其他非行情类的公开接口,比如获取指数信息,限价信息,交割结算、平台持仓信息等,所有用户都是每个IP3秒最多240次请求(所有该IP的非行情类的公开接口请求共享3秒240次的额度)

接口描述: 该接口支持全仓模式和逐仓模式 请求参数 support_margin_mode 在查询同时支持全仓模式和逐仓模式的合约品种时需要使用 all 。使用cross 或 isolated 只能查询到只支持全仓模式或逐仓模式的合约品种,不能查询到两种模式都支持的合约品种。请悉知。 请求参数contract_code支持交割合约代码,格式为BTC-USDT-210625。pair、contract_type和contract_code同时填写,优先取contract_code。 business_type 在查询交割合约数据时为必填参数。且参数值要传:futures 或 all 。 当support_margin_mode为逐仓模式时,contract_type,business_type 不可传交割的类型。当support_margin_mode为全仓模式时,查询出来的都是交割合约的数据。 备注:合约要素接口,可展示更多合约字段信息,推荐您使用。

请求地址

环境
地址

线上环境(aws客户首选)

请求参数

参数
数据类型
是否必填
描述
取值范围
默认值

contract_code

string

false

合约代码

永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...

support_margin_mode

string

false

合约支持的保证金模式

cross:仅支持全仓模式;isolated:仅支持逐仓模式;all:全逐仓都支持

pair

string

false

交易对

BTC-USDT

contract_type

string

false

合约类型

swap(永续)、this_week(当周)、next_week(次周)、quarter(当季)、next_quarter(次季)

business_type

string

false

业务类型,不填默认永续

futures:交割、swap:永续、all:全部

响应参数

参数
数据类型
是否必填
描述
取值范围

status

string

true

请求处理结果

ok , "error"

<data>

object array

true

symbol

string

true

品种代码

BTC,"ETH"...

contract_code

string

true

合约代码

永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...

contract_size

decimal

true

合约面值,即1张合约对应多少标的币种(如BTC-USDT合约则面值单位就是BTC)

0.1,0.01...

price_tick

decimal

true

合约价格最小变动精度

0.001, 0.01...

settlement_date

string

true

合约下次结算时间

时间戳,如"1490759594752"

delivery_time

string

true

交割时间(合约无需交割时,该字段值为空字符串),单位:毫秒

create_date

string

true

合约上市日期

如"20180706"

contract_status

int

true

合约状态

合约状态: 0:已下市、1:上市、2:待上市、3:停牌,4:待开盘、6:交割中、8:交割完成

support_margin_mode

string

true

合约支持的保证金模式

cross:全仓模式;isolated:逐仓模式;all:全逐仓都支持

contract_type

string

true

合约类型

swap(永续)、this_week(当周)、next_week(次周)、quarter(当季)、next_quarter(次季)

pair

string

true

交易对

如:“BTC-USDT”

business_type

string

true

业务类型

futures:交割、swap:永续

delivery_date

string

true

合约交割日期,永续无需交割时该字段为空字符串

如"20180720"

adjust

object array

false

无效字段

price_estimated

object array

false

无效字段

open_type

int

false

无效字段

trade_partition

string

true

参数已废弃

</data>

false

ts

long

true

响应生成时间点,单位:毫秒

请求示例

响应示例

最后更新于