> ## Documentation Index
> Fetch the complete documentation index at: https://docs.soroswap.finance/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Soroswap Aggregator API: base URL https://api.soroswap.finance, pick the network with ?network=mainnet or ?network=testnet (omitted means mainnet).
> Auth: Authorization: Bearer sk_... on every call. Get a key at https://api.soroswap.finance/register. A missing or invalid key returns 403, never 401. Free plan 1 request/s; see https://docs.soroswap.finance/api/plans.md.
> Flow: POST /quote (assetIn, assetOut as C... contract addresses, amount as an integer string in the smallest unit, tradeType, protocols) -> POST /quote/build with the unchanged quote and from -> the user signs the XDR -> POST /send. Build right after quoting: a Soroban XDR is valid for 180 seconds. Submit it as is, never re-simulate it.
> AI tools: docs MCP at https://docs.soroswap.finance/mcp (claude mcp add --transport http soroswap-docs https://docs.soroswap.finance/mcp), skill with npx skills add https://docs.soroswap.finance. Other clients: https://docs.soroswap.finance/api/build-with-ai.md.
> Units and Stellar pitfalls: https://docs.soroswap.finance/api/stellar-gotchas.md. Errors and retries: https://docs.soroswap.finance/api/errors.md.

# Get user positions in pools

> Soroswap AMM liquidity positions of an address: pool, reserves, share of the pool and the equivalent amount of each token. Returns an empty array when the address has none.



## OpenAPI

````yaml GET /liquidity/positions/{address}
openapi: 3.0.0
info:
  title: Soroswap API
  description: >+

    # 🚀 Soroswap API


    **Soroswap.Finance** is both an **Automated Market Maker (AMM)** and a **DEX
    Aggregator** on the Stellar blockchain.


    It aggregates liquidity from Soroban DEXes (**Soroswap, Phoenix, Aqua and
    Comet(TBA)**), and the **Stellar Classic DEX** — giving you **the best trade
    routes, liquidity tools, and real-time market data**.


    ---


    ## 📋 What You Can Do


    - 🔄 **Quote** – Get the best trade route between two assets with
    split-routing logic across AMMs and SDEX.  

    - 🧱 **Build** – Generate and simulate unsigned transactions (XDR) for swaps
    or liquidity actions.  

    - 🚀 **Send** – Submit signed transactions via Soroban RPC or Horizon.

    - ⚡ **Gasless Trustlines** – Use `gaslessTrustline` in `/quote` to open
    trustlines for users without requiring them to hold XLM or deal with
    trustline setup themselves.

    - 💰 **Platform Fees** – Add your own fee to user swaps with
    `platformFee`.  

    - 💧 **Liquidity** – Create LPs, add liquidity, remove liquidity.  

    - 💲 **Price** – Get real-time token prices.  

    - 🧠 **Pools** – View detailed pool information for Soroswap AMM.


    📮 **[Downnload the Postman Collection
    here](https://drive.google.com/drive/folders/1G-LQYE2EojPWP1CSuuS_tDb9vjYbFR6E?usp=drive_link)**

  version: '1.0'
  contact: {}
  x-logo:
    url: https://links.paltalabs.io/soroswap-full.svg
    backgroundColor: '#0e0e0e'
    altText: Soroswap Logo
    href: https://soroswap.finance
servers: []
security: []
tags: []
paths:
  /liquidity/positions/{address}:
    get:
      tags:
        - Liquidity
      summary: Get user positions in pools
      description: >-
        Retrieves all liquidity positions for a specific user address with
        detailed pool information and calculations.


        Example: GET
        /liquidity/positions/GALAXYVOIDAOPZTDLHILAJQKCVVFMD4IKLXLSZV5YHO7VY74IWZILUTO?network=mainnet
      operationId: LiquidityController_getUserPosition
      parameters:
        - name: address
          required: true
          in: path
          schema:
            type: string
        - name: network
          required: true
          in: query
          description: Network to query positions on
          schema:
            enum:
              - mainnet
              - testnet
            type: string
      responses:
        '200':
          description: >-
            Returns an array of user positions with enriched pool information
            including token details and position metrics
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    poolInfo:
                      type: object
                      properties:
                        protocol:
                          type: string
                          example: soroswap
                          description: Protocol name
                        address:
                          type: string
                          example: >-
                            CAM7DY53G63XA4AJRS24Z6VFYAFSSF76C3RZ45BE5YU3FQS5255OOABP
                          description: Pool contract address
                        tokenA:
                          type: object
                          properties:
                            address:
                              type: string
                              example: >-
                                CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA
                              description: Token A contract address
                            name:
                              type: string
                              example: USD Coin
                              description: Token A name
                            symbol:
                              type: string
                              example: USDC
                              description: Token A symbol
                          description: First token information
                        tokenB:
                          type: object
                          properties:
                            address:
                              type: string
                              example: >-
                                CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75
                              description: Token B contract address
                            name:
                              type: string
                              example: Stellar Lumens
                              description: Token B name
                            symbol:
                              type: string
                              example: XLM
                              description: Token B symbol
                          description: Second token information
                        reserveA:
                          type: string
                          example: '4286614183151'
                          description: Reserve amount for token A
                        reserveB:
                          type: string
                          example: '1009473414112'
                          description: Reserve amount for token B
                        totalSupply:
                          type: string
                          example: '200000000'
                          description: Total supply of LP tokens
                        ledger:
                          type: number
                          example: 57727251
                          description: Ledger number when data was last updated
                        userShares:
                          type: number
                          example: 0.15
                          description: User share of the pool as percentage
                        tokenAAmountEquivalent:
                          type: string
                          example: '642992127472'
                          description: Equivalent amount of token A based on user position
                        tokenBAmountEquivalent:
                          type: string
                          example: '151421012116'
                          description: Equivalent amount of token B based on user position
                    userPosition:
                      type: string
                      example: '18305475'
                      description: User liquidity position amount (LP tokens)
                example:
                  - poolInfo:
                      protocol: soroswap
                      address: CAM7DY53G63XA4AJRS24Z6VFYAFSSF76C3RZ45BE5YU3FQS5255OOABP
                      tokenA:
                        address: >-
                          CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA
                        name: USD Coin
                        symbol: USDC
                      tokenB:
                        address: >-
                          CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75
                        name: Stellar Lumens
                        symbol: XLM
                      reserveA: '4286614183151'
                      reserveB: '1009473414112'
                      totalSupply: '200000000'
                      ledger: 57727251
                    userPosition: '18305475'
                    userShares: 0.15
                    tokenAAmountEquivalent: '642992127472'
                    tokenBAmountEquivalent: '151421012116'
        '400':
          description: Bad Request
        '503':
          description: Service Unavailable - Error fetching pool details

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.