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

# Quick start

> Quote, build, and submit a swap on Ethereum in four requests. No API key needed.

The first three requests change nothing on chain, so they need no API key and no funds. To sign and submit, the wallet needs the input token and ETH for network fees.

**1. Find a pair**

List the pairs you can offer on Ethereum:

```bash theme={null}
curl "https://api.multiliquid.xyz/v1/swap/pairs?network=evm-mainnet"
```

Each pair names the token the user pays, the token they receive, the capital providers that can fill it, and those that take batch orders for it. This one pays USDC for WTGXX, a tokenized money market fund:

```json Pair expandable theme={null}
{
  "inputToken": {
    "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "symbol": "USDC",
    "name": "USD Coin",
    "decimals": 6,
    "kind": "stablecoin",
    "issuer": "Circle"
  },
  "outputToken": {
    "address": "0x1fecf3d9d4fee7f2c02917a66028a48c6706c179",
    "symbol": "WTGXX",
    "name": "WisdomTree Government Money Market Digital Fund",
    "decimals": 18,
    "kind": "rwa",
    "issuer": "WisdomTree"
  },
  "swapTypes": [
    "exactIn",
    "exactOut"
  ],
  "capitalProviders": [
    {
      "id": "0x58e27f2731863499e6a23a1662ebeed9041d6b40996ea9ca7f4ebc54201823b4",
      "name": "Uniform Labs",
      "address": "0x0630582db5a1949509f21b315677c40b9aeb7bda"
    },
    {
      "id": "0xfd07a2f44bab2d27f5af4a5a579abfc543010ce2f97597a5e0d9e13be6b1fb26",
      "name": "Uniform Labs",
      "address": "0x8a982edc1578394ed03f8b24d3b78a924fcf3abc"
    },
    {
      "id": "0x2f5c040b301a61f7770bc3ba613522e8d8d60a9f2cecf6721d3870fe6627de8b",
      "name": null,
      "address": "0xd49499321f771e18c5aa0d93152d7e2b20da5b48"
    }
  ],
  "batchCapitalProviders": []
}
```

**2. Get a quote**

Quote 1 USDC into WTGXX for the user's wallet. Amounts are whole tokens, as decimal strings: 1 USDC is `1`.

```bash theme={null}
curl "https://api.multiliquid.xyz/v1/swap/quote?network=evm-mainnet&inputToken=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&outputToken=0x1fecf3d9d4fee7f2c02917a66028a48c6706c179&amountIn=1&user=0x2222222222222222222222222222222222222222"
```

The user receives `amountOut`, here 0.9999 WTGXX. `fees` lists each fee and who pays it, and `alternatives` lists every other capital provider considered, with the amounts it quoted or the `error` it rejected the swap with.

```json Response expandable theme={null}
{
  "network": "evm-mainnet",
  "swapType": "exactIn",
  "inputToken": {
    "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "symbol": "USDC",
    "name": "USD Coin",
    "decimals": 6,
    "kind": "stablecoin",
    "issuer": "Circle"
  },
  "outputToken": {
    "address": "0x1fecf3d9d4fee7f2c02917a66028a48c6706c179",
    "symbol": "WTGXX",
    "name": "WisdomTree Government Money Market Digital Fund",
    "decimals": 18,
    "kind": "rwa",
    "issuer": "WisdomTree"
  },
  "amountIn": "1",
  "amountOut": "0.9999",
  "price": "0.9999",
  "nav": [
    {
      "token": {
        "address": "0x1fecf3d9d4fee7f2c02917a66028a48c6706c179",
        "symbol": "WTGXX",
        "name": "WisdomTree Government Money Market Digital Fund",
        "decimals": 18,
        "kind": "rwa",
        "issuer": "WisdomTree"
      },
      "value": "1",
      "currency": "USD"
    }
  ],
  "fees": [
    {
      "type": "issuer",
      "amount": "0",
      "token": {
        "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "kind": "stablecoin",
        "issuer": "Circle"
      },
      "paidBy": "capitalProvider"
    },
    {
      "type": "spread",
      "amount": "0.0001",
      "token": {
        "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "kind": "stablecoin",
        "issuer": "Circle"
      },
      "paidBy": "user"
    },
    {
      "type": "capitalProvider",
      "amount": "0",
      "token": {
        "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "symbol": "USDC",
        "name": "USD Coin",
        "decimals": 6,
        "kind": "stablecoin",
        "issuer": "Circle"
      },
      "paidBy": "user"
    }
  ],
  "capitalProvider": {
    "id": "0x58e27f2731863499e6a23a1662ebeed9041d6b40996ea9ca7f4ebc54201823b4",
    "name": "Uniform Labs",
    "address": "0x0630582db5a1949509f21b315677c40b9aeb7bda"
  },
  "indicative": false,
  "alternatives": [
    {
      "capitalProvider": {
        "id": "0xfd07a2f44bab2d27f5af4a5a579abfc543010ce2f97597a5e0d9e13be6b1fb26",
        "name": "Uniform Labs",
        "address": "0x8a982edc1578394ed03f8b24d3b78a924fcf3abc"
      },
      "amountIn": "1",
      "amountOut": "0.9999"
    },
    {
      "capitalProvider": {
        "id": "0x2f5c040b301a61f7770bc3ba613522e8d8d60a9f2cecf6721d3870fe6627de8b",
        "name": null,
        "address": "0xd49499321f771e18c5aa0d93152d7e2b20da5b48"
      },
      "amountIn": "1",
      "amountOut": "0.9999"
    }
  ]
}
```

If the quote answers `NO_QUOTE`, no capital provider can fill that amount now, and `details.providers` says why for each one. Try a smaller amount or another pair.

**3. Build the transactions**

Send the same swap with the wallet, and how far the price may move in basis points:

```bash theme={null}
curl -X POST "https://api.multiliquid.xyz/v1/swap/build" \
  -H "Content-Type: application/json" \
  -d '{
    "network": "evm-mainnet",
    "inputToken": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "outputToken": "0x1fecf3d9d4fee7f2c02917a66028a48c6706c179",
    "amountIn": "1",
    "user": "0x2222222222222222222222222222222222222222",
    "slippageBps": 50
  }'
```

The wallet signs `approval`, then `swap`. `approval` lets the capital provider's delegate take the USDC, and it is `null` when the wallet has already approved enough. `checks` show whether the swap would succeed. In this example the wallet holds enough USDC and may receive WTGXX, and only the allowance is missing, so the build simulates the swap after the approval. Each transaction is complete and ready to sign: the API fills in its `nonce`, `gas`, `maxFeePerGas`, and `maxPriorityFeePerGas` from the chain, and `serialized` is the unsigned transaction. The approval takes the wallet's next nonce, `42`, and the swap the one after. The transactions are calldata, so the approval's `data` encodes 1 USDC in its on-chain base units. The response also carries the build's own fresh quote under `quote`, with its amounts, price, fees, and capital provider, left out here.

```json Response expandable theme={null}
{
  "bound": {
    "minAmountOut": "0.9949005"
  },
  "approval": {
    "description": "Approve 1 USDC to the USDC delegate of capital provider Uniform Labs",
    "transaction": {
      "runtime": "evm",
      "chainId": 1,
      "from": "0x2222222222222222222222222222222222222222",
      "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "data": "0x095ea7b30000000000000000000000000630582db5a1949509f21b315677c40b9aeb7bda00000000000000000000000000000000000000000000000000000000000f4240",
      "value": "0",
      "nonce": "42",
      "gas": "67134",
      "maxFeePerGas": "21500000000",
      "maxPriorityFeePerGas": "1500000000",
      "serialized": "0x02f86e012a8459682f008505017ff7008301063e94a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4880b844095ea7b30000000000000000000000000630582db5a1949509f21b315677c40b9aeb7bda00000000000000000000000000000000000000000000000000000000000f4240c0"
    }
  },
  "swap": {
    "description": "Swap 1 USDC for at least 0.9949005 WTGXX",
    "transaction": {
      "runtime": "evm",
      "chainId": 1,
      "from": "0x2222222222222222222222222222222222222222",
      "to": "0xd66211cf522ba23b59789fff6524c1f03e13e20c",
      "data": "0xdeead6b5…",
      "value": "0",
      "nonce": "43",
      "gas": "277944",
      "maxFeePerGas": "21500000000",
      "maxPriorityFeePerGas": "1500000000",
      "serialized": "0x02f9018f012b8459682f008505017ff70083043db894d66211cf522ba23b59789fff6524c1f03e13e20c80b90164deead6b5…"
    }
  },
  "checks": {
    "balance": {
      "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "required": "1",
      "available": "48.984469",
      "sufficient": true
    },
    "eligibility": {
      "wallet": "0x2222222222222222222222222222222222222222",
      "token": "0x1fecf3d9d4fee7f2c02917a66028a48c6706c179",
      "status": "eligible",
      "reason": "allowlisted"
    },
    "allowance": {
      "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "spender": "0x0630582db5a1949509f21b315677c40b9aeb7bda",
      "required": "1",
      "available": "0",
      "sufficient": false
    },
    "simulation": {
      "status": "succeeded",
      "gasUsed": "211520"
    }
  }
}
```

**4. Sign and submit**

Sign each transaction's `serialized` as returned, without broadcasting it. Don't change the nonce, gas, or fees: they are set for this wallet and the current fee market. Sign within a few blocks, and build again if the wallet sends another transaction first. Submit them together, the approval first:

```bash theme={null}
curl -X POST "https://api.multiliquid.xyz/v1/submissions" \
  -H "Content-Type: application/json" \
  -d '{ "network": "evm-mainnet", "signedTransactions": ["0x02f8…", "0x02f8…"] }'
```

Multiliquid broadcasts the approval now and sends the swap once the approval is `confirmed`. The response lists both submissions in order. Read the swap's `GET /v1/submissions/{submissionId}` every 4 seconds until its `state` is `finalized` or `expired`, or `failed` with `finalizedAt` set or without `inclusion`. When `approval` is `null`, submit the swap alone.

A wallet that can only broadcast, such as a browser wallet or a custody platform, sends the approval itself instead, waits until it is confirmed, then sends the swap as returned, or builds again if more than a few blocks have passed.

## Next steps

> [card] [Swap instantly](https://docs.multiliquid.xyz/api-reference/swap/swap-instantly.md)
>
> The full flow on Ethereum and Solana, from quote to a finalized swap, and what to do when something fails.

> [card] [Quotes and builds](https://docs.multiliquid.xyz/api-reference/swap/quote-and-build.md)
>
> Every field of a quote and a build.

> [card] [Submissions](https://docs.multiliquid.xyz/api-reference/swap/submissions.md)
>
> States, polling, and the realized settlement.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.