Skip to main content
POST
/
position
/
claim-fee-tx
Claim Fees — Generate transaction(s) to claim accrued LP fees
curl --request POST \
  --url https://api.lpagent.io/open-api/v1/position/claim-fee-tx \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "position_id": "<string>",
  "owner": "<string>",
  "slippage_bps": 5000,
  "swapToNative": false,
  "provider": "OKX",
  "type": "meteora"
}
'
{
  "data": {
    "lastValidBlockHeight": 123,
    "claimTxsWithJito": [
      "<string>"
    ],
    "swapTxsWithJito": [
      "<string>"
    ],
    "meta": {
      "position_id": "<string>",
      "type": "meteora",
      "swapToNative": true,
      "token0": "<string>",
      "token1": "<string>",
      "rawFee0": "<string>",
      "rawFee1": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.lpagent.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json
position_id
string
required

The position ID

owner
string
required

The owner's wallet address

slippage_bps
integer
required

Slippage tolerance in basis points used by the swap-to-SOL transactions (0-10000). Ignored when swapToNative is false.

Required range: 0 <= x <= 10000
swapToNative
boolean
default:false

When true, the response includes swap transactions that convert the claimed fees into SOL.

provider
enum<string>

The swap provider to use (only relevant when swapToNative is true)

Available options:
OKX,
JUPITER_ULTRA
type
enum<string>
default:meteora

The pool type

Available options:
meteora,
meteora_damm_v2

Response

Transaction data prepared successfully

data
object