For the complete documentation index, see llms.txt. This page is also available as Markdown.

Agent Wallets

Delegate trading access without transferring account ownership

Agent Wallets let you delegate trading permissions on a Perpetuals account to another wallet without giving up ownership of the account itself. This is useful for bots, automation, or managing permissions across an organization, while keeping a primary wallet as the account's admin.

How it works

Each Perpetuals account is controlled by an admin capability. With Agent Wallets, the admin wallet can grant assistant-level permissions to a second wallet (the agent). Each grant mints a capability object owned by the recipient wallet, and an account can have up to 10 active agent wallets at a time (a protocol parameter). The agent wallet can then execute supported trading actions on behalf of that account. The agent can perform all actions except withdrawing collateral, granting or revoking other agent wallets, and revoking builder code approvals (agents can add approvals, but only the admin can remove them).

Why use Agent Wallets

  • Run automated strategies from a dedicated wallet

  • Separate signing keys for risk management

  • Keep long-term treasury/admin wallet isolated from execution

  • Revoke permissions instantly if needed

Grant an Agent Wallet

Submit a transaction from the account admin wallet specifying:

  • The accountId

  • The recipientAddress — the wallet that should receive agent permissions

After on-chain confirmation, the recipient can trade on behalf of the account with assistant-level permissions.

Endpoint: POST /api/perpetuals/account/transactions/grant-agent-wallet

Revoke an Agent Wallet

Submit a transaction from the account admin wallet specifying:

  • The accountId

  • The accountCapId of the assistant capability to revoke

After confirmation, the revoked wallet immediately loses its delegated permissions.

An agent can also renounce its own permissions at any time by destroying its capability, without involving the admin wallet.

Endpoint: POST /api/perpetuals/account/transactions/revoke-agent-wallet

Running bots? You don't need SUI in your agent wallet. See Gasless Trading (GasPool) to sponsor gas from a central pool.

Last updated