Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

getLiquidationPrices

POST/infotype getLiquidationPrices

Preview the estimated liquidation price before the user submits an order.

Request body
assetstringrequired

Instrument external id as a numeric string. Perpetual ids come from `perpMeta`; Outcome ids come from `outcomeMeta` (`instrument_id`).

buyQuantitystringrequired

Buy quantity.

orderTypestringrequired
sellQuantitystringrequired

Sell quantity.

typestringrequired
userstringrequired
buyPricestringnullableoptional
reduceOnlybooleannullableoptional
sellPricestringnullableoptional
Request example
curl -X POST https://rpc.txflow-testnet.xyz/info \
  -H "Content-Type: application/json" \
  -H "x-api-version: 2026-08-16" \
  -d '{
  "asset": "4",
  "buyPrice": "0",
  "buyQuantity": "0",
  "orderType": "limit",
  "reduceOnly": false,
  "sellPrice": "0",
  "sellQuantity": "0",
  "type": "getLiquidationPrices",
  "user": "0x0000000000000000000000000000000000000000"
}'
Try it
POST https://rpc.txflow-testnet.xyz/info
Response · LiquidationPricesResponse 200
codeinteger

`0` on success.

dataLiquidationPricesResponse

Estimated liquidation-price response. Computes the estimated liquidation price for the requested buy/sell quantities.

buyPricestring

Buy price used in the calculation.

longLiquidationPriceCalculation

Long-side calculation.

marginModestring

Margin mode: `cross` or `isolated`.

positionModestring

Position mode: `oneWay` or `hedge`.

sellPricestring

Sell price used in the calculation.

shortLiquidationPriceCalculation

Short-side calculation.

symbolstring

Trading-pair symbol.

userstring

User address.

successboolean

`false` on error, with `code` set and the text in `message` instead of `data`.

Response example
{
  "success": true,
  "code": 0,
  "data": {
    "buyPrice": "0",
    "long": {
      "error": "",
      "leverage": 0,
      "liquidationPrice": "0",
      "maxQuantity": "0",
      "quantity": "0",
      "requiredFee": "",
      "requiredMargin": "",
      "totalCost": ""
    },
    "marginMode": "",
    "positionMode": "",
    "sellPrice": "0",
    "short": {
      "error": "",
      "leverage": 0,
      "liquidationPrice": "0",
      "maxQuantity": "0",
      "quantity": "0",
      "requiredFee": "",
      "requiredMargin": "",
      "totalCost": ""
    },
    "symbol": "",
    "user": "0x0000000000000000000000000000000000000000"
  }
}