> ## Documentation Index
> Fetch the complete documentation index at: https://docs.socket.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Bungee v1 API → Socket v3 API

> Migrate your integration from the Bungee API to the Socket Swap V3 API.

```txt LLM prompt — copy and paste into your coding agent theme={null}
Migrate my Bungee API integration to the Socket Swap V3 API.
Use https://docs.socket.tech/llms-full.txt for full context and follow https://docs.socket.tech/integrate/migration-guide.
```

This guide covers the key differences between the legacy Bungee API (`/api/v1/bungee/quote`) and the Socket Swap V3 API (`/v3/swap/quote`), and what you need to change in your integration.

## Why migrate?

The Socket Swap V3 API (`/v3/swap/quote`) is the unified endpoint for Socket routes. It provides:

* A cleaner, normalized route model for same-chain swaps and cross-chain bridges
* Simpler execution flow — just get a quote, approve (if needed), and send `txData.object`
* No `submit` step — transactions are submitted directly on-chain, not via a Bungee submit endpoint
* Status tracking via `/v3/swap/status` using the `quoteId`

## Endpoint changes

| Feature                | Bungee API                   | Socket Swap V3 API                                        |
| ---------------------- | ---------------------------- | --------------------------------------------------------- |
| Quote endpoint         | `GET /api/v1/bungee/quote`   | `GET /v3/swap/quote`                                      |
| Status endpoint        | `GET /api/v1/bungee/status`  | `GET /v3/swap/status`                                     |
| Submit endpoint        | `POST /api/v1/bungee/submit` | **Not needed** — submit `txData.object` directly on-chain |
| Route param            | N/A                          | `userOps=tx` (required)                                   |
| Transaction identifier | `requestHash`                | `quoteId`                                                 |

## Response shape changes

The Swap V3 API returns a flat `routes` array instead of `autoRoute` / `depositRoute` / `manualRoute` sub-objects.

**Before (Bungee API):**

```json theme={null}
{
  "success": true,
  "result": {
    "autoRoute": {
      "quoteId": "0x...",
      "requestHash": "0x...",
      "txData": { ... },
      "approvalData": { ... }
    }
  }
}
```

**After (Socket Swap V3 API):**

```json theme={null}
{
  "originChainId": 1,
  "destinationChainId": 10,
  "routes": [
    {
      "userOp": "tx",
      "quoteId": "0x...",
      "expiresAt": 1760000000,
      "output": { ... },
      "approval": { ... },
      "txData": {
        "kind": "evm_tx",
        "object": { "chainId": 1, "to": "0x...", "data": "0x...", "value": "0" }
      },
      "statusCheck": {
        "endpoint": "https://backend.socket.tech/v3/swap/status?quoteId=0x...",
        "intervalSec": 5
      }
    }
  ]
}
```

## Execution flow changes

**Before (Bungee API — Auto Mode):**

1. `GET /api/v1/bungee/quote` → get `autoRoute`
2. Approve `approvalData.spenderAddress` if needed
3. Sign `autoRoute.signTypedData` with `PermitWitnessTransferFrom`
4. `POST /api/v1/bungee/submit` with signature → get `requestHash`
5. Poll `GET /api/v1/bungee/status?requestHash=...`

**After (Socket Swap V3 API):**

1. `GET /v3/swap/quote?userOps=tx` → get `routes[]`
2. Approve `route.approval.spenderAddress` if `route.approval` is present
3. Submit `route.txData.object` as a transaction from `userAddress`
4. Poll `GET /v3/swap/status?quoteId=...`

The biggest simplification is that you no longer need to sign EIP-712 typed data or call a `submit` endpoint. The Swap V3 API returns a ready-to-send transaction.

## Status endpoint changes

**Before:**

```
GET /api/v1/bungee/status?requestHash=<requestHash>
```

**After:**

```
GET /v3/swap/status?quoteId=<quoteId>
```

The v3 status endpoint looks up execution state by `quoteId`.

## Status values

The Swap V3 status response uses string status codes instead of numeric codes:

| Bungee numeric code   | Socket Swap V3 statusCode |
| --------------------- | ------------------------- |
| `3` / `4` (completed) | `COMPLETED`               |
| `5` (expired)         | `EXPIRED`                 |
| `6` (cancelled)       | `FAILED`                  |
| `7` (refunded)        | `REFUNDED`                |
| In progress           | `IN_PROGRESS`             |

## Deposit addresses

The deposit flow is available via `userOps=deposit` on `/v3/swap/quote`. The response structure has changed — see the [Deposit Addresses Guide](/integrate/integration-guides/deposit-addresses) for the updated flow.

## What changes & stays the same

* Base URL changes from `https://dedicated-backend.bungee.exchange` to `https://backend.socket.tech`
* Auth headers change — use `affiliate` and `x-api-key` as issued for your integration
* Native token address: `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`
* Fee parameters: `feeBps` and `feeTakerAddress` stay same
* Chain support remains same

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/v3/swap/quote">
    Full Socket Swap V3 API reference
  </Card>

  <Card title="Get API Access" icon="key" href="/integrate/get-api-access">
    Request production API credentials
  </Card>
</CardGroup>
