cURL
curl --request POST \ --url https://demo-api.mobula.io/api/2/perp/lighter/update-margin \ --header 'Content-Type: application/json' \ --data ' { "timestamp": 123, "signature": "<string>", "marketId": 123, "usdcAmount": 123, "increase": true } '
{ "success": true, "data": null }
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.
Update margin response