leverage_long
Open a lending-based leveraged long by looping deposit -> borrow stable -> buy more -> redeposit.
Returns an ORDERED STEP PLAN of UNSIGNED base64 txs, effective leverage, loop count, health factor, and a position_id. amount in base units. The levered token is authenticity-verified first; set allow_unverified=true to lever an unverified mint at your own risk. Past the daily free tier an x402 payment_header is required.
jurisdiction: leverage is geo-gated too --
see short_open.
idempotency_key (optional): a client-generated UUID.
Retrying with the same key + same args replays the original result instead
of re-opening the leveraged position.
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": {
"token": "<token>",
"amount": "<amount>",
"target_leverage": "<target_leverage>",
"wallet_address": "<wallet_address>"
},
"name": "leverage_long"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | No | ||
| token | Yes | ||
| amount | Yes | ||
| market | No | ||
| protocol | No | kamino | |
| caller_id | No | ||
| jurisdiction | No | ||
| pay_in_crank | No | ||
| slippage_bps | No | ||
| stable_token | No | ||
| payment_header | No | ||
| wallet_address | Yes | ||
| idempotency_key | No | ||
| target_leverage | Yes | ||
| allow_unverified | No | ||
| marginfi_account | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||