A trigger order is a conditional order that triggers upon a condition. stop loss and take profit are types of trigger orders
struct TriggerOrder {
address trader;
IAMM amm;
uint256 trigger;
uint256 size;
uint256 quoteLimit;
bool takeProfit;
}
function createTriggerOrder(TriggerOrder calldata order) external;
params
trader
trader addressamm
amm addresstrigger
trigger price (wei)size
size to close (wei)quoteLimit
expected output from the trade (wei) (used for slippage setting, use 0 for any slippage)takeProfit
whether a take profit order. (default: false, for stop loss)