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

交易

端点

下单 (TRADE)

下单 (TRADE)。

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

下单 (TRADE) › 查询参数

symbol
​string · required

交易对,例如 BTCUSDT。

side
​string · required

买卖方向,BUY 或 SELL。

type
​string · required

订单类型,LIMIT 或 MARKET。

quantity
​string · required

下单数量。

timeInForce
​string

时间有效方式,type = LIMIT 时必填,可选 GTC、IOC、FOK。

price
​string

限价单价格,type = LIMIT 时必填。

newClientOrderId
​string

客户自定义订单号,未传则由系统生成。若当前账号已有相同 newClientOrderId 的委托,接口会返回成功但不会重复创建订单。

下单 (TRADE) › 响应

200

成功响应

symbol
​string

交易对。

orderId
​integer

系统生成的订单 ID。

clientOrderId
​string

客户自定义订单号。

transactTime
​integer

订单被接受的时间戳(毫秒)。


批量下单 (TRADE)

批量下单 (TRADE)。

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

批量下单 (TRADE) › 查询参数

symbol
​string · required

交易对,例如 BTCUSDT。

orderList
​array · required

最多 10 笔订单。

side
​string · required

BUY or SELL.

type
​string · required

LIMIT or MARKET.

quantity
​string · required

Order quantity.

Field
​string

Description

timeInForce
​string

Required when type = LIMIT. Values: GTC, IOC, FOK.

price
​string

Limit price when type = LIMIT.

newClientOrderId
​string

Client-defined order ID.

批量下单 (TRADE) › 响应

200

成功响应

​object[]

每笔订单的执行结果。


撤单 (TRADE)

撤单 (TRADE)。

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

撤单 (TRADE) › 查询参数

orderId
​integer

撤销的订单 ID,当未提供 origClientOrderId 时必填。

origClientOrderId
​string

撤销的客户订单号,当未提供 orderId 时必填。

撤单 (TRADE) › 响应

200

成功响应

orderId
​integer

被撤销的订单 ID。

status
​string

最终订单状态,例如 CANCELED。


按交易对撤销全部订单 (TRADE)

按交易对撤销全部订单 (TRADE)。

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

按交易对撤销全部订单 (TRADE) › 查询参数

symbol
​string · required

需要撤销的交易对。

按交易对撤销全部订单 (TRADE) › 响应

200

成功响应

​object[]
orderId
​integer

被撤销的订单 ID。

status
​string

撤单后的订单状态。


批量撤单 (TRADE)

批量撤单 (TRADE)。

DELETE
/api/v3/order/batch
https://api-spot.weex.com
请求权重
此端点消耗基于 IP 的请求权重。较重的端点会消耗更多您的 IP 速率限制容量。
请在访问限制章节中了解更多信息。
IP 权重5

批量撤单 (TRADE) › 查询参数

orderIds
​array

待撤销的订单 ID 列表,与 origClientOrderIds 至少填写一个。

origClientOrderIds
​array

待撤销的客户端订单号列表,与 orderIds 至少填写一个。

批量撤单 (TRADE) › 响应

200

成功响应

​object[]

每笔撤单的执行结果。


查询订单详情 (USER_DATA)

查询订单详情 (USER_DATA)。

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

查询订单详情 (USER_DATA) › 查询参数

orderId
​integer

订单 ID。当未提供 origClientOrderId 时必填。

origClientOrderId
​string

客户端自定义订单 ID。当未提供 orderId 时必填。

查询订单详情 (USER_DATA) › 响应

200

成功响应

symbol
​string

交易对名称。

orderId
​integer

订单 ID。

clientOrderId
​string

客户端自定义订单 ID。

price
​string

订单价格。

origQty
​string

原始委托数量。

executedQty
​string

已成交数量。

cummulativeQuoteQty
​string

已成交额(按计价币种)。

status
​string

订单状态,例如 NEW、FILLED、CANCELED。

timeInForce
​string

时效策略。

type
​string

订单类型。

side
​string

买卖方向,BUY 或 SELL。

time
​integer

创建时间(毫秒)。

updateTime
​integer

最近更新时间(毫秒)。

isWorking
​boolean

是否仍为活动委托。


查询当前挂单 (USER_DATA)

查询当前挂单 (USER_DATA)。

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

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

symbol
​string

按交易对过滤。不传则返回当前账户全部挂单。

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

200

成功响应

​object[]
symbol
​string

交易对名称。

orderId
​integer

订单 ID。

clientOrderId
​string

客户端自定义订单 ID。

price
​string

订单价格。

origQty
​string

原始委托数量。

executedQty
​string

已成交数量。

cummulativeQuoteQty
​string

已成交额(计价币种)。

status
​string

订单状态,例如 NEW、PARTIALLY_FILLED。

timeInForce
​string

时效策略。

type
​string

订单类型。

side
​string

买卖方向。

time
​integer

创建时间(毫秒)。

updateTime
​integer

最近更新时间(毫秒)。

isWorking
​boolean

是否仍为活动委托。


查询历史订单 (USER_DATA)

查询历史订单 (USER_DATA)。

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

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

symbol
​string · required

交易对。

startTime
​integer

起始时间(毫秒)。

endTime
​integer

结束时间(毫秒),需大于等于 startTime。

limit
​integer

每页条数,默认 100,最大 200。

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

200

成功响应

​object[]
symbol
​string

交易对名称。

orderId
​integer

订单 ID。

clientOrderId
​string

客户端自定义订单 ID。

price
​string

订单价格。

origQty
​string

原始委托数量。

executedQty
​string

已成交数量。

cummulativeQuoteQty
​string

已成交额(按计价币种)。

status
​string

订单状态,例如 NEW、FILLED、CANCELED。

timeInForce
​string

时效策略。

type
​string

订单类型。

side
​string

买卖方向,BUY 或 SELL。

time
​integer

创建时间(毫秒)。

updateTime
​integer

最近更新时间(毫秒)。

isWorking
​boolean

是否仍为活动委托。


查询成交明细 (USER_DATA)

查询成交明细 (USER_DATA)。

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

查询成交明细 (USER_DATA) › 查询参数

symbol
​string · required

交易对。

orderId
​integer

指定订单 ID,筛选该订单的成交记录。

startTime
​integer

起始时间(毫秒)。

endTime
​integer

结束时间(毫秒),需大于等于 startTime。

limit
​integer

条数,默认 100,最大 200。

查询成交明细 (USER_DATA) › 响应

200

成功响应

​object[]
symbol
​string

交易对。

id
​integer

成交 ID。

orderId
​integer

关联的订单 ID。

price
​string

成交价格。

qty
​string

成交数量(基础币)。

quoteQty
​string

成交金额(计价币)。

commission
​string

手续费。

time
​integer

成交时间(毫秒)。

isBuyer
​boolean

是否为买方。