Skip to main content

Place Order

info
  • Requires Earn permission on the API key.
  • The order is processed asynchronously. A successful response means the order has been accepted, not settled. Use Get Order Info to track the order status.
  • orderLinkId is used for idempotency — resubmitting the same orderLinkId returns an error indicating the order already exists.
  • You must call Get Product Quote first and pass the returned quote values in discountBuyExtra.
  • Only DiscountBuy products are supported. Ultra Discount Buy and Interest Card products are not supported by this API.

HTTP Request

POST/v5/earn/advance/place-order

Request Parameters

ParameterRequiredTypeComments
categorytruestringProduct category. DiscountBuy
productIdtruestringProduct ID
orderTypetruestringFixed value: Stake
amounttruestringInvestment amount in USDT. Precision is determined by orderPrecisionDigital from Get Product Info
cointruestringInvestment coin. USDT
accountTypetruestringDeduction account: FUND or UNIFIED (requires Unified Trading Account to be enabled)
orderLinkIdtruestringUser customised order ID for idempotency. Max 40 characters, alphanumeric and _ only
discountBuyExtratrueObjectDiscount Buy pricing parameters
> initialPricetruestringCurrent index price of the underlying asset at order time. Use currentPrice from Get Product Quote. Max 8 decimal places
> purchasePricetruestringAnchor buy price from Get Product Quote. Max 8 decimal places
> knockoutPricetruestringKnockout price from Get Product Quote. Max 8 decimal places
> knockoutCouponE8truestringAnnualized interest rate in e8 precision from Get Product Quote
> settleTypetruestringSettlement preference when exercised: Base = receive underlying asset (quantity = amount / purchasePrice); Quote = receive USDT (amount = amount / purchasePrice × settlementPrice). Has no effect upon knockout — USDT principal + interest is always returned
> instUidtruestringMarket maker institution ID from Get Product Quote

Response Parameters

ParameterTypeComments
orderIdstringSystem-generated order ID
orderLinkIdstringUser customised order ID echoed back

Request Example

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: 1713600000000
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"
}
}

Response Example

{
"retCode": 0,
"retMsg": "",
"result": {
"orderId": "38f6f5ce-57e2-4d69-b4d3-c39464389ccb",
"orderLinkId": "my-order-001"
},
"retExtInfo": {},
"time": 1776154116919
}