Skip to main content

Set Auto-Invest

API ker permission: Earn
API rate limit: 5 reqs / sec

info
  • Auto-invest can only be enabled on products where allowAutoReinvest is true.
  • The position must be active and not undergoing early redemption processing.

HTTP Request

POST/v5/earn/fixed-term/position/auto-invest

Request Parameters

ParameterRequiredTypeComments
productIdtruestringProduct ID
categorytruestringProduct sub-type: FixedTermSaving, FundPool, FundPoolPremium
positionIdtruestringPosition ID
statustruestringAuto-invest setting: Enable or Disable

Response Parameters

None


Request Example

POST /v5/earn/fixed-term/position/auto-invest HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1741651200000
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"productId": "23",
"category": "FundPool",
"positionId": "19454",
"status": "Enable"
}

Response Example

{
"retCode": 0,
"retMsg": "",
"result": {},
"retExtInfo": {},
"time": 1776075584538
}