# Quote API

#### API base path

```
https://api.bulbaswap.io/v2/quote
```

#### Params

<table><thead><tr><th width="183">Name</th><th width="80">Require</th><th width="113">Type</th><th>Note</th></tr></thead><tbody><tr><td>amount</td><td>true</td><td>number</td><td>e.g. 0.1</td></tr><tr><td>tokenInAddress</td><td>true</td><td>string</td><td>eth, ETH, weth, WETH, 0x...</td></tr><tr><td>tokenOutAddress</td><td>true</td><td>string</td><td>eth, ETH, weth, WETH, 0x...</td></tr><tr><td>slippage</td><td>false</td><td>number</td><td>min: 0.01, max: 100, default: auto</td></tr><tr><td>minAmountOut</td><td>false</td><td>number</td><td>e.g. 0.2</td></tr><tr><td>protocols</td><td>false</td><td>string</td><td>v2/v3/v2,v3 (default: v2,v3)</td></tr><tr><td>recipient</td><td>false</td><td>string</td><td>0x...</td></tr><tr><td>deadline</td><td>false</td><td>number</td><td>Positive integer, min: 60, max: 600</td></tr></tbody></table>

#### Example

<pre class="language-sh"><code class="lang-sh"><strong>// Get query
</strong><strong>https://api.bulbaswap.io/v2/quote?amount=0.1
</strong><strong>    &#x26;tokenInAddress=ETH
</strong><strong>    &#x26;tokenOutAddress=0xc7D67A9cBB121b3b0b9c053DD9f469523243379A
</strong><strong>    &#x26;slippage=0.5
</strong><strong>    &#x26;minAmountOut=270.9
</strong><strong>    &#x26;recipient=0x3210f5d1a49842634F224dD50a8BadF02e9aB3a4
</strong><strong>    &#x26;deadline=600
</strong><strong>    &#x26;protocols=v2,v3
</strong></code></pre>

```json
{
  "code": 0,
  "msg": "success",
  "data": {
    "methodParameters": {
      "calldata": "0xd984396a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c7d67a9cbb121b3b0b9c053dd9f469523243379a0000000000000000000000003210f5d1a49842634f224dd50a8badf02e9ab3a4000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000010259b200000000000000000000000000000000000000000000000000000000010aa5a6e00000000000000000000000000000000000000000000000000000000d2519ef800000000000000000000000000000000d85d1221bb31493b9d1ccb8bd1220e140000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0ce9a3b911f2f52f93f6bf35475be703998aa670000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005300000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000003210f5d1a49842634f224dd50a8badf02e9ab3a400000000000000000000000000000000000000000000000000000000000000000000000000000000000000005191035d329f481eff0143e690e0a4e366dd1e0c0000000000000000000000005300000000000000000000000000000000000011000000000000000000000000c7d67a9cbb121b3b0b9c053dd9f469523243379a0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000000",
      "value": "0.1",
      "to": "0xc0Ce9a3B911f2F52f93F6bf35475be703998aa67"
    },
    "amount": "100000000000000000",
    "amountDecimals": "0.1",
    "quote": "279599726",
    "quoteDecimals": "279.599726",
    "slippage": "0.5",
    "minAmountOut": "270.9",
    "priceImpact": "0.0024",
    "fromTokenPrice": "2802.85",
    "toTokenPrice": "1",
    "swapFee": {
      "swapType": 1,
      "feeType": 0,
      "feeRate": "0.001",
      "feeChain": "morph",
      "feeSymbol": "ETH",
      "feeContract": "",
      "feeDecimals": 18,
      "feeTokenPrice": "2802.85",
      "feeDueAmount": "0.0001"
    },
    "gasFee": {
      "gasLimit": "1200000",
      "gasPrice": "0.000000000015",
      "gasFeeAmountInUsd": "0.0651809846024520615",
      "gasTotalAmount": "0.00002325525254739",
      "gasLevel": "fast"
    },
    "route": [
      [
        {
          "poolAddr": "0x0000000000000000000000000000000000000000",
          "label": "NativeWrapper",
          "percent": 100,
          "tokenIn": {
            "address": "0x0000000000000000000000000000000000000000"
          },
          "tokenOut": {
            "address": "0x5300000000000000000000000000000000000011"
          },
          "amountIn": "99900000000000000",
          "amountOut": "99900000000000000"
        }
      ],
      [
        {
          "poolAddr": "0x5191035d329f481eff0143e690e0a4e366dd1e0c",
          "label": "BulbaV3",
          "percent": 100,
          "tokenIn": {
            "address": "0x5300000000000000000000000000000000000011"
          },
          "tokenOut": {
            "address": "0xc7d67a9cbb121b3b0b9c053dd9f469523243379a"
          },
          "amountIn": "99900000000000000",
          "amountOut": "279599726"
        }
      ]
    ]
  }
}
```
