Skip to main content
GET
/
api
/
{blockchain}
/
quote
TypeScript
const options = {method: 'GET'};

fetch('https://swap.ggp.gg/api/{blockchain}/quote', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "data": {
    "rawTotalGasEstimate": 1,
    "steps": [
      [
        {
          "exchanger": {
            "address": "<string>",
            "fee": 1,
            "name": "<string>",
            "poolType": "UniswapV2"
          },
          "amountIn": "<string>",
          "amountOut": "<string>",
          "percentBps": 1,
          "tokenIn": "<string>",
          "tokenOut": "<string>",
          "priceImpact": 1
        }
      ]
    ],
    "totalAmountOut": "<string>",
    "totalPriceImpact": 1,
    "addressTokenIn": "<string>",
    "addressTokenOut": "<string>",
    "amountIn": "<string>",
    "amountInUsd": 123,
    "amountOutUsd": 123,
    "usdDifference": 123
  }
}

Path Parameters

blockchain
enum<string>
required
Available options:
ethereum,
bsc,
arbitrum

Query Parameters

addressTokenIn
string
required
addressTokenOut
string
required
amountIn
string
required

Response

Quote for aggregation swap through POST /{blockchain}/swap

data
object