Skip to content

Portfolio Data

The API provides endpoints for tracking user LP positions and swap history.

LP Positions

GET https://mainnet.api.ryze.pro/api/portfolio/pools/:address

Returns the user's liquidity pool positions (LP token balances).

bash
curl "https://mainnet.api.ryze.pro/api/portfolio/pools/0xYourAddress?page=1&limit=15"
json
{
  "address": "0xYourAddress",
  "positions": [
    {
      "address": "0xYourAddress",
      "poolAddress": "0x7B41aA91947398CD9244AD4e314C253D9B1B5206",
      "poolShares": "99500000000000000000",
      "updatedAt": "2026-04-15T12:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 15,
    "totalItems": 1,
    "totalPages": 1,
    "hasNext": false,
    "hasPrev": false
  }
}
FieldTypeDescription
poolAddressstringPool contract address
poolSharesstringLP token balance (18 decimals)
updatedAtstringLast update timestamp
ParameterTypeDefaultDescription
pagestring"1"Page number
limitstring"15"Items per page (max 15)

Order History

GET https://mainnet.api.ryze.pro/api/portfolio/order-history/:address

Returns paginated swap history with full fee breakdowns.

bash
curl "https://mainnet.api.ryze.pro/api/portfolio/order-history/0xYourAddress?page=1&limit=15"
json
{
  "address": "0xYourAddress",
  "swaps": [
    {
      "id": "0xYourAddress:0xTxHash:42",
      "userAddress": "0xYourAddress",
      "poolAddress": "0x7B41...",
      "txHash": "0xTxHash",
      "tokenIn": "0x8335...2913",
      "tokenOut": "0x4200...0006",
      "amountIn": "100000000",
      "amountOut": "62500000000000000",
      "feeDetails": {
        "swapFee": { "token": "0x8335...2913", "amount": "30000" },
        "takerFee": { "token": "0x8335...2913", "amount": "10000" },
        "wbfFee": { "token": "0x8335...2913", "amount": "0" },
        "slippageFee": { "token": "0x8335...2913", "amount": "5000" },
        "wbrFee": { "token": "0x8335...2913", "amount": "0" }
      },
      "timestamp": "2026-04-15T12:00:00.000Z",
      "blockNumber": 44700000,
      "logIndex": 42,
      "isMultiHop": false,
      "createdAt": "2026-04-15T12:00:00.000Z"
    }
  ],
  "pagination": { ... }
}

Multi-Hop Swaps

Multi-hop swaps include the route:

json
{
  "isMultiHop": true,
  "multiHopRoute": [
    { "pool": "0xPool1...", "tokenIn": "0xToken1...", "tokenOut": "0xToken2..." },
    { "pool": "0xPool2...", "tokenIn": "0xToken2...", "tokenOut": "0xToken3..." }
  ]
}
ParameterTypeDefaultDescription
pagestring"1"Page number
limitstring"15"Items per page (max 15)