創建訂單
信息
HTTP 請求
POST/v5/earn/advance/place-order請求參數
| 參數 | 必填 | 類型 | 說明 |
|---|---|---|---|
| category | true | string | 產品類別,DiscountBuy |
| productId | true | string | 產品 ID |
| orderType | true | string | 固定值:Stake |
| amount | true | string | 投資金額(USDT),精度由查詢產品資訊中的 orderPrecisionDigital 決定 |
| coin | true | string | 投資幣種,USDT |
| accountType | true | string | 扣款帳戶:FUND(資金帳戶)或 UNIFIED(統一交易帳戶) |
| orderLinkId | true | string | 用戶自定義訂單 ID,用於冪等性控制。最多 40 個字元,僅支援字母、數字及 _ |
| discountBuyExtra | true | Object | 折扣購報價參數 |
| > initialPrice | true | string | 下單時標的資產的當前市場價格,建議使用查詢產品報價中的 currentPrice,最多 8 位小數 |
| > purchasePrice | true | string | 來自查詢產品報價的錨定買入價,最多 8 位小數 |
| > knockoutPrice | true | string | 來自查詢產品報價的敲出價,最多 8 位小數 |
| > knockoutCouponE8 | true | string | 來自查詢產品報價的年化息率(e8 精度) |
| > settleType | true | string | 行權結算方式:Base = 收取標的資產(數量 = amount / purchasePrice);Quote = 收取 USDT(金額 = amount / purchasePrice × settlementPrice)。敲出時此參數無效,無論傳何值均返還 USDT 本金 + 利息 |
| > instUid | true | string | 來自查詢產品報價的做市商機構 ID |
響應參數
| 參數 | 類型 | 說明 |
|---|---|---|
| orderId | string | 系統生成的訂單 ID |
| orderLinkId | string | 用戶自定義訂單 ID(原樣返回) |
請求示例
POST /v5/earn/advance/place-order HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1776154116919
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"category": "DiscountBuy",
"productId": "7037",
"orderType": "Stake",
"amount": "200",
"coin": "USDT",
"accountType": "FUND",
"orderLinkId": "my-order-001",
"discountBuyExtra": {
"initialPrice": "74571.32",
"purchasePrice": "74019",
"knockoutPrice": "76050",
"knockoutCouponE8": "1000000",
"settleType": "Base",
"instUid": "100307526"
}
}
響應示例
{
"retCode": 0,
"retMsg": "",
"result": {
"orderId": "38f6f5ce-57e2-4d69-b4d3-c39464389ccb",
"orderLinkId": "my-order-001"
},
"retExtInfo": {},
"time": 1776154116919
}