setLeverage
Adjust contract position leverage for linear or inverse contracts. Set buy and sell leverage values; ensure they match for one-way or cross margin, but they can differ in isolated hedge mode.
Instructions
Set the leverage for a contract position. Supports linear and inverse contracts. In one-way mode or cross margin mode, buyLeverage and sellLeverage must be equal. In isolated margin hedge mode, they can differ.
Agent hint: Use this to change leverage on an existing or new position. Always set both buyLeverage and sellLeverage. For one-way mode and cross margin, they must be identical. Do not set leverage to the current value or it will error.
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": {
"category": "<category>",
"symbol": "<symbol>",
"buyLeverage": "<buyLeverage>",
"sellLeverage": "<sellLeverage>"
},
"name": "setLeverage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| category | Yes | ||
| buyLeverage | Yes | ||
| sellLeverage | Yes |