Skip to main content
You can deposit tokens into Meteora’s Dynamic Liquidity Market Maker (DLMM) pools to earn trading fees. DLMM pools use a bin-based model where liquidity is concentrated in discrete price ranges, giving you fine-grained control over how your capital is deployed.
Liquidity operations are custodial. Funds are held in a platform-managed position, with your agent maintaining a tracked balance.

How DLMM pools work

Meteora DLMM pools organize liquidity into discrete price bins. Each bin represents a price range, and trades execute against the bin at the current active price. As the market price moves, different bins become active. You earn fees from any bin your liquidity occupies when a trade passes through it. Key pool parameters:
  • Bin step — the price increment between adjacent bins (e.g., 10 = 0.1% per bin)
  • Base fee — the percentage fee charged on trades through the pool
  • Active bin — the bin at the current market price

Discover pools

List available liquidity pools, optionally filtered by token pair:
curl "https://api.useknot.xyz/wallets/me/pools?tokenX=SOL&tokenY=USDC&limit=50" \
  -H "Authorization: Bearer <token>"

Query parameters

tokenX
string
Filter by token X symbol or mint address.
tokenY
string
Filter by token Y symbol or mint address.
limit
number
default:"50"
Maximum number of pools to return.

Response

{
  "status": true,
  "data": {
    "pools": [
      {
        "address": "PoolAddress123...",
        "name": "SOL-USDC",
        "mintX": "So11111111111111111111111111111111111111112",
        "mintY": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "tvl": 5000000,
        "apr": 45.2,
        "binStep": 10,
        "baseFee": 0.25
      }
    ]
  }
}
data.pools
array

Get pool details

Retrieve detailed information about a specific pool, including current price and bin configuration:
curl "https://api.useknot.xyz/wallets/me/pools/PoolAddress123..." \
  -H "Authorization: Bearer <token>"

Add liquidity

Deposit tokens into a pool:
curl -X POST https://api.useknot.xyz/wallets/me/actions/add-liquidity \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "pool": "PoolAddress123...",
    "amountX": 1.0,
    "amountY": 86.5,
    "strategy": "spot",
    "rangeWidth": 10
  }'

Request parameters

pool
string
required
The pool address to deposit into. Obtain this from the discover pools endpoint.
amountX
number
required
Amount of token X to deposit. Set to 0 for a Y-only one-sided position.
amountY
number
Amount of token Y to deposit. Set to 0 for an X-only one-sided position.
strategy
string
required
Liquidity distribution strategy: spot, curve, or bidAsk.
rangeWidth
number
Number of bins to spread liquidity across. Accepts values from 1 to 100.

Liquidity strategies

Choose a strategy based on your market outlook and how actively you want to manage the position:
Distributes liquidity uniformly across the selected bins. Provides balanced exposure to both tokens with moderate fee generation.Best for: Neutral market outlook, lower maintenance.

One-sided liquidity

You can deposit only one token:
  • Token X only — set amountX > 0 and amountY = 0. Liquidity is placed in bins above the active price.
  • Token Y only — set amountX = 0 and amountY > 0. Liquidity is placed in bins below the active price.

View positions

List all your active or closed liquidity positions:
curl "https://api.useknot.xyz/wallets/me/positions?status=active" \
  -H "Authorization: Bearer <token>"

Query parameters

status
string
Filter by position status: active or closed.

Get position details

Retrieve on-chain data and pending rewards for a specific position:
curl "https://api.useknot.xyz/wallets/me/positions/position-uuid" \
  -H "Authorization: Bearer <token>"
Use this endpoint to check whether there are unclaimed rewards before calling the claim rewards endpoint.

Remove liquidity

Withdraw some or all of your position from a pool:
curl -X POST https://api.useknot.xyz/wallets/me/actions/remove-liquidity \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "positionId": "position-uuid",
    "percentage": 100
  }'

Request parameters

positionId
string
required
The database position ID (UUID). This is not the on-chain public key — retrieve it from the view positions endpoint.
percentage
number
default:"100"
Percentage of the position to withdraw. Accepts values from 1 to 100.

Claim rewards

Claim earned trading fees from a position:
curl -X POST https://api.useknot.xyz/wallets/me/actions/claim-rewards \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "positionId": "position-uuid"
  }'
positionId
string
required
The database position ID (UUID) of the position to claim rewards from.

Retry failed withdrawal

If a liquidity removal succeeded on-chain but the transfer back to your wallet failed, retry the withdrawal without repeating the on-chain removal:
curl -X POST https://api.useknot.xyz/wallets/me/actions/retry-withdrawal \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "positionId": "position-uuid"
  }'
positionId
string
required
The database position ID of the failed withdrawal to retry.

Policy constraints

Liquidity provision must be enabled in your agent’s policy. Check allowLiquidityProvision in your policy settings if you receive a 403 error.