modifyPositionMargin
Adjust margin for isolated cryptocurrency trading positions on Aster Finance to manage risk exposure by adding or reducing collateral.
Instructions
Modify isolated position margin.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| positionSide | No | ||
| symbol | Yes | ||
| type | Yes | 1: Add, 2: Reduce |
Implementation Reference
- src/index.ts:669-670 (handler)The handler case for the 'modifyPositionMargin' tool. It invokes a signed POST request to the Aster Futures API endpoint '/fapi/v1/positionMargin' with the provided arguments.case 'modifyPositionMargin': return makeRequest('POST', '/fapi/v1/positionMargin', args, true);
- src/index.ts:422-435 (registration)Registration of the 'modifyPositionMargin' tool in the list of available tools, including its description and input schema for validation.{ name: 'modifyPositionMargin', description: 'Modify isolated position margin.', inputSchema: { type: 'object', properties: { symbol: { type: 'string' }, positionSide: { type: 'string', enum: ['BOTH', 'LONG', 'SHORT'] }, amount: { type: 'number' }, type: { type: 'number', enum: [1, 2], description: '1: Add, 2: Reduce' }, }, required: ['symbol', 'amount', 'type'], }, },
- src/index.ts:425-434 (schema)Input schema defining the parameters for the 'modifyPositionMargin' tool.inputSchema: { type: 'object', properties: { symbol: { type: 'string' }, positionSide: { type: 'string', enum: ['BOTH', 'LONG', 'SHORT'] }, amount: { type: 'number' }, type: { type: 'number', enum: [1, 2], description: '1: Add, 2: Reduce' }, }, required: ['symbol', 'amount', 'type'], },