getMaxPositions
Returns the maximum buy and sell sizes available at the requested price.
The query supports both perpetual and Outcome instruments. For Outcome, pass
the market's instrument_id from outcomeMeta as the
string-valued asset. buyPrice / sellPrice are required according to the
side being estimated.
getMaxPositionsCompute the max buy / sell size at a price the user typed into the order ticket.
Instrument external id (numeric string) — the `index` value from the `perpMeta` response.
Order type: `LIMIT` or `MARKET`.
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",
"orderType": "limit",
"reduceOnly": false,
"sellPrice": "0",
"type": "getMaxPositions",
"user": "0x0000000000000000000000000000000000000000"
}'`0` on success.
Maximum tradable-quantity response. Reports the maximum long/short size the user can open at the given price.
User available balance.
Buy price used in the calculation.
Long-side calculation.
Long side closable quantity (`long_position_quantity` minus the already-placed close-long orders).
Current long position quantity.
Margin mode: `cross` or `isolated`.
Position mode: `oneWay` or `hedge`.
Sell price used in the calculation.
Short-side calculation.
Short side closable quantity (`short_position_quantity` minus the already-placed close-short orders).
Current short position quantity.
Trading-pair symbol.
User address.
`false` on error, with `code` set and the text in `message` instead of `data`.
{
"success": true,
"code": 0,
"data": {
"availableToTrade": "",
"buyPrice": "0",
"long": {
"leverage": 0,
"maxQuantity": "0",
"requiredFee": "",
"requiredMargin": "",
"totalCost": ""
},
"longCloseQuantity": "0",
"longPositionQuantity": "0",
"marginMode": "",
"positionMode": "",
"sellPrice": "0",
"short": {
"leverage": 0,
"maxQuantity": "0",
"requiredFee": "",
"requiredMargin": "",
"totalCost": ""
},
"shortCloseQuantity": "0",
"shortPositionQuantity": "0",
"symbol": "",
"user": "0x0000000000000000000000000000000000000000"
}
}