const transaction = await aptos.transaction.build.simple({
sender: account.accountAddress,
data: {
function: `${PACKAGE}::dex_accounts_entry::place_tp_sl_order_for_position`,
typeArguments: [],
functionArguments: [
"0x123...abc", // subaccountAddr
"0x456...def", // marketAddr (PerpMarket object address)
6000000000, // tpTriggerPrice (optional, 6.0 with 9 decimals)
6050000000, // tpLimitPrice (optional, 6.05 with 9 decimals)
500000000, // tpSize (optional, 0.5 with 9 decimals)
5500000000, // slTriggerPrice (optional, 5.5 with 9 decimals)
5450000000, // slLimitPrice (optional, 5.45 with 9 decimals)
500000000, // slSize (optional, 0.5 with 9 decimals)
null, // builderAddress (optional)
null, // builderFees (optional)
],
},
});