下单

下单

post

说明:交易桥下单

group=tradeApi
version=0.0.1
bizType=tradeapi.admin.OrderAdminApiService.addDirectOrder

binance交易所特殊说明: 1、下单最小要求5USDT 2、下单产品交易规则:https://www.binance.com/zh-CN/trade-rule 3、限价单仅支持按量下单

OKX交易所特殊说明 1、下单接口timeInForce入参无效 2、下单接口仅返回clientOrderId和status字段 3、限价单仅支持按量下单

Header parameters
companyIdstringRequired

公司ID

Example: {{company}}
tracestringRequired

全局链路唯一标志

Example: {{mock_trace}}
apiKeystringRequired

apiKey

Example: {{apikey}}
recvWindowstringOptional

时间窗口

Example: 5000
signaturestringRequired

签名

Example: {{sign}}
langstringOptional

语言

Example: zh-CN
versionstringRequired

接口版本

Example: 0.0.1
groupstringRequiredExample: tradeApi
Body
tradeTypeinteger · longRequired

玩法类型。10-交易桥;

customerIdinteger · longOptional

客户Id

customerNostringRequired

客户编码

customerGroupIdinteger · longRequired

客户组ID:1=默认客户组;

exchangeIdstringRequired

平台标识符。binance-币安;okx-欧易

accountNamestringRequired

平台账号别名

symbolIdinteger · longRequired

产品Id

bizTypeinteger · int32Required

业务类型。1-市价;2-限价

directioninteger · int32Required

订单买卖方向,1-买;2-卖;

pricestringOptional

限价单时必填。限价价格,市价单此字段无效

numstringOptional

下单数量。与amount至少填一个。均填以num为准。

amountstringOptional

下单总额。与num至少填一个。均填以num为准。

timeInForcestringOptional

订单有效方式。GTC-直到全部成交或撤销;IOC-即时尽量多的成交,无法成交部分撤销;FOK-全部成交或全部撤销;(市价单此字段无效,限价默认GTC)

clientOrderIdstringOptional

客户自定义的唯一订单ID。 如果不填,则自动生成。(需满足此正则表达式规则:^[a-zA-Z0-9]{1,20}$)

requestTimeinteger · longOptional

请求时间。13位时间戳,如未填写,默认为系统接收到订单时间

Responses
200Success
application/json
post
POST /global/tradeapi.admin.OrderAdminApiService.addDirectOrder HTTP/1.1
Host: 
companyId: text
trace: text
apiKey: text
signature: text
version: text
group: text
Content-Type: application/json
Accept: */*
Content-Length: 254

{
  "tradeType": 1,
  "customerId": 1,
  "customerNo": "text",
  "customerGroupId": 1,
  "exchangeId": "text",
  "accountName": "text",
  "symbolId": 1,
  "bizType": 1,
  "direction": 1,
  "price": "text",
  "num": "text",
  "amount": "text",
  "timeInForce": "text",
  "clientOrderId": "text",
  "requestTime": 1
}
200Success
{
  "bizCode": "text",
  "code": "text",
  "msg": "text",
  "tm": 1,
  "trace": "text",
  "msgParams": "text",
  "ok": true,
  "fail": true,
  "data": {
    "exchangeId": "text",
    "orderId": "text",
    "clientOrderId": "text",
    "status": "text",
    "timeInForce": "text",
    "executeNum": "text",
    "executeAmount": "text",
    "executeList": [
      {
        "executeNum": "text",
        "executePrice": "text",
        "commission": "text",
        "commissionCurrency": "text",
        "tradeId": "text"
      }
    ]
  }
}

Last updated