GET
/
api
/
algebra
/
pool
/
manual
/
{user}
/
{networkName}
curl --request GET \
  --url https://public-beam-backend-mainnet.codemelt.codes/api/algebra/pool/manual/{user}/{networkName}
{
  "message": "<string>",
  "data": null,
  "status": "<any>"
}

View Positions

This endpoint provides real-time data for all liquidity positions owned by a specific address. Position data is updated with minimal delay (maximum 1 block) while APR calculations are updated every 5 minutes.

Data Update Frequency

Real-time Updates (1 block delay)

  • Position Liquidity
  • Unclaimed Fees
  • Token Amounts
  • Current Price Range
  • Position Value

5-Minute Updates

  • Position APR
  • Fee Generation Rate

Using the SDK

import api, { IConnection } from "codemelt-retro-api-sdk"
import { AlgebraPositionDTO } from 'codemelt-retro-api-sdk/structures/AlgebraPositionDTO'

const connection: IConnection = {
  host: '<enter your host url here>',
  headers: {
    'x-api-key': '<enter your api key here>'
  }
}

const networkName = 'Zeta Mainnet'
const positions = await api.functional.api.algebra.pool.manual.getUserPools(
  connection,
  signer.address,
  networkName
)

Best Practices

  1. Polling Frequency

    • Poll every 5-15 seconds for real-time data
  2. Error Handling

    • Implement exponential backoff for failed requests
    • Handle network disconnections gracefully
    • Maintain last known good state
  3. Performance

    • Clean up polling on component unmount

Path Parameters

user
string
required
networkName
string
required

Response

200 - application/json
message
string
required
data
null
required
status
any
required