Skip to main content

Reinvest

info
  • Need authentication. Up to 5 requests per second per UID. Requires Earn permission on the API key.
  • Reinvests the claimable yield of the specified position back into the pool.
  • Orders are processed asynchronously. A successful response means the order was accepted. Use Get Order Info to track order status.
  • orderLinkId provides idempotency — submitting the same orderLinkId within 30 minutes returns the same orderId without creating a duplicate order.
  • Only one pending order is allowed per position at a time.

HTTP Request

POST/v5/earn/liquidity-mining/reinvest

Request Parameters

ParameterRequiredTypeComments
productIdtruestringProduct ID
orderLinkIdtruestringUser-customised order ID (max 36 characters). Used for idempotency
positionIdtruestringPosition ID to reinvest. Obtain from Get Position Info

Response Parameters

ParameterTypeComments
orderIdstringSystem-generated order ID
orderLinkIdstringUser-customised order ID

Request Example

POST /v5/earn/liquidity-mining/reinvest HTTP/1.1
Host: api-testnet.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": "5",
"orderLinkId": "lm-reinvest-01",
"positionId": "1498"
}

Response Example

{
"retCode": 0,
"retMsg": "",
"result": {
"orderId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"orderLinkId": "lm-reinvest-01"
},
"retExtInfo": {},
"time": 1741651200000
}