---
title: "Get the best zap-in route."
method: GET
path: "/api/v1/in/route"
tags: ["Service"]
---

# Get the best zap-in route.

`GET /api/v1/in/route`

## Request

- Base URL: `https://zap-api.kyberswap.com/arbitrum`
- URL: `https://zap-api.kyberswap.com/arbitrum/api/v1/in/route`
- Auth: none declared
- TypeScript: <https://skmtc.dev/kyberswap/apis/zap-service/docs/api/v1/in/route/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `dex` 'DEX_UNISWAPV3', required
- `pool.id` string, required
- `position.id` string
- `position.tickLower` integer
- `position.tickUpper` integer
- `tokensIn` string[], required
- `amountsIn` string[], required
- `tokenIn` string[]
- `amountIn` string[]
- `aggregatorOptions.disable` boolean
- `aggregatorOptions.includedSources` string
- `aggregatorOptions.excludedSources` string
- `aggregatorOptions.excludedPools` string
- `feeAddress` string
- `feePcm` integer
- `slippage` integer

## Headers

- `X-Client-Id` string
- `X-Request-Id` string

## Response `200`

A successful response.

- V1GetInRouteResponse: Returns the best route to zap-in to the specified pool position.
  - `code` integer
  - `message` string
  - `data` V1GetInRouteResponseData: Encompasses returned data.
    - `poolDetails` V1PoolDetails
      - `category` string
      - `uniswapV3` PoolDetailsUniswapV3
        - `tick` integer
        - `newTick` integer
        - `sqrtP` string
        - `newSqrtP` string
      - `uniswapV2` PoolDetailsUniswapV2
        - `reserve0` string
        - `newReserve0` string
        - `reserve1` string
        - `newReserve1` string
      - `algebraV1` PoolDetailsAlgebraV1
        - `tick` integer
        - `newTick` integer
        - `sqrtP` string
        - `newSqrtP` string
    - `positionDetails` V1PositionDetails
      - `removedLiquidity` string
      - `removedAmountUsd` string
      - `addedLiquidity` string
      - `addedAmountUsd` string
    - `zapDetails` V1ZapDetails
      - `initialAmountUsd` string
      - `actions` ZapDetailsAction[]
        - `type` 'ACTION_TYPE_UNSPECIFIED' | 'ACTION_TYPE_PROTOCOL_FEE' | 'ACTION_TYPE_PARTNER_FEE' | 'ACTION_TYPE_AGGREGATOR_SWAP' | 'ACTION_TYPE_POOL_SWAP' | 'ACTION_TYPE_ADD_LIQUIDITY' | 'ACTION_TYPE_REMOVE_LIQUIDITY' | 'ACTION_TYPE_REFUND': - ACTION_TYPE_UNSPECIFIED: Unspecified action - ACTION_TYPE_PROTOCOL_FEE: protocol fee - ACTION_TYPE_PARTNER_FEE: partner fee - ACTION_TYPE_AGGREGATOR_SWAP: aggregator swap - ACTION_TYPE_POOL_SWAP: pool swap - ACTION_TYPE_ADD_LIQUIDITY: add liquidity - ACTION_TYPE_REMOVE_LIQUIDITY: remove liquidity - ACTION_TYPE_REFUND: refund
        - `protocolFee` ZapDetailsFeeAction
          - `pcm` integer
          - `tokens` ZapDetailsTokenAmount[]
            - `address` string
            - `amount` string
            - `amountUsd` string
        - `partnerFee` ZapDetailsFeeAction
          - `pcm` integer
          - `tokens` ZapDetailsTokenAmount[]
            - `address` string
            - `amount` string
            - `amountUsd` string
        - `aggregatorSwap` ZapDetailsSwapAction
          - `swaps` SwapActionSwap[]
            - `tokenIn` ZapDetailsTokenAmount
              - …
            - `tokenOut` ZapDetailsTokenAmount
              - …
        - `poolSwap` ZapDetailsSwapAction
          - `swaps` SwapActionSwap[]
            - `tokenIn` ZapDetailsTokenAmount
              - …
            - `tokenOut` ZapDetailsTokenAmount
              - …
        - `addLiquidity` ZapDetailsLiquidityAction
          - `tokens` ZapDetailsTokenAmount[]
            - `address` string
            - `amount` string
            - `amountUsd` string
          - `fees` ZapDetailsTokenAmount[]
            - `address` string
            - `amount` string
            - `amountUsd` string
          - `token0` ZapDetailsTokenAmount
            - `address` string
            - `amount` string
            - `amountUsd` string
          - `token1` ZapDetailsTokenAmount
            - `address` string
            - `amount` string
            - `amountUsd` string
        - `removeLiquidity` ZapDetailsLiquidityAction
          - `tokens` ZapDetailsTokenAmount[]
            - `address` string
            - `amount` string
            - `amountUsd` string
          - `fees` ZapDetailsTokenAmount[]
            - `address` string
            - `amount` string
            - `amountUsd` string
          - `token0` ZapDetailsTokenAmount
            - `address` string
            - `amount` string
            - `amountUsd` string
          - `token1` ZapDetailsTokenAmount
            - `address` string
            - `amount` string
            - `amountUsd` string
        - `refund` ZapDetailsRefundAction
          - `tokens` ZapDetailsTokenAmount[]
            - `address` string
            - `amount` string
            - `amountUsd` string
      - `finalAmountUsd` string
      - `priceImpact` number, float
    - `route` string, byte
    - `routerAddress` string
    - `gas` string
    - `gasUsd` string
  - `requestId` string

## Other responses

- `400`: Invalid Argument
- `404`: Not Found
- `default`: An unexpected error response.

---

[API](https://skmtc.dev/kyberswap/apis/zap-service.md) - [All operations](https://skmtc.dev/kyberswap/apis/zap-service/llms.txt) - [OpenAPI document](https://skmtc.dev/kyberswap/apis/zap-service/revisions/74dbd81c8d70?raw)
