set_leverage
Sets a coin's leverage on the live account, capped by the risk profile, to adjust an open position or prepare a market before trading. Confirm changes with get_positions.
Instructions
LIVE MONEY: acts on the real account. Set a coin's leverage, a whole number from 1 up to the coin's max (default 5 when omitted). It is capped by the risk profile's max_leverage and refused above it (raise the cap with update_config first). An open position keeps its own margin type (cross or isolated); a venue refusal, such as leverage too low for the margin in use, comes back as an error. place_bracket already sets leverage when given one, so call this alone only to change an open position or prepare a coin. Confirm with get_positions. Needs a trading key. Returns {ok, coin, leverage} or the 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": {
"coin": "<coin>"
},
"name": "set_leverage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Coin: a main-dex perp by name (BTC, ETH) or a HIP-3 perp as dex:SYMBOL (xyz:GOLD, xyz:BRENTOIL). | |
| leverage | No | Whole number from 1 to the coin's max, at most the profile cap (default 5 when omitted). |