Configuration for MarginTPSLContract
Parameters for adding the conditional order
A function that takes a Transaction object
The key to identify the margin manager
A function that takes a Transaction object
The key to identify the margin manager
The ID of the conditional order to cancel
A function that takes a Transaction object
The key to identify the pool
The ID of the margin manager
The ID of the conditional order
A function that takes a Transaction object
The key to identify the pool
The ID of the margin manager
A function that takes a Transaction object
The address of the margin manager
The key to identify the pool (e.g., 'SUI_USDC')
Maximum number of orders to execute in this call
A function that takes a Transaction object
The address of the margin manager
The key to identify the pool (e.g., 'SUI_USDC')
Maximum number of orders to execute in this call
A function that takes a Transaction object
Execute conditional orders, deleveraging on each market-type
fill. Permissionless, with the same trigger and cancellation handling as
executeConditionalOrders, but the market proceeds are repaid into
the loan before the risk check, and the gate is the net post-repay
risk_ratio being at least the pre-fill ratio.
This is what lets a stop-loss fire in the liquidation..min_borrow danger
band: a swap alone only lowers the oracle-valued ratio (so the v2
borrow-floor gate rejects it), while repaying actually improves it. If a
single triggered fill would worsen net solvency the whole txn aborts — no
partial-state landing.
The key to identify the pool
The ID of the margin manager
A function that takes a Transaction object
The key to identify the pool
The ID of the margin manager
A function that takes a Transaction object
The key to identify the pool
Whether to trigger when price is below trigger price
The price at which to trigger the order
A function that takes a Transaction object
The key to identify the pool
Parameters for the pending limit order
A function that takes a Transaction object
The key to identify the pool
Parameters for the pending market order
A function that takes a Transaction object
MarginTPSLContract class for managing Take Profit / Stop Loss operations.