build_leverage_tx.
Actions
One of:
close— unwind the position fully.increase_leverage— borrow to a higher LTV (providedesiredLtvorleverage).add_collateral— top up (providepayToken+amount; pay in collateral or any token).remove_collateral— withdraw collateral (provideamount).repay— pay down debt (providepayToken+amount; setfull: trueto clear it).borrow— draw more loan token (provideamount).
Input
On-chain position index — from
get_positions.Example
Verify the result with
get_positions after the transaction confirms.