preCheckIsolatedMarginAdjust
Returns one isolated position with the most margin that can be added or removed, and, when ntli is set, a preview of the position after that adjustment. Use it to fill an Adjust Margin dialog before signing updateIsolatedMargin. Nothing is written.
preCheckIsolatedMarginAdjustFill the Adjust Margin dialog: max add / remove and the new liquidation price before updateIsolatedMargin.
Perp instrument id (`index` from `perpMeta`).
Side of the isolated position.
"long""short"Must be `preCheckIsolatedMarginAdjust`.
"preCheckIsolatedMarginAdjust"Position owner.
Amount to preview, in decimal USDC: positive adds margin, negative removes it. Omit to read the limits only.
curl -X POST https://rpc.txflow-testnet.xyz/info \
-H "Content-Type: application/json" \
-H "x-api-version: 2026-08-16" \
-d '{
"type": "preCheckIsolatedMarginAdjust",
"user": "0x06361e568c6375a376e4244b1435b4dd8ea1e247",
"asset": "30",
"side": "long",
"ntli": "1"
}'`0` on success.
`false` on error, with `code` set and the text in `message` instead of `data`.
{
"success": true,
"code": 0,
"data": {
"position": {
"coin": "HBAR-USDC",
"side": "Long",
"szi": "65800",
"entryPrice": "0.08000",
"markPrice": "0.08465",
"margin": "126.76",
"leverage": 50,
"effectiveLeverage": "12.87",
"unrealizedPnl": "306.00",
"liquidationPrice": "0.07891",
"maxIncrease": "1135.01",
"maxDecrease": "21.48",
"preview": {
"adjustAmount": "1.00",
"newMargin": "127.76",
"newLiquidationPrice": "0.07889",
"newEffectiveLeverage": "12.84"
}
}
}
}ntli here is a decimal USDC string: "1" previews adding 1 USDC and "-1" previews removing 1 USDC. updateIsolatedMargin takes the same amount as a 6-decimal integer ("1000000").
Without ntli, the response has no preview. A typical dialog calls once without ntli to show maxIncrease / maxDecrease, then again as the user types an amount.
Next steps
Apply the change with updateIsolatedMargin, then read the position from clearinghouseState.