創建訂單
信息
HTTP 請求
POST /v5/order/advance/place-order
請求參數
| 參數 | 必填 | 類型 | 說明 |
|---|---|---|---|
| category | true | string | 產品類型,例如 DualAssets |
| productId | true | string | 產品 ID |
| orderType | true | string | 訂單類型:Stake (申購) |
| amount | true | string | 訂單數量(字串格式的數字) |
| accountType | true | string | 帳戶類型:FUND (資金帳戶), UNIFIED (統一帳戶) |
| coin | true | string | 幣種名稱 |
| orderLinkId | true | string | 用戶自定義訂單 ID(最多 36 個字元),用於冪等性控制 |
| dualAssetsExtra | true | Object | 雙幣投資專屬參數 |
| > orderDirection | true | string | 方向:BuyLow (低買), SellHigh (高賣) |
| > selectPrice | true | string | 用戶選擇的目標價格(掛鉤價)。必須與有效報價相匹配 |
| > apyE8 | true | int64 | 預期年化收益率(e8 精度)。如果確認的 APY 低於此數值,訂單將會失敗 |
| interestCard | false | Object | 加息券 (Interest bonus card) |
| > awardId | true | int64 | 加息券唯一 ID |
| > specCode | true | string | 加息券的特殊代碼 (Spec_code) |
響應參數
| 參數 | 類型 | 說明 |
|---|---|---|
| orderId | string | 系統生成的訂單 ID |
| orderLinkId | string | 用戶自定義訂單 ID |
請求示例
- HTTP
POST /v5/order/advance/place-order HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1672211928338
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
{
"category": "DualAssets",
"productId": 36320,
"orderType": "Stake",
"amount": "20",
"accountType": "UNIFIED",
"coin": "USDT",
"orderLinkId": "54b3589b-da55-4b17-acdd-aa75912c9eb",
"dualAssetsExtra": {
"orderDirection": "BuyLow",
"selectPrice": "2325",
"apyE8": 857565000
}
}
響應示例
{
"retCode": 0,
"retMsg": "",
"result": {
"orderId": "97f198e9-b14b-4703-b4a6-a4aa06ba1499",
"orderLinkId": "54b3589b-da55-4b17-acdd-aa75912c9eb"
},
"retExtInfo": {},
"time": 1773815412459
}