Documentation Index
Fetch the complete documentation index at: https://docs.decibel.trade/llms.txt
Use this file to discover all available pages before exploring further.
Function:
{package}::dex_accounts_entry::delegate_trading_to_for_subaccount
ABI Object:
const functionAbi: MoveFunction = {
name: "delegate_trading_to_for_subaccount",
visibility: "friend",
is_entry: true,
is_view: false,
generic_type_params: [],
params: ["&signer", "address", "address", "0x1::option::Option<u64>"],
return: [],
};
Parameters:
signer - The account signer
subaccount_address - The Trading Account address
account_to_delegate_to - Address to delegate trading to
expiration_timestamp_secs - Optional expiration timestamp `<Option<u64>>`
Example:
const transaction = await aptos.transaction.build.simple({
sender: account.accountAddress,
data: {
function: `${PACKAGE}::dex_accounts_entry::delegate_trading_to_for_subaccount`,
typeArguments: [],
functionArguments: [
"0x123...abc", // subaccountAddress
"0x789...xyz", // delegateToAddress
1735689600, // expirationTimestamp (optional, Unix timestamp in seconds)
],
},
});