---
title: "Zap-Out — Generate transaction to withdraw liquidity"
method: POST
path: "/position/decrease-tx"
tags: ["Position"]
---

# Zap-Out — Generate transaction to withdraw liquidity

`POST /position/decrease-tx`

Generates serialized zap-out transactions to withdraw liquidity from a position. Supports both Meteora DLMM and DAMM V2 positions.

## Request body

- object
  - `position_id` string, required — The position ID
  - `bps` integer, required — Basis points for the amount to decrease (0-10000)
  - `owner` string, required — The owner's wallet address
  - `slippage_bps` integer, required — Slippage tolerance in basis points (0-10000)
  - `output` 'allToken0' | 'allToken1' | 'both' | 'allBaseToken' — The output token for the swap
  - `provider` 'OKX' | 'JUPITER_ULTRA' — The swap provider to use
  - `type` 'meteora' | 'meteora_damm_v2' — The pool type
  - `fromBinId` number — Starting bin ID
  - `toBinId` number — Ending bin ID

## Response `200`

Transaction data prepared successfully

- object
  - `data` object
    - `lastValidBlock` number
    - `closeTxs` string[]
    - `swapTxs` string[]
    - `closeTxsWithJito` string[]
    - `swapTxsWithJito` string[]

## Other responses

- `400` — Invalid parameters or position-related errors
- `500` — Internal server error

## Changes

- **2026-03-16** `dbab3b96efd1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/lpagent/apis/lp-agent-open-api/changes/position/decrease-tx/post.md)

---

[API](https://skmtc.dev/lpagent/apis/lp-agent-open-api.md) · [All operations](https://skmtc.dev/lpagent/apis/lp-agent-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lpagent/lp-agent-open-api/revisions/f90fd69d221b/schema)
