Prepares a transaction to buy or sell tokens. Supports multiple trade types:
Automatically uses RobinSwap or UniswapV3 based on token graduation status.
USD Rewards Attribution:
JWT token or API key
Blockchain identifier. Supported chains: solana, solana-devnet, arbitrum, base, base-sepolia, avalanche, op-bnb, bnb, bnb-testnet, ethereum, monad, unichain, unichain-testnet, abstract, polygon, zksync, zksync-testnet
solana, solana-devnet, arbitrum, base, base-sepolia, avalanche, op-bnb, bnb, bnb-testnet, ethereum, monad, unichain, unichain-testnet, abstract, polygon, zksync, zksync-testnet "base-sepolia"
buy, sell User wallet address (optional - if not provided, will use user's Privy wallet from user_wallets table)
"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
Builder attribution information (optional). Includes address and fee in bps.
Token referral address for attribution (optional - defaults to zero address). Used to attribute referral fees to a specific address.
"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
x > 0Token amount to buy (number for regular amounts, string for exact wei values at 100%)
x > 01000
Token amount to sell (number for regular amounts, string for exact wei values at 100%)
x > 01000
x > 0