Build swap transaction (Base)
build_swap_transactionReturns an UNSIGNED Base transaction (and an ERC-20 approval transaction if needed) that performs the swap with the 1% CoinFactory fee embedded. The taker wallet must sign and broadcast it; CoinFactory never submits transactions. Swaps INTO critical-risk tokens are refused; high-risk tokens require acknowledgeRisk: true after relaying the risk signals to the user. Per-trade cap during beta: $1000. Non-custodial: CoinFactory returns aggregator calldata only and never holds funds or keys; the taker wallet signs and broadcasts. A 1% CoinFactory fee plus aggregator fees and gas apply and are shown in the quote. Trades are irreversible. This is not financial advice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taker | Yes | The wallet address that will sign — must hold the sellToken | |
| buyToken | Yes | ||
| sellToken | Yes | 'ETH', a Base contract address, a symbol, or a CoinGecko id | |
| sellAmount | Yes | Amount of sellToken in human units, e.g. '0.5' | |
| slippageBps | No | Max slippage in bps (default 100, max 500) | |
| acknowledgeRisk | No | Required true when the buy token is rated high risk |