dex

Get User Liquidity

Retrieves detailed liquidity information for a specific token pair held by an account. It returns the pair’s unique address along with the total liquidity and the individual balances for each token in the pair. This data is essential for users monitoring their decentralized liquidity positions and managing their exposure across various protocols.

💡 Compute Unit Value: 60 (Fixed)

get/defi/v1/dex/getuserliquidity

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/dex/getuserliquidity
  • Auth
    API key in header X-API-Key

Query parameters

tokenAstring required

Address of the first token.

Example:0x514910771AF9Ca656af840dff83E8264EcF986CA
addressstring required

Public address of liquidity provider.

Example:0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402
dexId'1000' | '1001' | '1300' | '1301' | '1305' | '1306' | '1307' | '1308' | '1309' | '1310' | '1100' | '1101' | '1200' | '1201' | '2900' | '2901' | '2800' | '2808' | '2809' | '1500' | '1400' | '1402' | '2300' | '2100' | '2101' | '2500' | '2501' | '2700' | '2400' | '2401' | '3000' | '3001' | '3100' | '3500' | '3501' | '3400' | '3401' | '3600'

The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more here.

Example:1000
tokenBstring required

Address of the second token.

Example:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
vsCurrenciesstring

A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.

Example:usd,eur,gbp
tokenIdstring required

The token ID for PancakeSwap V3 liquidity position.

Example:3238
poolAddressstring required

Pool address whose liquidity is to be fetched.

Example:0xfad57d2039c21811c8f2b5d5b65308aa99d31559
tokenCstring

Address of the third token.

Example:0x514910771AF9Ca656af840dff83E8264EcF986CA
tokenDstring

Address of the forth token.

Example:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
idstring required

Bin ID whose liquidity is to be fetched.

Example:8376653
positionNFTstring required

LP token that represents a position in a pool.

Example:45z3G8PxyTuFa9tbr9QMmscGVHvZir4vQK1U5LRKeSQd
pathstring required

Comma-separated values of token addresses whose price is to be fetched. Note: 1) Assets should be in lexicographic order. 2) For assets other than XLM (Native token), the token issuer is required.

Example:0x514910771AF9Ca656af840dff83E8264EcF986CA,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
poolIdstring required

Pool ID of the token pair.

Example:13

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "pairAddress": "0x21b8065d10f73EE2e260e5B47D3344d3Ced7596E",
    "liquidity": "0",
    "tokenA": "0",
    "tokenB": "0",
    "prices": {
      "usd": [
        {
          "0x66a0f676479cee1d7373f3dc2e2952778bff5bd6": "0.20142069681758892"
        },
        {
          "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "3614.520018921655"
        }
      ],
      "inr": [
        {
          "0x66a0f676479cee1d7373f3dc2e2952778bff5bd6": "17.40667167879299"
        },
        {
          "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "312364.9368702795"
        }
      ],
      "cny": [
        {
          "0x66a0f676479cee1d7373f3dc2e2952778bff5bd6": "1.4416484954022113"
        },
        {
          "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "25870.56558342986"
        }
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.