欢迎使用全新的 WEEX API 文档。需要查看旧版本?切换到旧版文档
WEEX
WEEX 跟单交易 REST API

跟随者 API

端点

查询当前跟单 (USER_DATA)

查询当前跟单 (USER_DATA)。

GET
/capi/v3/copy/follower/openOrders
https://api-contract.weex.com
请求权重
此端点消耗基于 IP 的请求权重。较重的端点会消耗更多您的 IP 速率限制容量。
请在访问限制章节中了解更多信息。
IP 权重10

查询当前跟单 (USER_DATA) › 查询参数

symbol
​string

按交易对过滤,例如 BTCUSDT。

limit
​integer

分页大小,1-100,默认 100。

page
​integer

页码,从 1 开始,默认 1。

查询当前跟单 (USER_DATA) › 响应

200

成功响应

​object[]
trackingNo
​integer

跟踪订单号。

traderName
​string

带单交易员名称。

openOrderId
​integer

交易系统生成的开仓订单 ID。

closeOrderId
​integer

平仓订单 ID。

traderID
​integer

带单交易员 UID。

symbol
​string

交易对。

openLeverage
​integer

开仓杠杆。

openPriceAvg
​string

平均开仓价格。

openTime
​integer

开仓时间,毫秒时间戳。

openSize
​string

开仓委托数量。

openFee
​string

开仓手续费。

openMarginAmount
​string

开仓保证金。

openFillSize
​string

开仓成交数量。

positionSide
​string

持仓方向:LONG、SHORT 或 BOTH。

status
​string

跟踪订单状态。

tpTriggerPrice
​string

止盈触发价。

slTriggerPrice
​string

止损触发价。

closeAvgPrice
​string

平均平仓价格。

closeSize
​string

平仓数量。

closeTime
​string

平仓时间。

realizedPnl
​string

已实现盈亏。

profitRate
​string

收益率。

netProfit
​string

跟单净收益。

createdTime
​integer

创建时间,毫秒时间戳。

updateTime
​integer

更新时间,毫秒时间戳。


查询历史跟单 (USER_DATA)

查询历史跟单 (USER_DATA)。

GET
/capi/v3/copy/follower/historyOrders
https://api-contract.weex.com
请求权重
此端点消耗基于 IP 的请求权重。较重的端点会消耗更多您的 IP 速率限制容量。
请在访问限制章节中了解更多信息。
IP 权重10

查询历史跟单 (USER_DATA) › 查询参数

symbol
​string

按交易对过滤,例如 BTCUSDT。

limit
​integer

分页大小,1-100,默认 100。

startTime
​integer

起始时间(毫秒),最大查询跨度 90 天。

endTime
​integer

结束时间(毫秒),最大查询跨度 90 天。

nextKeyId
​integer

上一页返回的游标 ID。

nextKeyTime
​integer

上一页返回的游标时间。

查询历史跟单 (USER_DATA) › 响应

200

成功响应

​object[]

历史 tracking order 列表,单项结构同当前跟单查询。

nextFlag
​boolean

是否有下一页。

nextKey
​object | null

下一页游标。


查询我的交易员列表 (USER_DATA)

查询我的交易员列表 (USER_DATA)。

GET
/capi/v3/copy/follower/myTraders
https://api-contract.weex.com
请求权重
此端点消耗基于 IP 的请求权重。较重的端点会消耗更多您的 IP 速率限制容量。
请在访问限制章节中了解更多信息。
IP 权重10

查询我的交易员列表 (USER_DATA) › 查询参数

pageNo
​integer

页码,从 1 开始,默认 1。

pageSize
​integer

分页大小,1-100,默认 100。

查询我的交易员列表 (USER_DATA) › 响应

200

成功响应

​object[]

交易员列表。

nextFlag
​boolean

是否有下一页。

total
​integer

总数量。


查询当前跟单配置 (USER_DATA)

查询当前跟单配置 (USER_DATA)。

GET
/capi/v3/copy/follower/settings
https://api-contract.weex.com
请求权重
此端点消耗基于 IP 的请求权重。较重的端点会消耗更多您的 IP 速率限制容量。
请在访问限制章节中了解更多信息。
IP 权重10

查询当前跟单配置 (USER_DATA) › 查询参数

traderId
​integer · required

带单交易员 UID。

查询当前跟单配置 (USER_DATA) › 响应

200

成功响应

​object[]
copyEnable
​boolean

是否正在跟随该交易员。

symbol
​string | null

交易对。统一配置返回 null。

symbols
​string[]

交易对列表,统一配置时返回。

productType
​string

产品类型,当前为 USDT-FUTURES。

settingMode
​string

配置方式:unified 或 per_symbol。

traceType
​string

跟单类型:percent 或 amount。

traceValue
​string

跟单值。

maxHoldSize
​string

最大跟单持仓数量。

marginType
​string

保证金类型:cross、isolated 或 trader。

marginCoin
​string

保证金币种,当前为 USDT。

leverageType
​string

杠杆类型:fixed、trader 或 specify。

longLeverage
​integer

多仓杠杆。

shortLeverage
​integer

空仓杠杆。

​object[]

自定义杠杆列表。

takeProfitRatio
​string

止盈比例。

stopLossRatio
​string

止损比例。

slippageRatio
​string

滑点比例。


修改跟单配置 (TRADE)

修改跟单配置 (TRADE)。

POST
/capi/v3/copy/follower/settings
https://api-contract.weex.com
请求权重
此端点消耗基于 IP 的请求权重。较重的端点会消耗更多您的 IP 速率限制容量。
请在访问限制章节中了解更多信息。
IP 权重10

修改跟单配置 (TRADE) › 请求体

traderId
​integer · int64 · required

带单交易员 UID。

Example: 123456
settingType
​string · enum · required

配置方式:unified 统一配置,per_symbol 分别配置。

Enum values:
unified
per_symbol
Example: unified
​object

settingType 为 unified 时必填,symbols 用来控制需要跟单的交易对。

Example: {"symbols":["BTCUSDT","ETHUSDT"],"traceType":"amount","traceValue":"100","maxHoldQty":"1000","stopProfitRatio":"0.2","stopLossRatio":"0.1","slippageRatio":"0.001","marginType":"trader","leverageType":"specify","customLeverages":[{"symbol":"BTCUSDT","longLeverage":10,"shortLeverage":10},{"symbol":"ETHUSDT","longLeverage":10,"shortLeverage":10}]}
​object[]

settingType 为 per_symbol 时必填。必须为每个跟单交易对传一条配置。

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
requires: unifiedTraceConfig
requires: symbolTraceConfigs
Properties for Variant 1:
settingType
​enum
Enum values:
unified

修改跟单配置 (TRADE) › 响应

200

成功响应

code
​string
msg
​string
requestTime
​integer

跟单平仓 (TRADE)

跟单平仓 (TRADE)。

POST
/capi/v3/copy/follower/closePos
https://api-contract.weex.com
请求权重
此端点消耗基于 IP 的请求权重。较重的端点会消耗更多您的 IP 速率限制容量。
请在访问限制章节中了解更多信息。
IP 权重50

跟单平仓 (TRADE) › 请求体

symbol
​string · required

交易对。

Example: BTCUSDT
copyNo
​integer · int64 · required

要平仓的跟单订单 ID。

Example: 9000000001

跟单平仓 (TRADE) › 响应

200

成功响应

code
​string
msg
​string
requestTime
​integer

取消跟随 (TRADE)

取消跟随 (TRADE)。

POST
/capi/v3/copy/follower/stopCopy
https://api-contract.weex.com
请求权重
此端点消耗基于 IP 的请求权重。较重的端点会消耗更多您的 IP 速率限制容量。
请在访问限制章节中了解更多信息。
IP 权重10

取消跟随 (TRADE) › 请求体

traderId
​integer · int64 · required

要取消跟随的带单交易员 UID。

Example: 123456

取消跟随 (TRADE) › 响应

200

成功响应

code
​string
msg
​string
requestTime
​integer