---
title: "Build transaction to migrate LP to swap.coffee DEX"
method: POST
path: "/v1/liquidity/migration/{user_address}"
tags: ["LiquidityProvisioning"]
---

# Build transaction to migrate LP to swap.coffee DEX

`POST /v1/liquidity/migration/{user_address}`

## Request

- Base URL: `https://backend.swap.coffee`
- URL: `https://backend.swap.coffee/v1/liquidity/migration/{user_address}`
- Auth: one of:
  - none
  - API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/swap/apis/swap-coffee-api/docs/v1/liquidity/migration/:user_address/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `user_address` string, required

## Request body

- ApiLpMigrationUserRequest
  - `source_pool` string, required
  - `destination_pool` string: If not passed, then volatile pool with source pool tokens will be created
  - `source_lp` string, required: Absolute value
  - `min_destination_lp` string, required: Absolute value
  - `pool_action_type` 'not_existing_pool' | 'existing_pool', required

## Response `200`

Transaction to be sent

- ApiTransactionResponse
  - `query_id` integer, required
  - `message` ApiTransactionBoc, required
    - `payload_cell` string, base64, required: Base64-encoded cell. Treated as a payload field in TonConnect transaction.
    - `address` string, required
    - `value` string, int128, required: Amount of nanotons to be sent. Can be passed to TonConnect transaction.
    - `state_init` string, base64: Base64-encoded cell. Treated as a stateInit field in TonConnect transaction.
    - `extra` ApiExtraCurrency[]
      - `id` integer, required
      - `amount` string, int128, required

## Other responses

- `default`: Some error during request processing

---

[API](https://skmtc.dev/swap/apis/swap-coffee-api.md) - [All operations](https://skmtc.dev/swap/apis/swap-coffee-api/llms.txt) - [OpenAPI document](https://skmtc.dev/swap/apis/swap-coffee-api/revisions/88f42fef59b7?raw)
