Add or remove margin from a Lighter perpetual position. When decreasing margin, the leverage is automatically updated to the maximum allowed leverage for the market. Requires signature authentication with a timestamp to prevent replay attacks.
Signature of the message api/2/perp/lighter/update-margin-{timestamp} signed with your wallet’s private key. The signature is used to verify your identity and associate with your Lighter account.
Set to true to add margin (increase collateral), false to remove margin (decrease collateral). When set to false, the leverage will be automatically updated to the maximum allowed leverage for the market.
When increase: true: Adds USDC to the position’s margin, increasing the collateral available.
When increase: false: Removes USDC from the position’s margin and automatically updates the leverage to the maximum allowed leverage for the market. This ensures the position remains within acceptable risk parameters after margin reduction.