Calculators
LP pool share value calculator API
Convert an LP pool share into underlying token amounts and USD value: share = lp/totalLp, amount_i = share·reserve_i, value = Σ amount_i·price_i. Deterministic LP-accounting math. Answers 'what are my LP tokens worth','underlying tokens behind my share','value of my liquidity position'.
Price$0.01per request
MethodPOST
Route/v1/calc/cryptocalc-pool-share-value
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calccryptodefilppool-shareliquidityvaluationamm
API URL
Integration docshttps://x402.hexl.dev/v1/calc/cryptocalc-pool-share-valueExample request
{
"lpTokens": 100,
"totalLpTokens": 10000,
"reserve0": 1000000,
"reserve1": 500,
"price0": 1,
"price1": 2000
}Example response
{
"formula": "share = lp/totalLp; amount_i = share·reserve_i; value = Σ amount_i·price_i",
"poolSharePct": 1,
"amount0": 10000,
"amount1": 5,
"value0Usd": 10000,
"value1Usd": 10000,
"totalValueUsd": 20000
}Input schema
{
"type": "object",
"required": [
"lpTokens",
"totalLpTokens",
"reserve0",
"reserve1",
"price0",
"price1"
],
"properties": {
"lpTokens": {
"type": "number",
"examples": [
100
]
},
"totalLpTokens": {
"type": "number",
"examples": [
10000
]
},
"reserve0": {
"type": "number",
"examples": [
1000000
]
},
"reserve1": {
"type": "number",
"examples": [
500
]
},
"price0": {
"type": "number",
"examples": [
1
]
},
"price1": {
"type": "number",
"examples": [
2000
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}