Skip to main content
getMaxCollateral(params) returns what a Max button should fill in, and which limit stopped it there — so a UI can explain why, rather than showing a number that refuses to grow.
The connected trader’s wallet balance and USDC allowance are included automatically. Call it on OstiumSubgraphClient for the protocol-side limits only.

Parameters

Response schema

groupCollateral can come back as "unknown" when the vault balance could not be read. max then reflects only the limits that were checked.
max is point-in-time. The open-interest cap is denominated in USD, so it moves with the price — a value sitting exactly on the boundary can be rejected moments later. Re-run previewOpenTrade() before enabling submit, or apply your own margin.