# EVM Transactions

Build unsigned transactions for token swaps.

---

## Get Buy Transaction

Build an unsigned transaction for buying tokens.

**Endpoint:** `/evm/buy/transaction`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `chain` | string | Yes | Chain identifier |
| `token` | string | Yes | Token contract address |
| `swapMode` | string | Yes | `ExactIn` or `ExactOut` |
| `amountIn` | string | Yes | Amount of native currency in wei |
| `wallet` | string | Yes | Wallet address |
| `slippageBps` | number | No | Slippage tolerance in basis points (default: 100 = 1%) |
| `feeBps` | number | No | Fee in basis points (0-175) |
| `feeRecipient` | string | No | Wallet to receive fees |
| `sendRoute` | string | No | `Public`, `Private`, or `Both` for MEV protection |

**Example:**

```typescript
socket.emit("/evm/buy/transaction", {
  chain: "eth",
  token: "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
  swapMode: "ExactIn",
  amountIn: "1000000000000000000",
  wallet: "0x10a64c6d7f12c47b7c66c5b4e20e72bc1fcd5d9e",
  slippageBps: 100,
  sendRoute: "Private",
});
```

---

## Get Sell Transaction

**Endpoint:** `/evm/sell/transaction`

Same parameters as buy transaction. May require a permit for V3 pools.

---

## Get Approve Transaction

Build a transaction to approve token spending.

**Endpoint:** `/evm/approve/transaction`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `chain` | string | Yes | Chain identifier |
| `token` | string | Yes | Token contract address |
| `wallet` | string | Yes | Wallet granting approval |
| `spender` | string | Yes | Contract address to approve |
