EVM: Buy a token
Full flow to buy a token with native ETH on Base.1. Get a quote
2. Sign transactions
3. Execute
EVM: Sell tokens
Sell 50% of your token balance back to ETH:EVM: Check balance
EVM: Token info before trading
Check taxes and liquidity before trading:Best practices
- Always sign
approveif present — it’s required for the trade to succeed - Always sign
extraif present — permit2 or fee transactions for specific tokens - Use
simulation: true— catches reverts before broadcasting. Whensimulation=trueandtraderis provided, balance and allowance preflight checks run before quoting. Whensimulation=false(default), these checks are skipped — useful for quoting sell routes before the trader holds the token. - Slippage: 500 bps (5%) for most tokens, 1000+ for low-liquidity.
slippage=10000activates fast mode — skips gas estimation, price impact, and USD valuation. Response contains onlypathandtransaction(nostats). - MEV protection: enable
mev: trueon ETH and BSC for large trades - Quotes expire in 30 seconds — sign and execute immediately
- Check
result.success— HTTP 200 doesn’t mean the trade succeeded
Solana
Same flow, different signing. Uses@solana/web3.js and base64-encoded transactions.
- No
approveorextratransactions - Transactions are base64-encoded
VersionedTransaction, not hex - Use lamports (1 SOL = 10^9 lamports)
- Higher slippage recommended for pump.fun tokens (1000+ bps)

.png?fit=max&auto=format&n=vFD3JaMmh-jP1DJL&q=85&s=eb89fc3bbcbf83018c6491d27144e343)