1. 基础信息

1.1. 获取币种信息

GET /api/v1/common/queryCurrency

1.1.1. 返回值

Table 1. http response codes
Code Message Datatype

200

Successful

CurrencyVo

1.2. 查询可用的期货-品种

GET /api/v1/future/queryContract

1.2.1. 返回值

Table 2. http response codes
Code Message Datatype

200

Successful operation

QueryContractResponse

1.3. 查询品种保证金梯度

GET /api/v1/future/queryVarietyMargin

1.3.1. 参数

Name Description Required Default Pattern

varietyId

品种Id

X

null

contractId

合约ID

X

null

1.3.2. 返回值

Table 3. http response codes
Code Message Datatype

200

Successfull

VarietyMarginVo

2. 行情数据

2.1. K线

GET /api/v1/futureQuot/queryCandlestick

2.1.1. 参数

Name Description Required Default Pattern

contractId

合约ID

X

null

range

K线类型

X

null

2.1.2. 返回值

Table 4. http response codes
Code Message Datatype

200

Successfull

CandleStickResponse

2.2. 查询所有行情快照

GET /api/v1/futureQuot/queryIndicatorList

2.2.1. 返回值

Table 5. http response codes
Code Message Datatype

200

Successfull

List[Indicator]

2.3. 查询24小时市场统计

GET /api/v1/futureQuot/queryMarketStat

2.3.1. 参数

Name Description Required Default Pattern

currencyId

货币ID

X

null

2.3.2. 返回值

Table 6. http response codes
Code Message Datatype

200

Successfull

MarketStatVoResponse

2.4. 行情快照

GET /api/v1/futureQuot/querySnapshot

2.4.1. 参数

Name Description Required Default Pattern

contractId

合约ID

X

null

2.4.2. 返回值

Table 7. http response codes
Code Message Datatype

200

Successfull

QuotSnapshotResponse

2.5. 逐笔成交

GET /api/v1/futureQuot/queryTickTrade

2.5.1. 参数

Name Description Required Default Pattern

contractId

合约ID

X

null

2.5.2. 返回值

Table 8. http response codes
Code Message Datatype

200

Successfull

TickTradeResponse

3. 仓位信息

3.1. 调整保证金率(逐仓全仓切换)

POST /api/v1/future/position/isolate

3.1.1. Body Parameter

Name Description Required Default Pattern

IsolateReq

IsolateReq

-

3.1.2. 返回值

Table 9. http response codes
Code Message Datatype

200

Successful

IsolateResponse

3.2. 查询用户的所有持仓

GET /api/v1/future/position

3.2.1. 返回值

Table 10. http response codes
Code Message Datatype

200

Successful

PositionResponse

3.3. 调整保证金

POST /api/v1/future/position/transferMargin

3.3.1. Body Parameter

Name Description Required Default Pattern

TransferMarginReq

TransferMarginReq

-

3.3.2. 返回值

Table 11. http response codes
Code Message Datatype

200

Successful

TransferMarginResponse

4. 交易接口

4.1. 批量下单

POST /api/v1/future/orders

4.1.1. Body Parameter

Name Description Required Default Pattern

BatchPlaceOrderVo

BatchPlaceOrderVo

-

4.1.2. 返回值

Table 12. http response codes
Code Message Datatype

200

Successful

BatchPlaceOrderResponse

4.2. 撤消所有未成交的委托单

DELETE /api/v1/future/order/all

4.2.1. 返回值

Table 13. http response codes
Code Message Datatype

200

Successful

CommonResponse

4.3. 撤单

DELETE /api/v1/future/order

4.3.1. 参数

Name Description Required Default Pattern

filter

null

CandleOrderReq

4.3.2. 返回值

Table 14. http response codes
Code Message Datatype

200

Successful

CommonResponse

4.4. 批量撤单

DELETE /api/v1/future/orders

4.4.1. Body Parameter

Name Description Required Default Pattern

BatchCancelOrdersReq

BatchCancelOrdersReq

-

4.4.2. 返回值

Table 15. http response codes
Code Message Datatype

200

Successful

BatchCancelOrdersResponse

4.5. 获取多个订单

GET /api/v1/future/orders

4.5.1. 参数

Name Description Required Default Pattern

filter

X

null

OrderIdsFilter

4.5.2. 返回值

Table 16. http response codes
Code Message Datatype

200

Successful

BatchQueryOrderResponse

4.6. 下单

POST /api/v1/future/order

4.6.1. Body Parameter

Name Description Required Default Pattern

PlaceOrderReq

PlaceOrderReq

-

4.6.2. 返回值

Table 17. http response codes
Code Message Datatype

200

Successful

PlaceOrderResponse

4.7. 用户当前委托查询

GET /api/v1/future/queryActiveOrder

4.7.1. 返回值

Table 18. http response codes
Code Message Datatype

200

Successful

OrdersResponse

4.8. 查询用户在ADL中的排名

GET /api/v1/future/queryForceLower

4.8.1. 返回值

Table 19. http response codes
Code Message Datatype

200

Successful

ForceLowerResponse

4.9. 历史委托查询

GET /api/v1/future/queryHisOrder

4.9.1. 参数

Name Description Required Default Pattern

filter

X

null

ContractPageableFilter

4.9.2. 返回值

Table 20. http response codes
Code Message Datatype

200

Successful

OrderMGDtoResponse

4.10. 获取单个订单

GET /api/v1/future/order

4.10.1. 参数

Name Description Required Default Pattern

filter

X

null

OrderIdFilter

4.10.2. 返回值

Table 21. http response codes
Code Message Datatype

200

Successful operation

OrderDtoResponse

5. 账户相关

5.1. 查询用户保证金率

GET /api/v1/future/queryAccountMarginRate

5.1.1. 返回值

Table 22. http response codes
Code Message Datatype

200

Successful

MarginRateResponse

5.2. 查询用户期货参数

GET /api/v1/future/queryUserFutureParam

5.2.1. 参数

Name Description Required Default Pattern

filter

X

null

ContractFilter

5.2.2. 返回值

Table 23. http response codes
Code Message Datatype

200

Successful

ContractInfoResponse

5.3. 用户资产查询

GET /api/v1/future/margin

5.3.1. 返回值

Table 24. http response codes
Code Message Datatype

200

Successful

AccountBalanceResponse

5.4. 用户资产划转

POST /api/v1/future/transfer

5.4.1. Body Parameter

Name Description Required Default Pattern

TransferReq

TransferReq

-

5.4.2. 返回值

Table 25. http response codes
Code Message Datatype

200

Transfer submitted success

TransferResponse

6. 接口请求与响应数据结构

6.1. AccountBalanceResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

List of AccountBalanceVo

6.2. AccountBalanceVo

Field Name Required Type Description Format

currencyId

Integer

货币ID

int32

totalBalance

String

总资产

available

String

可用资产

frozenForTrade

String

委托保证金

initMargin

String

持仓保证金

closeProfitLoss

String

已实现盈亏

6.3. BatchCancelOrdersReq

Field Name Required Type Description Format

cancels

List of [BatchCancelOrdersReq_cancels_1]

6.4. BatchCancelOrdersReqCancels

Field Name Required Type Description Format

contractId

Integer

合约ID

int32

originalOrderId

Long

订单委托Id

int64

6.5. BatchCancelOrdersReqCancels1

Field Name Required Type Description Format

cancels

List of [BatchCancelOrdersReq_cancels]

6.6. BatchCancelOrdersResponse

Field Name Required Type Description Format

code

Integer

0:成功,非0:失败

int32

6.7. BatchPlaceOrderResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

List of [string]

6.8. BatchPlaceOrderVo

Field Name Required Type Description Format

orders

List of [BatchPlaceOrderVo_orders]

6.9. BatchPlaceOrderVoOrders

Field Name Required Type Description Format

clientOrderId

String

客户端委托ID

contractId

BigDecimal

合约ID

symbol

String

合约名称

orderPrice

String

委托价格

side

BigDecimal

买卖方向,1买-1卖

orderQty

String

委托数量

orderType

BigDecimal

委托类型:1(限价),3(市价)

marginType

BigDecimal

保证金类型,1全仓,2逐仓

initRate

String

保证金率,全仓时0,逐仓时>0

6.10. BatchQueryOrderResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

BatchQueryOrderResponse_data

6.11. BatchQueryOrderResponseData

Field Name Required Type Description Format

orders

List of OrderDto

fails

List of [BatchQueryOrderResponse_data_fails]

6.12. BatchQueryOrderResponseDataFails

Field Name Required Type Description Format

orderId

String

code

Integer

int32

msg

String

6.13. CandleOrderReq

Field Name Required Type Description Format

contractId

Integer

int32

originalOrderId

String

6.14. CandleStickBo

Field Name Required Type Description Format

time

Long

int64

range

String

openPrice

String

closePrice

String

highPrice

String

lowPrice

String

volume

String

6.15. CandleStickResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

CandleStickResponse_data

6.16. CandleStickResponseData

Field Name Required Type Description Format

lines

List of CandleStickBo

6.17. CommonResponse

Field Name Required Type Description Format

code

Integer

成功:0

int32

msg

String

失败时返回失败原因

6.18. ContractFilter

Field Name Required Type Description Format

contractId

Long

int64

6.19. ContractInfoResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

ContractInfoVo

6.20. ContractInfoVo

Field Name Required Type Description Format

contractId

Integer

交易对编号

int32

forbidTrade

Boolean

是否禁止交易

takerFeeRatio

Double

Taker手续费率

double

makerFeeRatio

Double

Maker手续费率

double

maxNumOrders

Integer

最大挂单笔数

int32

posiLimit

Double

持仓限额

double

orderLimit

Double

委托限额

double

6.21. ContractPageableFilter

Field Name Required Type Description Format

contractId

Long

int64

pageSize

Integer

int32

6.22. CurrencyPriceVo

Field Name Required Type Description Format

result

List of [CurrencyPriceVo_result]

6.23. CurrencyVo

Field Name Required Type Description Format

result

List of [CurrencyVo_result]

6.24. CurrencyVoResult

Field Name Required Type Description Format

currencyId

Double

币种ID

double

symbol

String

币种名称

nameCn

String

币种中文名

symbolDesc

String

币种简介

withdrawFlatFee

Double

提现手续费

double

forbidWithdraw

Double

是否允许提币:0允许、1禁止

double

forbidRecharge

Double

是否允许充值:0允许,1禁止

double

enabled

Double

币状态:0启用,1不启用,2删除

double

6.25. ForceLowerResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

List of ForceLowerVo

6.26. ForceLowerVo

Field Name Required Type Description Format

contractId

Integer

合约ID

int32

rank

Integer

范围

int32

6.27. FutureVarietyPo

Field Name Required Type Description Format

varietyId

Integer

品种ID

int32

applId

Integer

应用标识

int32

symbol

String

品种名称

priceTick

Double

最小报价单位

double

lotSize

Double

最小交易量单位

double

takerFeeRatio

Double

Taker手续费率

double

makerFeeRatio

Double

Maker手续费率

double

limitMaxLevel

Integer

限价委托最大成交档位

int32

marketMaxLevel

Integer

市价委托最大成交档位

int32

maxNumOrders

Integer

用户最大挂单笔数

int32

priceLimitRate

Double

涨跌停率

double

commodityId

Integer

商品币种ID

int32

currencyId

Integer

货币币种ID

int32

contractSide

Integer

合约方向,1正向,2反向

int32

contractUnit

Double

合约单位

double

posiLimit

Double

持仓限额

double

orderLimit

Double

委托限额

double

impactMarginNotional

Double

保证金影响额

double

minMaintainRate

Double

最小维持保证金率

double

perpetualPremiumLimit

Double

永续合约溢价指数限制范围

double

perpetualFundingfeeLimit

Double

永续合约资金费率限制范围比例

double

perpetualSettleFrequency

Integer

结算频率(一天几次)

int32

risklessrateGoods

Double

商品货币日利率

double

risklessrateMoney

Double

计价货币日利率

double

onceListTime

Long

一次性上市时间(即只上市一次)

int64

createTime

Long

创建时间

int64

enabled

Integer

是否启用

int32

6.28. Indicator

Field Name Required Type Description Format

mt

BigDecimal

ai

BigDecimal

ci

BigDecimal

sb

String

td

BigDecimal

te

BigDecimal

lp

String

mq

String

nt

BigDecimal

op

String

ph

String

pl

String

tt

String

tv

String

tbv

String

tav

String

pp

String

cp

String

pv

String

pcr

String

pc

String

lui

BigDecimal

cs

BigDecimal

fr

String

pfr

String

pi

String

ppi

String

fb

String

ts

BigDecimal

6.29. IsolateReq

Field Name Required Type Description Format

contractId

Integer

int32

initMarginRate

String

保证金初始值

marginType

Integer

保证金类型

int32

6.30. IsolateResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

String

成功时为空,否则显示失败信息

6.31. MarginRateResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

List of MarginRateVo

6.32. MarginRateVo

保证金率

Field Name Required Type Description Format

contractId

Integer

合约ID

int32

arginRate

String

保证金率

marginType

Integer

保证金类型

int32

6.33. MarketStatVo

Field Name Required Type Description Format

messageType

String

currencyId

BigDecimal

货币ID

total24hTurnover

String

24小时成交额

total7dTurnover

String

7天成交额

total30dTurnover

String

30天成交额

6.34. MarketStatVoResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

MarketStatVo

6.35. MatchVoResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

List of [MatchMGDto]

6.36. OrderDto

Field Name Required Type Description Format

marginType

Integer

保证金类型(1、全仓,2:逐仓)

int32

contractId

Integer

合约ID

int32

side

Integer

买卖方向

int32

orderId

String

委托订单号

clOrderId

String

客户端委托订单号

orderPrice

String

委托价

orderQty

String

委托数量

orderTime

Long

委托时间

orderType

Integer

委托类型:1(限价),3(市价)

orderStatus

Integer

委托状态 0-未申报,1-正在申报,2-已申报未成交,3-部分成交,4-全部成交,5-部分撤单,6-全部撤单,7-撤单中,8-失效,11-缓存高于条件的委托,12-缓存低于条件的委托

int32

matchQty

String

成交数量

matchAmt

String

成交金额

matchTime

Long

成交时间

cancelQty

String

撤单数量

avgPrice

String

成交均价

orderSubType

Integer

委托子类型, 0-默认委托;1-被动委托;2-最近价触发条件委托;3-指数触发 4-标记价触发条件委托

int32

timeInForce

Integer

订单有效时期类型,0-默认值; 1-取消前有效

int32

stopPrice

String

条件单触发价格

String

fcOrderId

String

强平委托号,非空时为强平委托

6.37. OrderDtoResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

OrderDto

6.38. OrderIdFilter

Field Name Required Type Description Format

orderId

String

6.39. OrderIdsFilter

Field Name Required Type Description Format

orderIds

List of [string]

订单委托Id列表

6.40. OrderMGDto

Field Name Required Type Description Format

applId

Integer

应用ID,期货:2

int32

timestamp

Double

委托时间戳

double

userId

Integer

用户ID

int32

contractId

Integer

合约ID

int32

uuid

String

委托编号

side

Integer

买卖方向

int32

price

String

委托价

quantity

String

委托量

orderType

Integer

委托类型,1-限价;3-市价

int32

orderSubType

Integer

委托子类型, 0-默认委托;1-被动委托;2-最近价触发条件委托;3-指数触发 4-标记价触发条件委托

int32

timeInForce

Integer

订单有效时期类型,0-默认值; 1-取消前有效

int32

stopPrice

Double

止损止盈价

double

orderStatus

Integer

委托状态 0-未申报,1-正在申报,2-已申报未成交,3-部分成交,4-全部成交,5-部分撤单,6-全部撤单,7-撤单中,8-失效,11-缓存高于条件的委托,12-缓存低于条件的委托

int32

clOrderId

Long

客户订单编号

int64

filledCurrency

Double

成交金额

double

filledQuantity

Integer

成交量

int32

canceledQuantity

Integer

撤单数量

int32

matchTime

Long

成交时间

int64

marginType

Integer

保证金类型,1全仓,2逐仓

int32

fcOrderId

Long

强平委托号

int64

6.41. OrderMGDtoResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

List of OrderMGDto

6.42. OrdersResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

List of OrderDto

6.43. PlaceOrderReq

Field Name Required Type Description Format

clientOrderId

String

客户端委托ID,如果不传使用uuid

symbol

String

合约名称,与contractId 传一个即可

contractId

Integer

合约ID

int32

side

Integer

买1,卖-1

int32

price

String

委托价格,orderType等于3(市价)时非必填

quantity

String

委托数量

orderType

Integer

委托类型,1(限价),3(市价)

int32

orderSubType

Integer

0(默认值),1(被动委托)

int32

positionEffect

Integer

开平标志,开仓1,平仓2

int32

marginType

Integer

保证金类型,全仓1,逐仓2

int32

marginRate

String

保证金率,全仓时0,逐仓时>0

6.44. PlaceOrderResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

String

成功时返回订单委托Id,否则显示失败信息

6.45. PosiVO

Field Name Required Type Description Format

contractId

Integer

合约ID

int32

posiQty

String

持仓量,大于0多头,小于0空头

openAmt

String

开仓金额

initMargin

String

初始保证金

extraMargin

String

额外保证金

posiStatus

Integer

1正常,2等待强平

int32

marginType

Integer

保证金类型,1全仓2逐仓

int32

closeProfitLoss

String

已实现盈亏

initMarginRate

String

初始保证率

maintainMarginRate

String

维持保证金率

contractUnit

String

合约单位

6.46. PositionResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

List of PosiVO

6.47. QueryContractResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

List of FutureVarietyPo

6.48. QuotSnapshotResponse

Field Name Required Type Description Format

contractId

Long

int64

result

QuotSnapshotResponse_result

6.49. QuotSnapshotResponseResult

Field Name Required Type Description Format

mt

BigDecimal

消息类型:messageType

ai

BigDecimal

应用ID:applId

ci

BigDecimal

合约ID:contractId

sb

String

合约名称:symbol

td

BigDecimal

交易日期:tradeDate

te

BigDecimal

交易时间:time

lp

String

最新价格:lastPrice

mq

String

成交量:matchQty

nt

BigDecimal

成交比数:numTrades

op

String

开盘价:openPrice

ph

String

最高价:priceHigh

pl

String

最低价:priceLow

tt

String

当日成交额:totalTurnover

tv

String

当日成交量:totalVolume

tbv

String

买总委托数:totalBidVol

tav

String

卖总委托数:totalAskVol

pp

String

上一交易日收盘价:prevPrice

cp

String

标记价格,结算价:clearPrice

pv

String

总持仓量:posiVol

pcr

String

当日涨跌幅度:priceChangeRadio

pc

String

当日涨跌:priceChange

lui

BigDecimal

行情序号:lastUpdateId

cs

BigDecimal

交易对状态:contractStatus

fr

String

资金费率:fundingRate

pfr

String

预测资金费率:predictionFundingRate

pi

String

溢价指数:premiumIndex

ppi

String

预溢价指数:predictionPremiumIndex

fb

String

合理基差:fairBasis

ip

String

标的指数价格:indexPrice

bids

List of [string]

买档位

asks

List of [string]

卖档位

6.50. TickTradeBo

Field Name Required Type Description Format

messageType

Integer

int32

contractId

Integer

int32

timestamp

Long

int64

tradePrice

String

6.51. TickTradeResponse

Field Name Required Type Description Format

success

Boolean

data

TickTradeResponse_data

6.52. TickTradeResponseData

Field Name Required Type Description Format

trades

List of TickTradeBo

6.53. TransferMarginReq

Field Name Required Type Description Format

contractId

Long

int64

margin

String

保证金调整额度(大于0 : 增加保证金,小于0 :减少保证金)

6.54. TransferMarginResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

String

成功时为空,否则显示失败信息

6.55. TransferReq

Field Name Required Type Description Format

currencyId

Integer

int32

amount

Double

double

transferType

String

future-to-spot:期货账户到现货划转; spot-to-future:现货账户到期货划转;

6.56. TransferResponse

Field Name Required Type Description Format

code

Integer

int32

msg

String

data

Long

transfer unique id

int64

6.57. VarietyMarginVo

期货-品种保证金信息

Field Name Required Type Description Format

applId

Integer

应用ID

int32

varietyId

Integer

品种ID

int32

contractId

Integer

合约ID

int32

posiQty

String

持仓数量

initRate

String

初始保证金率

maintainRate

String

维持保证金率