{ "openapi": "3.0.0", "info": { "title": "LP Agent Open API", "version": "1.0.0", "description": "Public API for LP Agent\n\n**Authentication**\n\nAll endpoints require an API key passed via the `x-api-key` header.\n\n" }, "servers": [ { "url": "https://api.lpagent.io/open-api/v1", "description": "Production" } ], "components": { "securitySchemes": { "apiKeyAuth": { "type": "apiKey", "in": "header", "name": "x-api-key", "description": "API key for authentication" } } }, "security": [ { "apiKeyAuth": [] } ], "paths": { "/lp-positions/opening": { "get": { "summary": "Get opening LP positions for an owner", "description": "Retrieves current liquidity pool positions that are open for a specific wallet owner", "tags": ["Positions"], "parameters": [ { "in": "query", "name": "owner", "required": true, "schema": { "type": "string" }, "description": "Wallet address of the position owner", "example": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM" } ], "responses": { "200": { "description": "Successfully retrieved opening positions", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "count": { "type": "integer", "description": "Total number of positions", "example": 11 }, "data": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "Open" }, "strategyType": { "type": "string", "example": "BidAskImBalanced" }, "tokenId": { "type": "string", "description": "Position ID (token ID)", "example": "Ep22EwKegXis3bTC6P8JLgsHaT5J2beM2TncKe2Hmv24" }, "pairName": { "type": "string", "example": "GP" }, "currentValue": { "type": "string", "example": "53413.446031254" }, "inputValue": { "type": "number", "example": 54754.429180896324 }, "inputNative": { "type": "number", "example": 307.6172496731366 }, "outputValue": { "type": "number", "example": 0 }, "outputNative": { "type": "number", "example": 0 }, "collectedReward": { "type": "number", "example": 0 }, "collectedRewardNative": { "type": "number", "example": 0 }, "collectedFee": { "type": "number", "example": 5625.827591325444 }, "collectedFeeNative": { "type": "number", "example": 31.587863106085184 }, "uncollectedFee": { "type": "string", "example": "0" }, "tickLower": { "type": "integer", "example": -402 }, "tickUpper": { "type": "integer", "example": -333 }, "pool": { "type": "string", "example": "2DeF1QHAQMpNXCGjcsm2pWw1V4KknGtwd2wEh2fTriKC" }, "liquidity": { "type": "string", "example": "0" }, "token0": { "type": "string", "example": "31k88G5Mq7ptbRDf3AM13HAq6wRQHXHikR8hik7wPygk" }, "token1": { "type": "string", "example": "So11111111111111111111111111111111111111112" }, "inRange": { "type": "boolean", "example": true }, "createdAt": { "type": "string", "format": "date-time", "example": "2025-07-25T16:23:04.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "example": "2025-08-01T03:35:38.000Z" }, "pnl": { "type": "object", "properties": { "value": { "type": "number", "example": 1515.548691898919 }, "percent": { "type": "number", "example": 2.7679015461779115 }, "valueNative": { "type": "number", "example": 20.712922225935518 }, "percentNative": { "type": "number", "example": 6.733342245255866 } } }, "pnlNative": { "type": "number", "example": -276.0293865670514 }, "upnl": { "type": "number", "nullable": true, "example": null }, "owner": { "type": "string", "example": "7KHx2Uc5qsqz652eXbu8Qtabi5KLxWJLgxFzcaBzP32i" }, "dpr": { "type": "number", "example": 0.0042857830392432185 }, "dprNative": { "type": "number", "example": 0.01042582025071876 }, "ageHour": { "type": "number", "nullable": true, "example": null }, "decimal0": { "type": "integer", "example": 9 }, "decimal1": { "type": "integer", "example": 9 }, "yield24h": { "type": "number", "nullable": true, "example": null }, "apr": { "type": "number", "nullable": true, "example": null }, "protocol": { "type": "string", "example": "meteora" }, "token0Info": { "type": "object", "properties": { "token_symbol": { "type": "string", "example": "GP" }, "token_name": { "type": "string", "example": "Graphite" }, "token_decimals": { "type": "integer", "example": 9 }, "token_address": { "type": "string", "example": "31k88G5Mq7ptbRDf3AM13HAq6wRQHXHikR8hik7wPygk" }, "logo": { "type": "string", "example": "https://arweave.net/ALLzymnuIihFPhoNUJpPxQzbGI8LodXKhNzXzbRMPbA" } } }, "token1Info": { "type": "object", "properties": { "token_symbol": { "type": "string", "example": "SOL" }, "token_name": { "type": "string", "example": "Wrapped SOL" }, "token_decimals": { "type": "integer", "example": 9 }, "token_address": { "type": "string", "example": "So11111111111111111111111111111111111111112" }, "logo": { "type": "string", "example": "https://www.dextools.io/resources/tokens/logos/3/solana/So11111111111111111111111111111111111111112.jpg" } } }, "poolInfo": { "type": "object", "properties": { "fee": { "type": "integer", "example": 100 }, "tickSpacing": { "type": "integer", "example": 100 } } }, "age": { "type": "string", "example": "6.49" }, "position": { "type": "string", "example": "Ep22EwKegXis3bTC6P8JLgsHaT5J2beM2TncKe2Hmv24" }, "logo0": { "type": "string", "example": "https://token-logo.lpagent.io/api/v1/logo?address=31k88G5Mq7ptbRDf3AM13HAq6wRQHXHikR8hik7wPygk&chain=SOL" }, "logo1": { "type": "string", "example": "https://token-logo.lpagent.io/api/v1/logo?address=So11111111111111111111111111111111111111112&chain=SOL" }, "tokenName0": { "type": "string", "example": "GP" }, "tokenName1": { "type": "string", "example": "SOL" }, "priceRange": { "type": "array", "items": { "type": "number" }, "example": [ 3.1257738735100027, 6.210582680442794, 3.8521785290623467 ] }, "range": { "type": "array", "items": { "type": "integer" }, "example": [-402, -333, -381] }, "value": { "type": "number", "example": 50639.07907119099 }, "valueNative": { "type": "number", "example": 296.7125947462876 }, "current": { "type": "object", "properties": { "amount0": { "type": "string", "example": "6134935664996.8532855" }, "amount1": { "type": "string", "example": "158524771007.10491558" }, "amount0Adjusted": { "type": "number", "example": 6134.935664996853 }, "amount1Adjusted": { "type": "number", "example": 158.52477100710493 } } }, "unCollectedFee0": { "type": "number", "example": 1.31917386 }, "unCollectedFee1": { "type": "number", "example": 0 }, "unCollectedFee": { "type": "number", "example": 5.071210278816663 }, "unCollectedFeeNative": { "type": "number", "example": 0.029714046699316238 }, "price0": { "type": "number", "example": 3.844231933777601 }, "price1": { "type": "number", "example": 170.66710334453902 }, "id": { "type": "string", "example": "1dfc9575a268b50f1848f732eb8bca84:ff76fef2591c25fbfb32279f17372a60ad69577aaf06163dd2c980b369736e89422c35ef5f6b5cdbe66861e4acfabbec" }, "logs": { "type": "array", "items": { "type": "object" }, "example": [] } } } } } } } } }, "400": { "description": "Bad request - owner parameter is required", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "owner is required" } } } } } }, "500": { "description": "Internal server error" } } } }, "/lp-positions/historical": { "get": { "summary": "Get historical LP positions for an owner", "description": "Retrieves historical liquidity pool positions for a specific wallet owner", "tags": ["Positions"], "parameters": [ { "in": "query", "name": "owner", "required": true, "schema": { "type": "string" }, "description": "Wallet address of the position owner", "example": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM" }, { "in": "query", "name": "from_date", "schema": { "type": "string", "format": "date-time" }, "description": "Start date for filtering positions", "example": "2025-01-01T00:00:00Z" }, { "in": "query", "name": "to_date", "schema": { "type": "string", "format": "date-time" }, "description": "End date for filtering positions", "example": "2025-09-01T00:00:00Z" }, { "in": "query", "name": "page", "schema": { "type": "integer", "default": 1 }, "description": "Page number for pagination" }, { "in": "query", "name": "limit", "schema": { "type": "integer", "default": 20 }, "description": "Number of items per page" } ], "responses": { "200": { "description": "Successfully retrieved historical positions", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "Close" }, "strategyType": { "type": "string", "example": "SpotImBalanced" }, "tokenId": { "type": "string", "description": "Position ID (token ID)", "example": "EAKJUJDFjRNQ6guA3Q1xqkfZ2ArXxKGL2LUQn69nZ6w7" }, "pairName": { "type": "string", "example": "STARTUP" }, "currentValue": { "type": "string", "example": "23.6413056088255" }, "inputValue": { "type": "number", "example": 23.641305608825547 }, "inputNative": { "type": "number", "example": 0.13232864407362593 }, "outputValue": { "type": "number", "example": 23.487261686308557 }, "outputNative": { "type": "number", "example": 0.13143240986197438 }, "collectedReward": { "type": "number", "example": 0 }, "collectedRewardNative": { "type": "number", "example": 0 }, "collectedFee": { "type": "number", "example": 0 }, "collectedFeeNative": { "type": "number", "example": 0 }, "uncollectedFee": { "type": "string", "example": "0" }, "tickLower": { "type": "integer", "example": -4501 }, "tickUpper": { "type": "integer", "example": -4431 }, "pool": { "type": "string", "example": "UUVJ9rVGVtMyEnLi473xyS7teC1PLg3oCWhVs1c1jpU" }, "liquidity": { "type": "string", "example": "0" }, "token0": { "type": "string", "example": "97PVGU2DzFqsAWaYU17ZBqGvQFmkqtdMywYBNPAfy8vy" }, "token1": { "type": "string", "example": "So11111111111111111111111111111111111111112" }, "inRange": { "type": "boolean", "example": true }, "createdAt": { "type": "string", "format": "date-time", "example": "2025-07-30T16:03:34.000Z" }, "updatedAt": { "type": "string", "format": "date-time", "example": "2025-07-30T16:03:45.000Z" }, "pnl": { "type": "object", "properties": { "value": { "type": "number", "example": -0.1540439225169905 }, "valueNative": { "type": "number", "example": -0.0008962342116515531 }, "percent": { "type": "number", "example": -0.6515880512939365 }, "percentNative": { "type": "number", "example": -0.6772790713043958 } } }, "pnlNative": { "type": "number", "example": -0.0008962342116515531 }, "upnl": { "type": "number", "nullable": true, "example": null }, "owner": { "type": "string", "example": "DMQ7mJ8DTXYLoc1g1NpSv7jtDdaCzsLUdzvvY8MA4hbX" }, "dpr": { "type": "number", "example": -51.17927966526919 }, "dprNative": { "type": "number", "example": -53.19719250972708 }, "ageHour": { "type": "string", "example": "0.00305555555555555556" }, "decimal0": { "type": "integer", "example": 9 }, "decimal1": { "type": "integer", "example": 9 }, "yield24h": { "type": "number", "nullable": true, "example": null }, "apr": { "type": "number", "nullable": true, "example": null }, "protocol": { "type": "string", "example": "meteora" }, "token0Info": { "type": "object", "properties": { "token_symbol": { "type": "string", "example": "STARTUP" }, "token_name": { "type": "string", "example": "Startup" }, "token_decimals": { "type": "integer", "example": 9 }, "token_address": { "type": "string", "example": "97PVGU2DzFqsAWaYU17ZBqGvQFmkqtdMywYBNPAfy8vy" }, "logo": { "type": "string", "nullable": true, "example": null } } }, "token1Info": { "type": "object", "properties": { "token_symbol": { "type": "string", "example": "SOL" }, "token_name": { "type": "string", "example": "Wrapped SOL" }, "token_decimals": { "type": "integer", "example": 9 }, "token_address": { "type": "string", "example": "So11111111111111111111111111111111111111112" }, "logo": { "type": "string", "example": "https://www.dextools.io/resources/tokens/logos/3/solana/So11111111111111111111111111111111111111112.jpg" } } }, "poolInfo": { "type": "object", "properties": { "fee": { "type": "integer", "example": 20 }, "tickSpacing": { "type": "integer", "example": 20 } } }, "age": { "type": "string", "example": "0.00" }, "position": { "type": "string", "example": "EAKJUJDFjRNQ6guA3Q1xqkfZ2ArXxKGL2LUQn69nZ6w7" }, "logo0": { "type": "string", "example": "https://token-logo.lpagent.io/api/v1/logo?address=97PVGU2DzFqsAWaYU17ZBqGvQFmkqtdMywYBNPAfy8vy&chain=SOL" }, "logo1": { "type": "string", "example": "https://token-logo.lpagent.io/api/v1/logo?address=So11111111111111111111111111111111111111112&chain=SOL" }, "tokenName0": { "type": "string", "example": "STARTUP" }, "tokenName1": { "type": "string", "example": "SOL" }, "priceRange": { "type": "array", "items": { "type": "number" }, "example": [ 0.02119779171413261, 0.024379855528418568, 0.01839426300470885 ] }, "value": { "type": "number", "example": 23.641305608825547 }, "valueNative": { "type": "number", "example": 0.13232864407362593 }, "close_At": { "type": "string", "format": "date-time", "example": "2025-07-30T16:03:45.000Z" }, "closeAt": { "type": "string", "format": "date-time", "example": "2025-07-30T16:03:45.000Z" }, "fee": { "type": "number", "example": 0 }, "feeNative": { "type": "number", "example": 0 }, "feePercent": { "type": "number", "example": 0 }, "feePercentNative": { "type": "number", "example": 0 }, "creationType": { "type": "string", "example": "AUTO" }, "pnlNativeAudited": { "type": "number", "example": -0.004338157999999981 }, "solInAudited": { "type": "number", "example": 0.192444558 }, "solOutAudited": { "type": "number", "example": 0.1881064 }, "followInfo": { "type": "object", "properties": { "sourceOwner": { "type": "string", "example": "7KHx2Uc5qsqz652eXbu8Qtabi5KLxWJLgxFzcaBzP32i" }, "sourceLabel": { "type": "string", "example": "cromatoforo" }, "sourceTokenId": { "type": "string", "example": "9DJ1vtDHs3x8yQCoPRBwMqFsUQAa7VtufsnoPe11kU2Q" } } } } } }, "pagination": { "type": "object", "properties": { "currentPage": { "type": "integer", "example": 1 }, "totalPages": { "type": "integer", "example": 111 }, "totalCount": { "type": "integer", "example": 1329 }, "pageSize": { "type": "integer", "example": 12 } } } } } } } } } }, "400": { "description": "Bad request - owner parameter is required", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "owner is required" } } } } } }, "500": { "description": "Internal server error" } } } }, "/lp-positions/overview": { "get": { "summary": "Get overview metrics for LP positions", "description": "Retrieves comprehensive overview and metrics for liquidity pool positions of a specific owner", "tags": ["Positions"], "parameters": [ { "in": "query", "name": "owner", "required": true, "schema": { "type": "string" }, "description": "Wallet address of the position owner", "example": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM" }, { "in": "query", "name": "protocol", "schema": { "type": "string", "default": "meteora" }, "description": "Protocol to filter by (e.g., meteora, orca)" } ], "responses": { "200": { "description": "Successfully retrieved overview data", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "owner": { "type": "string", "description": "Wallet address of the owner", "example": "DMQ7mJ8DTXYLoc1g1NpSv7jtDdaCzsLUdzvvY8MA4hbX" }, "chain": { "type": "string", "description": "Blockchain chain (e.g., SOL)", "example": "SOL" }, "protocol": { "type": "string", "description": "Protocol name (e.g., meteora, orca)", "example": "meteora" }, "total_inflow": { "type": "number", "description": "Total inflow amount", "example": 1586491.3551108437 }, "avg_inflow": { "type": "object", "description": "Average inflow with time ranges", "properties": { "ALL": { "type": "number", "example": 1233.6635731810604 }, "7D": { "type": "number", "example": 1009.8441703184694 }, "1M": { "type": "number", "example": 1895.4839197467682 }, "3M": { "type": "number", "example": 1243.036011296495 }, "1Y": { "type": "number", "example": 1233.66357318106 }, "YTD": { "type": "number", "example": 1233.66357318106 } } }, "total_outflow": { "type": "number", "description": "Total outflow amount", "example": 1578323.345425783 }, "total_fee": { "type": "object", "description": "Total fees with time ranges", "properties": { "ALL": { "type": "number", "example": 12516.614685851924 }, "7D": { "type": "number", "example": 4.262212981880845 }, "1M": { "type": "number", "example": 7404.187815729953 }, "3M": { "type": "number", "example": 12498.147067807171 }, "1Y": { "type": "number", "example": 12516.614685851926 }, "YTD": { "type": "number", "example": 12516.614685851926 } } }, "total_reward": { "type": "number", "description": "Total rewards earned", "example": 0 }, "total_pnl": { "type": "object", "description": "Total profit and loss with time ranges", "properties": { "ALL": { "type": "number", "example": 4323.2505549474245 }, "7D": { "type": "number", "example": -85.02276020207705 }, "1M": { "type": "number", "example": 3502.31375643287 }, "3M": { "type": "number", "example": 4315.87760395399 }, "1Y": { "type": "number", "example": 4323.250554947427 }, "YTD": { "type": "number", "example": 4323.250554947427 } } }, "total_inflow_native": { "type": "number", "description": "Total inflow in native token", "example": 10585.562828397458 }, "avg_inflow_native": { "type": "object", "description": "Average inflow in native token with time ranges", "properties": { "ALL": { "type": "number", "example": 8.231386336234415 }, "7D": { "type": "number", "example": 5.388384469621412 }, "1M": { "type": "number", "example": 12.475841877745875 }, "3M": { "type": "number", "example": 8.29392670708921 }, "1Y": { "type": "number", "example": 8.231386336234413 }, "YTD": { "type": "number", "example": 8.231386336234413 } } }, "total_outflow_native": { "type": "number", "description": "Total outflow in native token", "example": 10529.299449727307 }, "total_fee_native": { "type": "object", "description": "Total fees in native token with time ranges", "properties": { "ALL": { "type": "number", "example": 83.4853120103325 }, "7D": { "type": "number", "example": 0.022746553186898555 }, "1M": { "type": "number", "example": 48.820621387493105 }, "3M": { "type": "number", "example": 83.36295390095411 }, "1Y": { "type": "number", "example": 83.48531201033254 }, "YTD": { "type": "number", "example": 83.48531201033254 } } }, "total_reward_native": { "type": "number", "description": "Total rewards in native token", "example": 0 }, "total_pnl_native": { "type": "object", "description": "Total PnL in native token with time ranges", "properties": { "ALL": { "type": "number", "example": 8.756756271321922 }, "7D": { "type": "number", "example": -0.02289659499999974 }, "1M": { "type": "number", "example": 11.766254518455375 }, "3M": { "type": "number", "example": 8.70741865915985 }, "1Y": { "type": "number", "example": 8.756756271321928 }, "YTD": { "type": "number", "example": 8.756756271321928 } } }, "avg_age_hour": { "type": "number", "description": "Average position age in hours", "example": 2.1423017107309485 }, "total_lp": { "type": "string", "description": "Total number of LP positions", "example": "1294" }, "win_lp": { "type": "string", "description": "Number of winning LP positions", "example": "403" }, "win_lp_native": { "type": "string", "description": "Number of winning LP positions in native token", "example": "229" }, "closed_lp": { "type": "object", "description": "Closed LP positions with time ranges", "properties": { "ALL": { "type": "string", "example": "1286" }, "7D": { "type": "integer", "example": 13 }, "1M": { "type": "integer", "example": 515 }, "3M": { "type": "integer", "example": 1276 }, "1Y": { "type": "integer", "example": 1286 }, "YTD": { "type": "integer", "example": 1286 } } }, "opening_lp": { "type": "string", "description": "Number of opening LP positions", "example": "8" }, "total_pool": { "type": "string", "description": "Total number of pools", "example": "188" }, "win_rate": { "type": "object", "description": "Win rate with time ranges", "properties": { "ALL": { "type": "number", "example": 0.533068783068783 }, "7D": { "type": "number", "example": 0.16666666666666666 }, "1M": { "type": "number", "example": 0.5786163522012578 }, "3M": { "type": "number", "example": 0.5327102803738317 }, "1Y": { "type": "number", "example": 0.533068783068783 }, "YTD": { "type": "number", "example": 0.533068783068783 } } }, "win_rate_native": { "type": "object", "description": "Win rate in native token with time ranges", "properties": { "ALL": { "type": "number", "example": 0.6835820895522388 }, "7D": { "type": "number", "example": 0 }, "1M": { "type": "number", "example": 0.6942675159235668 }, "3M": { "type": "number", "example": 0.6848484848484848 }, "1Y": { "type": "number", "example": 0.6835820895522388 }, "YTD": { "type": "number", "example": 0.6835820895522388 } } }, "expected_value": { "type": "object", "description": "Expected value with time ranges", "properties": { "ALL": { "type": "number", "example": 5.718585390142092 }, "7D": { "type": "number", "example": -14.17046003367951 }, "1M": { "type": "number", "example": 11.013565271801475 }, "3M": { "type": "number", "example": 5.762186387121481 }, "1Y": { "type": "number", "example": 5.7185853901420955 }, "YTD": { "type": "number", "example": 5.7185853901420955 } } }, "expected_value_native": { "type": "object", "description": "Expected value in native token with time ranges", "properties": { "ALL": { "type": "number", "example": 0.026139570959169856 }, "7D": { "type": "number", "example": -0.02289659499999974 }, "1M": { "type": "number", "example": 0.07494429629589411 }, "3M": { "type": "number", "example": 0.026386117148969213 }, "1Y": { "type": "number", "example": 0.02613957095916991 }, "YTD": { "type": "number", "example": 0.02613957095916991 } } }, "fee_percent": { "type": "number", "description": "Fee percentage", "example": 0.007889494415163342 }, "fee_percent_native": { "type": "number", "description": "Fee percentage in native token", "example": 0.0078867145152046 }, "apr": { "type": "number", "description": "Annual percentage rate", "example": 17678030.44344193 }, "roi": { "type": "number", "description": "Return on investment", "example": 0.0027250388355538006 }, "roi_avg_inflow": { "type": "number", "description": "ROI based on average inflow", "example": 0.004635449659420882 }, "roi_avg_inflow_native": { "type": "number", "description": "ROI based on average inflow in native token", "example": 0.0031755976322122067 }, "first_activity": { "type": "string", "description": "First activity timestamp", "example": "2025-04-25 01:37:08.000" }, "last_activity": { "type": "string", "description": "Last activity timestamp", "example": "2025-07-30 16:03:45.000" }, "avg_pos_profit": { "type": "number", "description": "Average position profit", "example": 5.7185853901420955 }, "avg_pos_profit_native": { "type": "number", "description": "Average position profit in native token", "example": 0.026139570959169918 }, "avg_monthly_profit_percent": { "type": "number", "description": "Average monthly profit percentage", "example": 0.004306823066304065 }, "avg_monthly_pnl": { "type": "number", "description": "Average monthly PnL", "example": 1080.8126387368566 }, "avg_monthly_inflow": { "type": "number", "description": "Average monthly inflow", "example": 396622.8387777108 }, "avg_monthly_profit_percent_native": { "type": "number", "description": "Average monthly profit percentage in native token", "example": 0.005537899372724309 }, "avg_monthly_pnl_native": { "type": "number", "description": "Average monthly PnL in native token", "example": 2.1891890678304833 }, "avg_monthly_inflow_native": { "type": "number", "description": "Average monthly inflow in native token", "example": 2646.390707099365 }, "updated_at": { "type": "string", "description": "Last update timestamp", "example": "2025-07-30 17:02:36" } } } } } } } }, "400": { "description": "Bad request - owner parameter is required", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "owner is required" } } } } } }, "404": { "description": "Owner overview not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "Owner overview not found" } } } } } }, "500": { "description": "Internal server error" } } } }, "/lp-positions/logs": { "get": { "summary": "Get logs for LP positions", "description": "Retrieves transaction logs for liquidity pool positions. Can fetch logs for a specific position or for all positions of an owner.", "tags": ["Positions"], "parameters": [ { "in": "query", "name": "position", "schema": { "type": "string" }, "description": "Position ID (token ID)", "example": "Ep22EwKegXis3bTC6P8JLgsHaT5J2beM2TncKe2Hmv24" }, { "in": "query", "name": "chain", "schema": { "type": "string", "default": "SOL" }, "description": "Blockchain chain identifier", "example": "SOL" }, { "in": "query", "name": "owner", "schema": { "type": "string" }, "description": "Wallet address of the position owner (required for public access)", "example": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM" } ], "responses": { "200": { "description": "Successfully retrieved position logs", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "count": { "type": "integer", "description": "Total number of logs", "example": 45 }, "data": { "type": "array", "items": { "type": "object", "properties": { "owner": { "type": "string", "description": "Position owner wallet address", "example": "7KHx2Uc5qsqz652eXbu8Qtabi5KLxWJLgxFzcaBzP32i" }, "action": { "type": "string", "description": "Type of action performed", "example": "add_liquidity" }, "amount0": { "type": "string", "description": "Amount of token0 involved in the transaction", "example": "1000000000" }, "amount1": { "type": "string", "description": "Amount of token1 involved in the transaction", "example": "500000000" }, "decimal0": { "type": "integer", "description": "Decimal places for token0", "example": 9 }, "decimal1": { "type": "integer", "description": "Decimal places for token1", "example": 9 }, "price0": { "type": "string", "description": "Price of token0 at time of transaction", "example": "3.844231933777601" }, "price1": { "type": "string", "description": "Price of token1 at time of transaction", "example": "170.66710334453902" }, "timestamp": { "type": "string", "format": "date-time", "description": "Transaction timestamp", "example": "2025-07-25T16:23:04.000Z" }, "nativePrice": { "type": "string", "nullable": true, "description": "Price in native currency (SOL)", "example": "178.45" }, "strategyType": { "type": "string", "nullable": true, "description": "Strategy type used for the position", "example": "BidAskImBalanced" }, "tickUpper": { "type": "integer", "nullable": true, "description": "Upper tick boundary", "example": -333 }, "tickLower": { "type": "integer", "nullable": true, "description": "Lower tick boundary", "example": -402 }, "bps": { "type": "integer", "nullable": true, "description": "Basis points for fee calculation", "example": 100 }, "logo0": { "type": "string", "nullable": true, "description": "Logo URL for token0", "example": "https://token-logo.lpagent.io/api/v1/logo?address=31k88G5Mq7ptbRDf3AM13HAq6wRQHXHikR8hik7wPygk&chain=SOL" }, "logo1": { "type": "string", "nullable": true, "description": "Logo URL for token1", "example": "https://token-logo.lpagent.io/api/v1/logo?address=So11111111111111111111111111111111111111112&chain=SOL" } } } } } } } } }, "400": { "description": "Bad request - position or owner parameter is required", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "error" }, "message": { "type": "string", "example": "position or owner parameter is required" } } } } } }, "500": { "description": "Internal server error" } } } }, "/token/balance": { "get": { "summary": "Get token balances for a wallet address", "description": "Returns all token balances (SOL and SPL tokens) for the specified wallet address", "tags": ["Token"], "parameters": [ { "in": "query", "name": "owner", "schema": { "type": "string" }, "required": true, "description": "The wallet address to get balances for", "example": "Ff8v35AC52qYrKUDvmzAapyd8UBYZFHCxzE5Puo1cuVU" }, { "in": "query", "name": "ca", "schema": { "type": "string" }, "description": "Comma-separated list of token contract addresses to filter by" } ], "responses": { "200": { "description": "Token balances retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "tokenAddress": { "type": "string", "description": "The token address (mint address)", "example": "So11111111111111111111111111111111111111112" }, "balance": { "type": "number", "description": "Token balance in human-readable format", "example": 1.5 }, "rawBalance": { "type": "string", "description": "Token balance in raw format (smallest unit)", "example": "1500000000" }, "symbol": { "type": "string", "description": "Token symbol", "example": "SOL" }, "decimals": { "type": "number", "description": "Token decimals", "example": 9 }, "logo": { "type": "string", "description": "Token logo URL", "example": "https://example.com/logo.png" }, "balanceInUsd": { "type": "number", "description": "Balance value in USD", "example": 150.75 }, "price": { "type": "number", "description": "Token price in USD", "example": 100.5 } } } } } } } } }, "400": { "description": "Invalid request - owner parameter is required" }, "500": { "description": "Internal server error" } } } }, "/pools/discover": { "get": { "summary": "Discover pools", "description": "Retrieve a list of pools with filtering, sorting, and pagination", "tags": ["Pools"], "parameters": [ { "in": "query", "name": "chain", "schema": { "type": "string", "default": "SOL" }, "description": "The blockchain network" }, { "in": "query", "name": "sortBy", "schema": { "type": "string", "enum": [ "mcap", "created_at", "vol_24h", "tvl", "fee_tvl_ratio", "volatility" ], "default": "mcap" }, "description": "Field to sort pools by" }, { "in": "query", "name": "sortOrder", "schema": { "type": "string", "enum": ["asc", "desc", "default"], "default": "desc" }, "description": "Sort order direction" }, { "in": "query", "name": "page", "schema": { "type": "integer", "minimum": 1, "default": 1 }, "description": "Page number for pagination" }, { "in": "query", "name": "pageSize", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 10 }, "description": "Number of items per page" }, { "in": "query", "name": "feeTVLInterval", "schema": { "type": "string", "enum": ["5m", "1h", "6h", "24h"], "default": "24h" }, "description": "Time interval for fee/TVL ratio calculation" }, { "in": "query", "name": "quote_token", "schema": { "type": "string" }, "description": "Filter by quote token address" }, { "in": "query", "name": "min_market_cap", "schema": { "type": "number" }, "description": "Minimum market cap filter" }, { "in": "query", "name": "max_market_cap", "schema": { "type": "number" }, "description": "Maximum market cap filter" }, { "in": "query", "name": "min_bin_step", "schema": { "type": "number" }, "description": "Minimum bin step filter" }, { "in": "query", "name": "max_bin_step", "schema": { "type": "number" }, "description": "Maximum bin step filter" }, { "in": "query", "name": "min_organic_score", "schema": { "type": "number" }, "description": "Minimum organic score filter" }, { "in": "query", "name": "max_organic_score", "schema": { "type": "number" }, "description": "Maximum organic score filter" }, { "in": "query", "name": "min_base_fee", "schema": { "type": "number" }, "description": "Minimum base fee filter" }, { "in": "query", "name": "max_base_fee", "schema": { "type": "number" }, "description": "Maximum base fee filter" }, { "in": "query", "name": "min_age_hr", "schema": { "type": "number" }, "description": "Minimum pool age in hours" }, { "in": "query", "name": "max_age_hr", "schema": { "type": "number" }, "description": "Maximum pool age in hours" }, { "in": "query", "name": "min_liquidity", "schema": { "type": "number" }, "description": "Minimum liquidity filter" }, { "in": "query", "name": "max_liquidity", "schema": { "type": "number" }, "description": "Maximum liquidity filter" }, { "in": "query", "name": "min_24h_fees", "schema": { "type": "number" }, "description": "Minimum 24h fees filter" }, { "in": "query", "name": "max_24h_fees", "schema": { "type": "number" }, "description": "Maximum 24h fees filter" }, { "in": "query", "name": "min_24h_vol", "schema": { "type": "number" }, "description": "Minimum 24h volume filter" }, { "in": "query", "name": "max_24h_vol", "schema": { "type": "number" }, "description": "Maximum 24h volume filter" }, { "in": "query", "name": "min_1h_vol", "schema": { "type": "number" }, "description": "Minimum 1h volume filter" }, { "in": "query", "name": "max_1h_vol", "schema": { "type": "number" }, "description": "Maximum 1h volume filter" }, { "in": "query", "name": "type", "schema": { "type": "string", "default": "all" }, "description": "Pool type filter. `meteora` for dlmm and `meteora_damm_v2` for DAMM V2" }, { "in": "query", "name": "search", "schema": { "type": "string" }, "description": "Search by pool name or token address" } ], "responses": { "200": { "description": "Successfully retrieved pools", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "pool": { "type": "string", "description": "Pool address", "example": "5rCfABCxyz123" }, "tvl": { "type": "number", "description": "Total value locked", "example": 125000.5 }, "fee": { "type": "number", "description": "Pool fee rate", "example": 0.003 }, "protocol": { "type": "string", "description": "Protocol name", "example": "meteora" }, "chain": { "type": "string", "example": "SOL" }, "token0": { "type": "string", "description": "Token X mint address", "example": "So11111111111111111111111111111111111111112" }, "token1": { "type": "string", "description": "Token Y mint address" }, "vol_5m": { "type": "number", "description": "Volume in last 5 minutes" }, "vol_1h": { "type": "number", "description": "Volume in last 1 hour" }, "vol_6h": { "type": "number", "description": "Volume in last 6 hours" }, "vol_24h": { "type": "number", "description": "Volume in last 24 hours", "example": 800000 }, "base_price": { "type": "number", "description": "Base token price in USD", "example": 150.25 }, "quote_price": { "type": "number", "description": "Quote token price in USD", "example": 1 }, "mcap": { "type": "number", "description": "Market cap", "example": 50000000 }, "usd_price": { "type": "number", "description": "Token USD price" }, "fdv": { "type": "number", "description": "Fully diluted valuation" }, "organic_score": { "type": "number", "description": "Organic trading score", "example": 75 }, "top_holder": { "type": "number", "description": "Top holder percentage" }, "mint_freeze": { "type": "boolean", "description": "Whether mint/freeze authority is enabled" }, "price_5m_change": { "type": "number", "description": "Price change in last 5 minutes" }, "price_1h_change": { "type": "number", "description": "Price change in last 1 hour" }, "price_6h_change": { "type": "number", "description": "Price change in last 6 hours" }, "price_24h_change": { "type": "number", "description": "Price change in last 24 hours" }, "bin_step": { "type": "number", "description": "Bin step size", "example": 10 }, "liquidity_token0": { "type": "number", "description": "Liquidity of token X" }, "liquidity_token1": { "type": "number", "description": "Liquidity of token Y" }, "created_at": { "type": "string", "format": "date-time", "description": "Pool creation time" }, "updated_at": { "type": "string", "format": "date-time" }, "first_pool_created_at": { "type": "string", "format": "date-time" }, "token0_symbol": { "type": "string", "nullable": true, "example": "SOL" }, "token0_name": { "type": "string", "nullable": true, "example": "Solana" }, "token0_decimals": { "type": "number", "nullable": true, "example": 9 }, "token1_symbol": { "type": "string", "nullable": true, "example": "USDC" }, "token1_name": { "type": "string", "nullable": true }, "token1_decimals": { "type": "number", "nullable": true }, "token0_stats": { "type": "object", "nullable": true, "description": "Token X trading stats from Jupiter", "properties": { "volume": { "type": "object", "properties": { "stats1h": { "type": "object", "properties": { "volume": { "type": "number" }, "volume_change": { "type": "number" } } }, "stats6h": { "type": "object", "properties": { "volume": { "type": "number" }, "volume_change": { "type": "number" } } }, "stats24h": { "type": "object", "properties": { "volume": { "type": "number" }, "volume_change": { "type": "number" } } } } }, "holders": { "type": "number" } } }, "token1_stats": { "type": "object", "nullable": true, "description": "Token Y trading stats from Jupiter" } } } }, "pagination": { "type": "object", "properties": { "currentPage": { "type": "integer" }, "pageSize": { "type": "integer" }, "totalCount": { "type": "integer" }, "totalPages": { "type": "integer" }, "hasNextPage": { "type": "boolean" }, "hasPreviousPage": { "type": "boolean" } } } } } } } }, "500": { "description": "Internal server error" } } } }, "/pools/{poolId}/info": { "get": { "summary": "Get detailed information for a specific pool", "description": "Retrieve token info, liquidity visualization, and pool data for a specific pool", "tags": ["Pools"], "parameters": [ { "in": "path", "name": "poolId", "required": true, "schema": { "type": "string" }, "description": "The pool address", "example": "7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM" } ], "responses": { "200": { "description": "Successfully retrieved pool info", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "type": { "type": "string", "description": "Pool protocol type", "enum": ["meteora", "meteora_damm_v2"], "example": "meteora" }, "tokenInfo": { "type": "array", "description": "Tuple of two token info results [tokenX, tokenY]", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "symbol": { "type": "string" }, "icon": { "type": "string" }, "decimals": { "type": "number" }, "mcap": { "type": "number" }, "fdv": { "type": "number" }, "usdPrice": { "type": "number" }, "organicScore": { "type": "number" }, "holderCount": { "type": "number" } } } } } } }, "poolStats": { "type": "object", "nullable": true, "description": "Pool stats from database (tvl, fee, volumes, etc.)" }, "poolState": { "type": "object", "description": "Raw on-chain pool state" }, "poolDb": { "type": "object", "nullable": true, "description": "Pool data from database" }, "amountX": { "type": "number", "description": "TVL of token X", "example": 1500.25 }, "amountY": { "type": "number", "description": "TVL of token Y", "example": 50000 }, "feeInfo": { "type": "object", "description": "Fee configuration", "properties": { "baseFeeRatePercentage": { "type": "number" }, "maxFeeRatePercentage": { "type": "number" }, "protocolFeePercentage": { "type": "number" }, "dynamicFee": { "type": "number" } } }, "feeStats": { "type": "array", "description": "Hourly fee stats for the last 7 days", "items": { "type": "object" } }, "liquidityViz": { "type": "object", "description": "Liquidity visualization data (DLMM pools only)", "properties": { "activeBin": { "type": "object", "properties": { "binId": { "type": "integer" }, "price": { "type": "string" }, "pricePerToken": { "type": "string" } } }, "bins": { "type": "array", "items": { "type": "object", "properties": { "binId": { "type": "integer" }, "xAmount": { "type": "number" }, "yAmount": { "type": "number" }, "price": { "type": "string" }, "pricePerToken": { "type": "string" } } } } } } } } } } } } }, "500": { "description": "Internal server error" } } } }, "/pools/{poolId}/positions": { "get": { "summary": "Get positions for a specific pool", "description": "Retrieve all positions associated with a specific pool along with position state and pricing info", "tags": ["Pools"], "parameters": [ { "in": "path", "name": "poolId", "required": true, "schema": { "type": "string" }, "description": "The pool address", "example": "7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM" }, { "in": "query", "name": "owner", "schema": { "type": "string" }, "description": "Filter by position owner" }, { "in": "query", "name": "status", "schema": { "type": "string", "enum": ["Open", "Close"] }, "description": "Filter by position status" }, { "in": "query", "name": "page", "schema": { "type": "integer", "minimum": 1, "default": 1 }, "description": "Page number for pagination" }, { "in": "query", "name": "pageSize", "schema": { "type": "integer", "minimum": 1, "maximum": 20, "default": 20 }, "description": "Number of items per page" }, { "in": "query", "name": "order_by", "schema": { "type": "string", "default": "inputNative" }, "description": "Field to order results by" }, { "in": "query", "name": "sort_order", "schema": { "type": "string", "default": "desc" }, "description": "Sort order direction (asc or desc)" }, { "in": "query", "name": "platform", "schema": { "type": "string" }, "description": "Filter by platform" }, { "in": "query", "name": "pnl_threshold", "schema": { "type": "number" }, "description": "Filter by PNL threshold" }, { "in": "query", "name": "pnl_native_threshold", "schema": { "type": "number" }, "description": "Filter by native PNL threshold" } ], "responses": { "200": { "description": "Successfully retrieved pool positions", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "pagination": { "type": "object", "properties": { "page": { "type": "integer" }, "pageSize": { "type": "integer" }, "total": { "type": "integer" }, "totalPages": { "type": "integer" } } }, "positions": { "type": "array", "description": "Array of position objects", "items": { "type": "object" } }, "positionState": { "type": "array", "description": "Bin data for each position (DLMM pools only)", "items": { "type": "object", "properties": { "positionId": { "type": "string" }, "positionData": { "type": "array", "items": { "type": "object", "properties": { "binId": { "type": "integer" }, "price": { "type": "string" }, "pricePerToken": { "type": "string" }, "binXAmount": { "type": "string" }, "binYAmount": { "type": "string" }, "positionXAmount": { "type": "string" }, "positionYAmount": { "type": "string" }, "feeX": { "type": "string" }, "feeY": { "type": "string" } } } } } } }, "activeBin": { "type": "object", "description": "Active bin info (DLMM pools only)", "properties": { "binId": { "type": "integer" }, "price": { "type": "string" }, "pricePerToken": { "type": "string" } } }, "prices": { "type": "object", "description": "Token prices map (tokenAddress -> priceInUsd)", "additionalProperties": { "type": "number" } } } } } } } } }, "400": { "description": "Invalid request parameters" }, "500": { "description": "Internal server error" } } } }, "/pools/{poolId}/onchain-stats": { "get": { "summary": "Get onchain statistics for a specific pool", "description": "Retrieve aggregated statistics including total open positions, input values, and unique users for a pool", "tags": ["Pools"], "parameters": [ { "in": "path", "name": "poolId", "required": true, "schema": { "type": "string" }, "description": "The pool address", "example": "7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM" } ], "responses": { "200": { "description": "Successfully retrieved pool onchain stats", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "poolStats": { "type": "array", "items": { "type": "object", "properties": { "pool": { "type": "string", "description": "Pool address", "example": "7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM" }, "total_open_positions": { "type": "number", "description": "Count of open positions", "example": 42 }, "unique_owners": { "type": "number", "description": "Count of distinct position owners", "example": 15 }, "total_input_value": { "type": "number", "description": "Total input value in USD", "example": 0 }, "total_input_native": { "type": "number", "description": "Total input value in native token", "example": 0 } } } } } } } } } } }, "404": { "description": "No data found for the pool" }, "500": { "description": "Internal server error" } } } }, "/pools/{poolId}/top-lpers": { "get": { "summary": "Get top LPers for a pool", "description": "Retrieve ranked LP providers for a pool with pagination and sorting.\n\n**Plan:** Requires an active **Premium** or **Enterprise** API key. Free-plan keys receive `401`.\n", "tags": ["Pools"], "parameters": [ { "in": "path", "name": "poolId", "required": true, "schema": { "type": "string" }, "description": "Pool address", "example": "7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM" }, { "in": "query", "name": "order_by", "schema": { "type": "string" }, "description": "Column to sort by" }, { "in": "query", "name": "sort_order", "schema": { "type": "string", "enum": ["asc", "desc"], "default": "desc" }, "description": "Sort direction" }, { "in": "query", "name": "page", "schema": { "type": "integer", "minimum": 1, "default": 1 }, "description": "Page number" }, { "in": "query", "name": "limit", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }, "description": "Page size" } ], "responses": { "200": { "description": "Successfully retrieved LPers", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "pool": { "type": "string", "description": "Pool address" }, "owner": { "type": "string", "description": "Wallet address" }, "protocol": { "type": "string", "example": "meteora" }, "token0": { "type": "string", "description": "Token X mint address" }, "token1": { "type": "string", "description": "Token Y mint address" }, "total_inflow": { "type": "number", "description": "Total USD deposited" }, "avg_inflow": { "type": "number", "description": "Average USD inflow per LP" }, "total_outflow": { "type": "number", "description": "Total USD withdrawn" }, "total_fee": { "type": "number", "description": "Total fees earned (USD)" }, "total_pnl": { "type": "number", "description": "Total PnL (USD)" }, "total_inflow_native": { "type": "number", "description": "Total inflow in native token" }, "avg_inflow_native": { "type": "number" }, "total_outflow_native": { "type": "number" }, "total_reward": { "type": "number", "description": "Total rewards (USD)" }, "total_fee_native": { "type": "number" }, "total_reward_native": { "type": "number" }, "total_pnl_native": { "type": "number", "description": "Total PnL in native token" }, "total_lp": { "type": "number", "description": "Total number of LP positions" }, "avg_age_hour": { "type": "number", "description": "Average position age in hours" }, "win_lp": { "type": "number", "description": "Number of winning positions (USD)" }, "win_lp_native": { "type": "number" }, "win_rate": { "type": "number", "description": "Win rate (USD)" }, "win_rate_native": { "type": "number" }, "fee_percent": { "type": "number", "description": "Fee as percentage of inflow" }, "fee_percent_native": { "type": "number" }, "apr": { "type": "number", "description": "Annualized return" }, "roi": { "type": "number", "description": "Return on investment" }, "first_activity": { "type": "string", "format": "date-time" }, "last_activity": { "type": "string", "format": "date-time" } } } }, "pagination": { "type": "object", "properties": { "page": { "type": "integer" }, "pageSize": { "type": "integer" }, "totalCount": { "type": "integer" }, "totalPages": { "type": "integer" }, "hasNextPage": { "type": "boolean" } } } } } } } }, "400": { "description": "Invalid parameters" }, "401": { "description": "Free plan not allowed — upgrade to Premium or Enterprise", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "A Premium or Enterprise plan is required to access this endpoint." } } } } } }, "500": { "description": "Internal server error" } } } }, "/lp-positions/revenue/{owner}": { "get": { "summary": "Get LP positions revenue for an owner", "description": "Retrieve revenue and PnL data over time for a specific wallet owner. Only 7D and 1M ranges are available.", "tags": ["Positions"], "parameters": [ { "in": "path", "name": "owner", "required": true, "schema": { "type": "string" }, "description": "Wallet address of the position owner", "example": "7q4VBmi56ws3LHNHstESrHHCK8CD3jfA2JVBhe29yvUM" }, { "in": "query", "name": "period", "schema": { "type": "string", "enum": ["day", "week", "month"], "default": "day" }, "description": "Aggregation period for revenue data" }, { "in": "query", "name": "range", "schema": { "type": "string", "enum": ["7D", "1M"] }, "description": "Time range filter (only 7D and 1M are available)" }, { "in": "query", "name": "protocol", "schema": { "type": "string" }, "description": "Comma-separated protocol filter", "example": "meteora,meteora_damm_v2" } ], "responses": { "200": { "description": "Successfully retrieved revenue data", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "array", "items": { "type": "object", "properties": { "close_day": { "type": "string", "format": "date-time", "description": "Date of the revenue data point", "example": "2026-03-10T00:00:00.000Z" }, "sum": { "type": "number", "description": "Period PnL in USD", "example": 1500.5 }, "sum_native": { "type": "number", "description": "Period PnL in native token (SOL)", "example": 1200.25 }, "total_invested": { "type": "number", "description": "Total capital invested at end of period (USD)", "example": 50000 }, "total_invested_native": { "type": "number", "description": "Total capital invested in native token", "example": 40000 }, "cumulative_pnl": { "type": "number", "description": "Running cumulative PnL from start date (USD)", "example": 1500.5 }, "cumulative_pnl_native": { "type": "number", "description": "Running cumulative PnL in native token", "example": 1200.25 }, "max_invested": { "type": "number", "description": "Maximum capital deployed in this period (USD)", "example": 50000 }, "max_invested_native": { "type": "number", "description": "Maximum capital deployed in native token", "example": 40000 }, "pnl_percent": { "type": "number", "description": "PnL as percentage of max invested (USD)", "example": 0.03 }, "pnl_percent_native": { "type": "number", "description": "PnL percentage in native token", "example": 0.03 } } } } } } } } }, "400": { "description": "Invalid query parameters" }, "500": { "description": "Internal server error" } } } }, "/pools/{poolId}/add-tx": { "post": { "summary": "Zap-In — Generate transaction to add liquidity to a pool", "description": "Generate serialized zap-in transactions to add liquidity to a pool. Supports both DLMM and DAMM V2 pools (auto-detected by pool address). In zap-in mode, provide SOL and the API auto-swaps to the correct token ratio. Returns serialized transactions ready to be signed and landed.", "tags": ["Pools"], "parameters": [ { "in": "path", "name": "poolId", "required": true, "schema": { "type": "string" }, "description": "The pool address" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["stratergy", "owner"], "properties": { "stratergy": { "type": "string", "enum": ["Spot", "Curve", "BidAsk"], "description": "The distribution strategy to use" }, "inputSOL": { "type": "number", "description": "Amount of SOL to input" }, "percentX": { "type": "number", "minimum": 0, "maximum": 1, "description": "Percentage of capital to allocate to token X (0-1)" }, "fromBinId": { "type": "integer", "description": "Starting bin ID for liquidity distribution" }, "toBinId": { "type": "integer", "description": "Ending bin ID for liquidity distribution" }, "amountX": { "type": "number", "description": "Specific amount of token X (alternative to percentX)" }, "amountY": { "type": "number", "description": "Specific amount of token Y (required with amountX)" }, "owner": { "type": "string", "description": "Owner wallet address" }, "slippage_bps": { "type": "integer", "minimum": 0, "maximum": 10000, "default": 500, "description": "Slippage tolerance in basis points (e.g., 500 = 5%)" }, "provider": { "type": "string", "enum": ["OKX", "JUPITER_ULTRA"], "default": "JUPITER_ULTRA", "description": "Swap provider to use for token swaps" }, "mode": { "type": "string", "enum": ["normal", "zap-in"], "default": "zap-in", "description": "Add liquidity mode" } } } } } }, "responses": { "200": { "description": "Successfully generated zap-in transactions", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "lastValidBlockHeight": { "type": "number" }, "swapTxsWithJito": { "type": "array", "items": { "type": "string" } }, "addLiquidityTxsWithJito": { "type": "array", "items": { "type": "string" } }, "meta": { "type": "object" } } } } } } } }, "400": { "description": "Invalid parameters provided" }, "500": { "description": "Internal server error" } } } }, "/pools/landing-add-tx": { "post": { "summary": "Zap-In — Submit and land zap-in transactions", "description": "Submit signed zap-in transactions via Jito bundles for on-chain execution", "tags": ["Pools"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["lastValidBlockHeight", "addLiquidityTxsWithJito"], "properties": { "lastValidBlockHeight": { "type": "integer", "description": "Last valid block height for the transactions" }, "swapTxsWithJito": { "type": "array", "items": { "type": "string" }, "description": "Serialized swap transactions with Jito tips (base64)", "default": [] }, "addLiquidityTxsWithJito": { "type": "array", "items": { "type": "string" }, "description": "Serialized add liquidity transactions with Jito tips (base64)" }, "meta": { "type": "object", "description": "Optional metadata" } } } } } }, "responses": { "200": { "description": "Successfully submitted and landed transactions", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "method": { "type": "string", "enum": ["JITO"] }, "signature": { "type": "string" } } } } } } } }, "400": { "description": "Invalid parameters provided" }, "500": { "description": "Internal server error" } } } }, "/position/decrease-quotes": { "post": { "summary": "Zap-Out — Get quotes for withdrawing liquidity", "description": "Returns quotes for converting position tokens to different output combinations (token0 to token1, token1 to token0, to base token, etc.) before executing a zap-out", "tags": ["Position"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["id", "bps"], "properties": { "id": { "type": "string", "description": "The encrypted position ID" }, "bps": { "type": "integer", "description": "The percentage of position to close in basis points (0-10000)", "minimum": 0, "maximum": 10000 } } } } } }, "responses": { "200": { "description": "Quotes for different token combinations", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": ["success", "error"] }, "data": { "type": "object" } } } } } }, "400": { "description": "Invalid parameters" }, "500": { "description": "Internal server error" } } } }, "/position/decrease-tx": { "post": { "summary": "Zap-Out — Generate transaction to withdraw liquidity", "description": "Generates serialized zap-out transactions to withdraw liquidity from a position. Supports both Meteora DLMM and DAMM V2 positions.", "tags": ["Position"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["position_id", "bps", "owner", "slippage_bps"], "properties": { "position_id": { "type": "string", "description": "The position ID" }, "bps": { "type": "integer", "description": "Basis points for the amount to decrease (0-10000)", "minimum": 0, "maximum": 10000 }, "owner": { "type": "string", "description": "The owner's wallet address" }, "slippage_bps": { "type": "integer", "description": "Slippage tolerance in basis points (0-10000)", "minimum": 0, "maximum": 10000 }, "output": { "type": "string", "enum": ["allToken0", "allToken1", "both", "allBaseToken"], "description": "The output token for the swap" }, "provider": { "type": "string", "enum": ["OKX", "JUPITER_ULTRA"], "description": "The swap provider to use" }, "type": { "type": "string", "enum": ["meteora", "meteora_damm_v2"], "default": "meteora", "description": "The pool type" }, "fromBinId": { "type": "number", "description": "Starting bin ID" }, "toBinId": { "type": "number", "description": "Ending bin ID" } } } } } }, "responses": { "200": { "description": "Transaction data prepared successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "lastValidBlock": { "type": "number" }, "closeTxs": { "type": "array", "items": { "type": "string" } }, "swapTxs": { "type": "array", "items": { "type": "string" } }, "closeTxsWithJito": { "type": "array", "items": { "type": "string" } }, "swapTxsWithJito": { "type": "array", "items": { "type": "string" } } } } } } } } }, "400": { "description": "Invalid parameters or position-related errors" }, "500": { "description": "Internal server error" } } } }, "/position/landing-decrease-tx": { "post": { "summary": "Zap-Out — Submit and land zap-out transactions", "description": "Submit signed zap-out (decrease position) transactions via Jito bundles for on-chain execution. Provides better landing rate than direct RPC submission.", "tags": ["Position"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["lastValidBlockHeight", "closeTxsWithJito"], "properties": { "lastValidBlockHeight": { "type": "integer", "description": "Last valid block height for the transactions" }, "closeTxs": { "type": "array", "items": { "type": "string" }, "description": "Close position transactions (base64)", "default": [] }, "swapTxs": { "type": "array", "items": { "type": "string" }, "description": "Swap transactions (base64)", "default": [] }, "closeTxsWithJito": { "type": "array", "items": { "type": "string" }, "description": "Close position transactions with Jito tips (base64)" }, "swapTxsWithJito": { "type": "array", "items": { "type": "string" }, "description": "Swap transactions with Jito tips (base64)", "default": [] } } } } } }, "responses": { "200": { "description": "Successfully submitted and landed transactions", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "method": { "type": "string", "enum": ["JITO"] }, "signature": { "type": "string" } } } } } } } }, "400": { "description": "Invalid parameters or transaction execution failed" }, "500": { "description": "Internal server error" } } } }, "/position/claim-fee-tx": { "post": { "summary": "Claim Fees — Generate transaction(s) to claim accrued LP fees", "description": "Generates serialized claim-fee transactions for a Meteora DLMM or DAMM V2 position. When `swapToNative` is true, also returns swap transactions that convert the claimed fees into SOL using the supplied slippage tolerance.", "tags": ["Position"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["position_id", "owner", "slippage_bps"], "properties": { "position_id": { "type": "string", "description": "The position ID" }, "owner": { "type": "string", "description": "The owner's wallet address" }, "slippage_bps": { "type": "integer", "description": "Slippage tolerance in basis points for swap-to-SOL (0-10000). Ignored when swapToNative is false.", "minimum": 0, "maximum": 10000 }, "swapToNative": { "type": "boolean", "default": false, "description": "When true, the response includes swap transactions that convert the claimed fees into SOL." }, "provider": { "type": "string", "enum": ["OKX", "JUPITER_ULTRA"], "description": "The swap provider to use (only relevant when swapToNative is true)" }, "type": { "type": "string", "enum": ["meteora", "meteora_damm_v2"], "default": "meteora", "description": "The pool type" } } } } } }, "responses": { "200": { "description": "Transaction data prepared successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "lastValidBlockHeight": { "type": "number" }, "claimTxsWithJito": { "type": "array", "items": { "type": "string" } }, "swapTxsWithJito": { "type": "array", "items": { "type": "string" } }, "meta": { "type": "object" } } } } } } } }, "400": { "description": "Invalid parameters or position-related errors" }, "500": { "description": "Internal server error" } } } }, "/position/landing-claim-fee-tx": { "post": { "summary": "Claim Fees — Submit and land signed claim-fee transactions", "description": "Submits the signed claim-fee transactions (and optional swap-to-SOL transactions) via Jito bundles for on-chain execution. Provides better landing rate than direct RPC submission.", "tags": ["Position"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["lastValidBlockHeight", "claimTxsWithJito"], "properties": { "lastValidBlockHeight": { "type": "integer", "description": "Last valid block height for the transactions" }, "claimTxsWithJito": { "type": "array", "items": { "type": "string" }, "description": "Signed claim-fee transactions (base64) — already include Jito tip" }, "swapTxsWithJito": { "type": "array", "items": { "type": "string" }, "description": "Signed swap-to-SOL transactions with trailing Jito tip tx (base64). Empty if swapToNative was false at build time.", "default": [] } } } } } }, "responses": { "200": { "description": "Successfully submitted and landed transactions", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "method": { "type": "string", "enum": ["JITO"] }, "signature": { "type": "string" } } } } } } } }, "400": { "description": "Invalid parameters or transaction execution failed" }, "500": { "description": "Internal server error" } } } }, "/rpc": { "post": { "summary": "Solana JSON-RPC proxy (sendTransaction)", "description": "JSON-RPC 2.0 endpoint mirroring Solana's HTTP RPC. Currently supports only `sendTransaction`.\nThe encoded transaction is forwarded to the LP-Agent priority RPC; the signature is returned\nas soon as the priority RPC accepts it (the rotating RPC pool is fanned out to in the\nbackground). Behavior matches https://solana.com/docs/rpc/http/sendtransaction — the client\nis responsible for polling confirmation.\n\nOn success the response is HTTP 200 with a `result` field. On failure the response is HTTP 400\nwith a JSON-RPC `error` envelope (invalid request, unsupported method, bad params, decode failure, or upstream error).\n", "tags": ["RPC"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["jsonrpc", "method", "params"], "properties": { "jsonrpc": { "type": "string", "enum": ["2.0"] }, "id": { "description": "Request id, echoed back in the response", "oneOf": [ { "type": "number" }, { "type": "string" } ] }, "method": { "type": "string", "enum": ["sendTransaction"] }, "params": { "type": "array", "minItems": 1, "maxItems": 2, "description": "[transaction (encoded string), config? (object)]", "items": {} } } } } } }, "responses": { "200": { "description": "Success — JSON-RPC envelope with `result` set to the transaction signature (base58).", "content": { "application/json": { "schema": { "type": "object", "properties": { "jsonrpc": { "type": "string", "example": "2.0" }, "id": { "oneOf": [ { "type": "number" }, { "type": "string" } ] }, "result": { "type": "string", "description": "Transaction signature (base58)" } } } } } }, "400": { "description": "Validation or upstream failure — JSON-RPC envelope with the `error` field populated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "jsonrpc": { "type": "string", "example": "2.0" }, "id": { "oneOf": [ { "type": "number" }, { "type": "string" } ] }, "error": { "type": "object", "properties": { "code": { "type": "integer" }, "message": { "type": "string" }, "data": { "description": "Optional structured details", "nullable": true } } } } } } } } } } }, "/jito": { "post": { "summary": "Jito Block Engine sendBundle (with landing confirmation)", "description": "JSON-RPC 2.0 endpoint that submits a bundle to the Jito Block Engine and waits for it to land.\nInternally calls `sendJitoBundle`, which simulates the bundle, sends it to\n`https://.mainnet.block-engine.jito.wtf/api/v1/bundles`, polls signature status until the\nfirst transaction is confirmed (up to ~30s), and retries on failure.\n\nSpec reference: https://docs.jito.wtf/lowlatencytxnsend/#sendbundle\n\nNotes:\n- On success the response is HTTP 200 with a `result` object. On failure the response is HTTP 400 with a JSON-RPC `error` envelope.\n- Bundle size is capped at 5 transactions (Jito limit).\n- Transactions must already include a tip instruction; this endpoint does NOT inject tips.\n- Transactions must be fully signed (all required signatures present) before submission. Unsigned bundles return HTTP 400 with JSON-RPC INVALID_PARAMS and `data.unsignedIndices` listing the offending positions.\n- This endpoint blocks until the bundle lands or polling/retries are exhausted.\n", "tags": ["RPC"], "parameters": [ { "in": "query", "name": "region", "required": false, "schema": { "type": "string", "enum": ["mainnet", "amsterdam", "frankfurt", "ny", "tokyo"], "default": "mainnet" }, "description": "Jito block engine region" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["jsonrpc", "method", "params"], "properties": { "jsonrpc": { "type": "string", "enum": ["2.0"] }, "id": { "description": "Request id, echoed back in the response", "oneOf": [ { "type": "number" }, { "type": "string" } ] }, "method": { "type": "string", "enum": ["sendBundle"] }, "params": { "type": "array", "minItems": 1, "maxItems": 2, "description": "[transactions[] (1-5 base58/base64 encoded txs), options? ({ encoding: 'base58' | 'base64' })]", "items": {} } } } } } }, "responses": { "200": { "description": "Success — JSON-RPC envelope with `result` set to the bundle landing details.", "content": { "application/json": { "schema": { "type": "object", "properties": { "jsonrpc": { "type": "string", "example": "2.0" }, "id": { "oneOf": [ { "type": "number" }, { "type": "string" } ] }, "result": { "type": "object", "description": "Bundle landing details", "properties": { "bundleId": { "type": "string", "description": "Jito bundle id (UUID)" }, "signature": { "type": "string", "description": "Base58 signature of the first transaction in the bundle" } } } } } } } }, "400": { "description": "Validation, simulation, or upstream failure — JSON-RPC envelope with the `error` field populated. Unsigned-bundle errors include `error.data.unsignedIndices`.", "content": { "application/json": { "schema": { "type": "object", "properties": { "jsonrpc": { "type": "string", "example": "2.0" }, "id": { "oneOf": [ { "type": "number" }, { "type": "string" } ] }, "error": { "type": "object", "properties": { "code": { "type": "integer" }, "message": { "type": "string" }, "data": { "description": "Optional structured details (e.g. unsignedIndices: number[])", "nullable": true } } } } } } } } } } } }, "tags": [] }