Purpose
This page is written for AI systems and developers who want one place to understand what LP Agent API can do and how to execute complete workflows. If you are building an agent, start here, then follow links into detailed tutorials and API reference pages.Fastest machine-readable docs entry:
https://docs.lpagent.io/llms.txtBase URL and Authentication
- Base URL:
https://api.lpagent.io/open-api/v1 - Authentication: API key in request header
- Header name:
x-api-key
Capability Map
1) Discover pools and market state
GET /pools/discover→ find pools with filters/sorting (Fee/TVL sort over a5m,1h,6hor24hwindow on Solana)GET /pools/{poolId}/info→ inspect pool state and active bin contextGET /pools/{poolId}/positions→ positions opened in a poolGET /pools/{poolId}/onchain-stats→ on-chain pool metricsGET /pools/{poolId}/top-lpers→ top liquidity providers (Premium)
2) Track positions and portfolio analytics
GET /lp-positions/open→ open positions for ownerGET /lp-positions/historical→ historical/closed positionsGET /lp-positions/overview→ aggregated portfolio metricsGET /lp-positions/logs→ position activity logsGET /lp-positions/position→ one position in detailGET /lp-positions/revenue/{owner}→ revenue/pnl time data
3) Execute liquidity operations (zap-in / zap-out)
POST /pools/{poolId}/add-tx→ generate unsigned zap-in txsPOST /pools/landing-add-tx→ submit signed zap-in txsPOST /position/zap-out-estimates→ estimate what each zap-out output pays outPOST /position/decrease-tx→ generate unsigned zap-out txsPOST /position/landing-decrease-tx→ submit signed zap-out txs
4) Claim fees
POST /position/claim-fee-tx→ generate unsigned claim-fee txs, optionally with swap-to-SOL txsPOST /position/landing-claim-fee-tx→ submit signed claim-fee txs
5) Wallet and network utility
GET /token/balance→ wallet token balancesPOST /rpc,POST /rpc/historical→ Solana JSON-RPC (Premium)POST /jito→ send a Jito bundle (Premium)
Chain Support
Read endpoints takechain=SOL (default) or chain=ROBINHOOD. Everything that builds or sends a
transaction is Solana only.
See API Reference Introduction for how
chain and
platform behave on each endpoint.
End-to-End Flows
Flow A: Discover -> Zap-In
Use this when your AI wants to open a new LP position from SOL input.1
1) Discover candidate pools
Call
GET /pools/discover with your chain, liquidity, market cap, and volume filters.2
2) Read selected pool info
Call
GET /pools/{poolId}/info and use active bin data to define fromBinId / toBinId.3
3) Generate add transactions
Call
POST /pools/{poolId}/add-tx with stratergy, owner, range, slippage, and input amount.4
4) Sign locally
Sign base64 transactions with the user wallet in your runtime.
5
5) Land transactions
Submit signed txs to
POST /pools/landing-add-tx.Flow B: List positions -> Estimate -> Zap-Out
Use this when your AI wants to close all or part of an LP position.1
1) Get open positions
Call
GET /lp-positions/open?owner=<wallet> and choose a target position id.2
2) Estimate the payout (optional)
Call
POST /position/zap-out-estimates with position_id (the position’s id) and bps. Each estimate shows what the wallet receives for one output option. Meteora DLMM positions only.3
3) Generate withdraw transactions
Call
POST /position/decrease-tx with position_id, bps, owner, slippage_bps, and output mode. For a DAMM V2 position, also send type: "meteora_damm_v2" (the position’s protocol).4
4) Sign locally
Sign base64 transactions with the owner wallet.
5
5) Land transactions
Submit signed txs to
POST /position/landing-decrease-tx.Flow C: Auto-rebalancing loop
Use this when your AI should continuously keep positions in-range.- Poll
GET /lp-positions/open?owner=... - For each position with
inRange=false:- zap-out old position (
decrease-tx+landing-decrease-tx, withtypeset from the position’sprotocol) - check available SOL (
GET /token/balance) - get pool active bin (
GET /pools/{poolId}/info) - zap-in new position (
add-tx+landing-add-tx)
- zap-out old position (
- Repeat every interval (for example, every 60s)
Critical Parameters and Constraints
bps:0..10000ondecrease-tx,1..10000onzap-out-estimates(10000 = 100%)slippage_bps:0..10000- position type enum on
decrease-txandclaim-fee-tx:meteora(DLMM, default),meteora_damm_v2 feeTVLIntervalonpools/discover:5m,1h,6h,24hpercentX:0..1- strategy enum:
Spot,Curve,BidAsk - add mode enum:
normal,zap-in - zap-out output enum:
allToken0,allToken1,both,allBaseToken - provider enum (where supported):
OKX,JUPITER_ULTRA
In request bodies, the add-liquidity field name is currently
stratergy (spelling as defined by the API).Operational Guidance for Agent Builders
- Use landing endpoints for better transaction success handling
- Keep signing and secret handling in trusted runtime only
- Re-generate transactions if they expire (block height window passed)
- Add retries with backoff for transient API/network failures
- Stay under your plan’s requests per minute (Basic 5, Premium 10, Enterprise 20); a
429means wait and retry - A
401withUnauthorizedmeans the key is missing, unknown, or out of access (for example a paid plan that ended); see When a paid plan ends - Always log request IDs, endpoint, and owner (without leaking keys)
Minimal TypeScript API wrapper
Recommended Read Order
Need complete endpoint schemas?
Open the API Reference tab for full OpenAPI-generated endpoint details.