杠杆交易
交易
安全类型: TRADE
交易下方的接口都需要签名和API-key验证
创建杠杆订单
POST
https://openapi.xxx.com/sapi/v1/margin/order
Demo:
https://github.com/exchange2021/openapidemo/blob/master/src/main/java/com/margin/NewOrder.java
限速规则:10次/s
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | 签名 |
X-CH-APIKEY | string | 您的API-key |
X-CH-TS | integer | 时间戳 |
Request Body
Name | Type | Description |
---|---|---|
symbol | string | 币对名称 E.g. |
volume | number | 订单数量 |
side | string | 订单方向, |
type | string | 订单类型, |
price | number | 订单价格, 对于 |
newClientOrderId | string | 客户端订单标识 |
recvWindow | string | 时间窗口 |
杠杆订单查询
GET
https://openapi.xxx.com/sapi/v1/margin/order
Demo:
https://github.com/exchange2021/openapidemo/blob/master/src/main/java/com/margin/QueryOrder.java
Query Parameters
Name | Type | Description |
---|---|---|
orderId | string | 订单ID |
newClientOrderId | string | 客户端订单标识 |
symbol | string | 币对名称E.g. |
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | 签名 |
X-CH-APIKEY | string | 您的API-key |
X-CH-TS | integer | 时间戳 |
撤销杠杆订单
POST
https://openapi.xxx.com/sapi/v1/margin/cancel
Demo:
https://github.com/exchange2021/openapidemo/blob/master/src/main/java/com/margin/CancelOrder.java
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | 签名 |
X-CH-APIKEY | string | 您的API-key |
X-CH-TS | integer | 时间戳 |
Request Body
Name | Type | Description |
---|---|---|
orderId | string | 订单id |
newClientOrderId | string | 客户端订单标识 |
symbol | string | 币对名称E.g. |
杠杆当前委托
GET
https://openapi.xxx.com/sapi/v1/margin/openOrders
Demo:
https://github.com/exchange2021/openapidemo/blob/master/src/main/java/com/margin/CurrentOpenOrders.java
Query Parameters
Name | Type | Description |
---|---|---|
symbol | string | 币对名称 E.g. |
limit | integer | 默认100; 最大1000 |
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | 签名 |
X-CH-APIKEY | string | 您的API-key |
X-CH-TS | integer | 时间戳 |
杠杆交易记录
GET
https://openapi.xxx.com/sapi/v1/margin/myTrades
Demo:
https://github.com/exchange2021/openapidemo/blob/master/src/main/java/com/margin/Trades.java
Query Parameters
Name | Type | Description |
---|---|---|
symbol | string | 币对名称 E.g. |
limit | integer | 默认100; 最大1000 |
fromId | integer | 从这个tradeId开始检索 |
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | 签名 |
X-CH-APIKEY | string | 您的API-key |
X-CH-TS | integer | 时间戳 |
Last updated