release_collateral
Withdraw excess collateral from an existing position by specifying positionId, amount, and marketIndex. Requires PRIVATE_KEY in .env for transaction authorization.
Instructions
Withdraw excess collateral from an existing position. Requires PRIVATE_KEY in .env.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"positionId": "<positionId>",
"amount": "<amount>",
"marketIndex": "<marketIndex>"
},
"name": "release_collateral"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to release (raw integer with token decimals) | |
| positionId | Yes | The position ID to release collateral from | |
| marketIndex | Yes | The market index the position belongs to. Use get_positions to find the marketIndex for each position. |