Swap quote API

We're already using Uniswap V2 and V3 pools for easy integration, but since routing V3 pools is particularly challenging, we provide APIs to partners who want to use the swap feature easily.

Unlike APIs provided by typical aggregators, we provide these benefits :

  • full router path information without encryption

  • 0 positive slippage charge.

Since we're not making this publicly available due to limited resource, but rather providing it only to partners who truly need it, ecosystem partners who want an API key should contact us.

Endpoint URL

Mainnet api: POST https://quote-api.cluster.kyo.finance/quote/partners/1868 (1946 for Testnet)

How to use

  • Universal router [Tech Docs] : 0x3EeD194633ba23Bda9976D7F9ac4e97F225Ca61B

Request header
{
    "x-api-key": {YOUR_API_KEY}
}

Request body (application/json)
* Address for native ETH is "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"

Schema
{
    "amount": "string",
    "tokenInAddr": "string",
    "tokenOutAddr": "string",
    "exactIn": boolean
}
Example
* 100 KYO -> ETH
{
    "amount": "100000000000000000000",
    "tokenInAddr": "0x9814a66e2bddcfeb4e2d2290991c4c1d5411c800",
    "tokenOutAddr": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
    "exactIn": true
}
Response
* poolType "Converter" is used to wrap ETH or unwrap WETH
* poolType "Lock" is used to lock KYO to veKYO (Not supported yet)

Schema
{
  "bestRoute": {
    "bestPaths": {
        "resultAmounts": "string",
        "resultUSDValue": "string",
        "ratio": "string",
        "path": {
            "inputToken": {
              "address": "string",
              "decimals": number,
              "isEth": true,
              "name": "string",
              "symbol": "string",
              "usdPrice": "string"
            },
            "outputToken": {
              "address": "string",
              "decimals": number,
              "isEth": true,
              "name": "string",
              "symbol": "string",
              "usdPrice": "string"
            },
            "poolAddress": "string",
            "poolType": "UniV2" | "UniV3" | "Converter" | "Lock",
            "poolFee": number
          }[],
        "initialAmounts": "string"
      }[],
    "totalInputAmounts": "string",
    "totalOutputAmounts": "string"
  },
  "blockNumber": number
}

Example
* 75% [UniV3]KYO/WETH - [Converter]WETH/ETH: 0.146989755845961672 ETH
  25% [UniV2]KYO/WETH - [Converter]WETH/ETH: 0.048995041571289337 ETH
  total output amount: 0.195984797417251009 ETH
{
  "bestRoute": {
    "bestPaths": [
      {
        "path": [
          {
            "inputToken": {
              "address": "0x9814a66e2bddcfeb4e2d2290991c4c1d5411c800",
              "decimals": 18,
              "isEth": false,
              "name": "Kyo",
              "symbol": "KYO",
              "usdPrice": "177.2025276101170228567704426297398086940232850598630258870371835571"
            },
            "outputToken": {
              "address": "0x4200000000000000000000000000000000000006",
              "decimals": 18,
              "isEth": false,
              "name": "Wrapped Ether",
              "symbol": "WETH",
              "usdPrice": "90125.57248288609435973108259231129",
            },
            "poolAddress": "0xd3f00af2354b5f3356b7a44897be7694a803facc",
            "poolType": "UniV3",
            "poolFee": 3000
          },
          {
            "inputToken": {
              "address": "0x4200000000000000000000000000000000000006",
              "decimals": 18,
              "isEth": false,
              "name": "Wrapped Ether",
              "symbol": "WETH",
              "usdPrice": "90125.57248288609435973108259231129",
            },
            "outputToken": {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "decimals": 18,
              "isEth": true,
              "name": "ETH",
              "symbol": "ETH",
              "usdPrice": "90125.57248288609435973108259231129"
            },
            "poolAddress": "0x4200000000000000000000000000000000000006",
            "poolType": "Converter"
          }
        ],
        "initialAmounts": "75000000000000000000",
        "resultAmounts": "146989755845961672",
        "resultUSDValue": "13247.53589473694869042326",
        "ratio": "75"
      },
      {
        "path": [
          {
            "inputToken": {
              "address": "0x9814a66e2bddcfeb4e2d2290991c4c1d5411c800",
              "decimals": 18,
              "isEth": false,
              "name": "Kyo",
              "symbol": "KYO",
              "usdPrice": "177.2025276101170228567704426297398086940232850598630258870371835571"
            },
            "outputToken": {
              "address": "0x4200000000000000000000000000000000000006",
              "decimals": 18,
              "isEth": false,
              "name": "Wrapped Ether",
              "symbol": "WETH",
              "usdPrice": "90125.57248288609435973108259231129",
            },
            "poolAddress": "0xd53f58e09fb992219f9ec57052119546778374b0",
            "poolType": "UniV2",
            "poolFee": "3000"
          },
          {
            "inputToken": {
              "address": "0x4200000000000000000000000000000000000006",
              "decimals": 18,
              "isEth": false,
              "name": "Wrapped Ether",
              "symbol": "WETH",
              "usdPrice": "90125.57248288609435973108259231129"
            },
            "outputToken": {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "decimals": 18,
              "isEth": true,
              "name": "ETH",
              "symbol": "ETH",
              "usdPrice": "90125.57248288609435973108259231129"
            },
            "poolAddress": "0x4200000000000000000000000000000000000006",
            "poolType": "Converter"
          }
        ],
        "initialAmounts": "25000000000000000000",
        "resultAmounts": "48995041571289337",
        "resultUSDValue": "4415.70617043525454197833",
        "ratio": "25"
      }
    ],
    "totalInputAmounts": "100000000000000000000",
    "totalOutputAmounts": "195984797417251009"
  },
  "blockNumber": 5568305
}

Last updated

Was this helpful?