Skip to main content
createDelegatedAndSelf() separates the trader from the executor.
  • the trader EOA owns USDC and positions
  • a delegate EOA signs each action
  • the delegate EOA submits the transaction and pays gas

When to use it

  • backend systems trading on behalf of users
  • managed execution products
  • integrations where users keep custody but your server handles submission

One-time trader setup

Before this mode can trade, the trader must:

Submit-capable client

Build-only client

In build-only mode, get*Tx() returns an EOA request whose calldata is already wrapped for delegated execution.

Parameters

Plus the shared options (testnet, slippageBps, builder, subgraphUrl, builderApiUrl, alchemyApiKey). See Client Configuration.