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

# Uniswap position

> Returns the current owner, pool, range, liquidity, token amounts, and claimable fees for a Uniswap position NFT.

```bash theme={null}
curl "https://staging-api.struct.to/v1/uniswap/positions/{token_id}?chain=base&chain_id=8453&protocol=v4&fields=short" \
  -H "X-API-Key: YOUR_API_KEY"
```

```json Response (Long) theme={null}
{
  "protocol": "UniswapV4",
  "owner": "0x12a371444CCeBb6B64Cc35EBbC70d1d998433d51",
  "pool_id": "0x1111111111111111111111111111111111111111111111111111111111111111",
  "currency0": "0x0000000000000000000000000000000000000000",
  "currency1": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "currency0_decimals": 18,
  "currency1_decimals": 6,
  "currency0_price_usd": "2474.05",
  "currency1_price_usd": "1.00",
  "fee": 3000,
  "tick_spacing": 60,
  "hooks": "0x0000000000000000000000000000000000000000",
  "tick_lower": -180,
  "tick_upper": 60,
  "liquidity_raw": "250000000",
  "token_amounts": {
    "amount0_raw": "1500000000000000000",
    "amount1_raw": "3700000000",
    "amount0": "1.5",
    "amount1": "3700",
    "amount0_usd": "3711.08",
    "amount1_usd": "3700",
    "amounts_usd": "7411.08"
  },
  "in_range": true,
  "current_tick": -120,
  "sqrt_price_x96": "12345678901234567890",
  "active_liquidity_raw": "1000000000",
  "claimable_fees": {
    "currency0": "0x0000000000000000000000000000000000000000",
    "currency1": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "currency0_decimals": 18,
    "currency1_decimals": 6,
    "currency0_price_usd": "2474.05",
    "currency1_price_usd": "1.00",
    "amount0_raw": "1200000000000000",
    "amount1_raw": "2800000",
    "amount0": "0.0012",
    "amount1": "2.8",
    "amount0_usd": "2.97",
    "amount1_usd": "2.8",
    "amounts_usd": "5.77"
  }
}
```

```jsonc Response (Short) theme={null}
{
  "pr": "UniswapV4",
  "o": "0x12a371444CCeBb6B64Cc35EBbC70d1d998433d51",
  "p": "0x1111111111111111111111111111111111111111111111111111111111111111",
  "c0": "0x0000000000000000000000000000000000000000",
  "c1": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "cd0": 18,
  "cd1": 6,
  "p0": "2474.05",
  "p1": "1.00",
  "f": 3000,
  "ts": 60,
  "h": "0x0000000000000000000000000000000000000000",
  "tl": -180,
  "tu": 60,
  "lq": "250000000",
  "ta": {
    "a0r": "1500000000000000000",
    "a1r": "3700000000",
    "a0": "1.5",
    "a1": "3700",
    "a0u": "3711.08",
    "a1u": "3700",
    "au": "7411.08"
  },
  "ir": true,
  "ctk": -120,
  "sp": "12345678901234567890",
  "al": "1000000000",
  "cf": {
    "c0": "0x0000000000000000000000000000000000000000",
    "c1": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "cd0": 18,
    "cd1": 6,
    "p0": "2474.05",
    "p1": "1.00",
    "a0r": "1200000000000000",
    "a1r": "2800000",
    "a0": "0.0012",
    "a1": "2.8",
    "a0u": "2.97",
    "a1u": "2.8",
    "au": "5.77"
  }
}
```


## OpenAPI

````yaml onchain-openapi.json GET /uniswap/positions/{token_id}
openapi: 3.1.0
info:
  title: Struct On-chain API
  description: >-
    RESTful API for token market data, discovery, holders, audits, and trader
    analytics across supported chains. Pass `fields=short` or header
    `x-field-names: short` for abbreviated keys. HTTP defaults to `long`. Token
    candlesticks, token trades and wallet batch trades also support
    `fields=array` for typed positional rows.
  version: 1.0.0
servers:
  - url: https://staging-api.struct.to/v1
    description: Staging
security:
  - ApiKey: []
paths:
  /uniswap/positions/{token_id}:
    get:
      tags:
        - Uniswap
      summary: Uniswap position
      description: >-
        Returns the current owner, pool, range, liquidity, token amounts, and
        claimable fees for a Uniswap position NFT.
      operationId: get_uniswap_position
      parameters:
        - name: chain
          in: query
          description: Chain name. Required unless `chain_id` is provided.
          required: false
          schema:
            type: string
          example: base
        - name: chain_id
          in: query
          description: Chain id. Required unless `chain` is provided. Use `-1` for Solana.
          required: false
          schema:
            type: integer
            format: int64
          example: 8453
        - name: token_id
          in: path
          description: Uniswap position NFT token ID.
          required: true
          schema:
            type: string
        - name: protocol
          in: query
          description: 'Uniswap version: v3 or v4. Omit to query both versions.'
          required: false
          schema:
            $ref: '#/components/schemas/UniswapProtocol'
          example: v4
        - name: x-field-names
          in: header
          required: false
          description: >-
            Select long (full) or short (abbreviated) field names. HTTP defaults
            to `long`. Takes precedence over `fields`. See [Response
            Format](/api-reference/response-format#long-and-short-field-names).
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
        - name: fields
          in: query
          required: false
          description: >-
            Same as `x-field-names`. Use `long` or `short`. HTTP defaults to
            `long`. Ignored when the header is set. `field_names` is accepted as
            an alias.
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
      responses:
        '200':
          description: Uniswap position data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V4PositionResponse'
              examples:
                long:
                  summary: Response (Long)
                  value:
                    protocol: UniswapV4
                    owner: '0x12a371444CCeBb6B64Cc35EBbC70d1d998433d51'
                    pool_id: >-
                      0x1111111111111111111111111111111111111111111111111111111111111111
                    currency0: '0x0000000000000000000000000000000000000000'
                    currency1: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    currency0_decimals: 18
                    currency1_decimals: 6
                    currency0_price_usd: '2474.05'
                    currency1_price_usd: '1.00'
                    fee: 3000
                    tick_spacing: 60
                    hooks: '0x0000000000000000000000000000000000000000'
                    tick_lower: -180
                    tick_upper: 60
                    liquidity_raw: '250000000'
                    token_amounts:
                      amount0_raw: '1500000000000000000'
                      amount1_raw: '3700000000'
                      amount0: '1.5'
                      amount1: '3700'
                      amount0_usd: '3711.08'
                      amount1_usd: '3700'
                      amounts_usd: '7411.08'
                    in_range: true
                    current_tick: -120
                    sqrt_price_x96: '12345678901234567890'
                    active_liquidity_raw: '1000000000'
                    claimable_fees:
                      currency0: '0x0000000000000000000000000000000000000000'
                      currency1: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                      currency0_decimals: 18
                      currency1_decimals: 6
                      currency0_price_usd: '2474.05'
                      currency1_price_usd: '1.00'
                      amount0_raw: '1200000000000000'
                      amount1_raw: '2800000'
                      amount0: '0.0012'
                      amount1: '2.8'
                      amount0_usd: '2.97'
                      amount1_usd: '2.8'
                      amounts_usd: '5.77'
                short:
                  summary: Response (Short)
                  value:
                    pr: UniswapV4
                    o: '0x12a371444CCeBb6B64Cc35EBbC70d1d998433d51'
                    p: >-
                      0x1111111111111111111111111111111111111111111111111111111111111111
                    c0: '0x0000000000000000000000000000000000000000'
                    c1: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    cd0: 18
                    cd1: 6
                    p0: '2474.05'
                    p1: '1.00'
                    f: 3000
                    ts: 60
                    h: '0x0000000000000000000000000000000000000000'
                    tl: -180
                    tu: 60
                    lq: '250000000'
                    ta:
                      a0r: '1500000000000000000'
                      a1r: '3700000000'
                      a0: '1.5'
                      a1: '3700'
                      a0u: '3711.08'
                      a1u: '3700'
                      au: '7411.08'
                    ir: true
                    ctk: -120
                    sp: '12345678901234567890'
                    al: '1000000000'
                    cf:
                      c0: '0x0000000000000000000000000000000000000000'
                      c1: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                      cd0: 18
                      cd1: 6
                      p0: '2474.05'
                      p1: '1.00'
                      a0r: '1200000000000000'
                      a1r: '2800000'
                      a0: '0.0012'
                      a1: '2.8'
                      a0u: '2.97'
                      a1u: '2.8'
                      au: '5.77'
        '400':
          description: Validation error, usually invalid chain or token_id.
        '503':
          description: Uniswap position data is unavailable for the requested chain.
components:
  schemas:
    UniswapProtocol:
      type: string
      description: 'Uniswap version: v3 or v4.'
      enum:
        - v3
        - v4
    V4PositionResponse:
      type: object
      required:
        - protocol
      properties:
        protocol:
          $ref: '#/components/schemas/UniswapFamily'
        owner:
          type:
            - string
            - 'null'
        pool_id:
          type:
            - string
            - 'null'
        currency0:
          type:
            - string
            - 'null'
        currency1:
          type:
            - string
            - 'null'
        currency0_decimals:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        currency1_decimals:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        currency0_price_usd:
          type:
            - string
            - 'null'
        currency1_price_usd:
          type:
            - string
            - 'null'
        fee:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        tick_spacing:
          type:
            - integer
            - 'null'
          format: int32
        hooks:
          type:
            - string
            - 'null'
        tick_lower:
          type:
            - integer
            - 'null'
          format: int32
        tick_upper:
          type:
            - integer
            - 'null'
          format: int32
        liquidity_raw:
          type:
            - string
            - 'null'
        token_amounts:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/V4PositionTokenAmounts'
        in_range:
          type:
            - boolean
            - 'null'
        current_tick:
          type:
            - integer
            - 'null'
          format: int32
        sqrt_price_x96:
          type:
            - string
            - 'null'
        active_liquidity_raw:
          type:
            - string
            - 'null'
        claimable_fees:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/V4ClaimableFeesData'
    UniswapFamily:
      type: string
      description: Uniswap V3 or Uniswap V4.
      enum:
        - UniswapV3
        - UniswapV4
    V4PositionTokenAmounts:
      type: object
      required:
        - amount0_raw
        - amount1_raw
      properties:
        amount0_raw:
          type: string
        amount1_raw:
          type: string
        amount0:
          type:
            - string
            - 'null'
        amount1:
          type:
            - string
            - 'null'
        amount0_usd:
          type:
            - string
            - 'null'
        amount1_usd:
          type:
            - string
            - 'null'
        amounts_usd:
          type:
            - string
            - 'null'
    V4ClaimableFeesData:
      type: object
      required:
        - currency0
        - currency1
        - amount0_raw
        - amount1_raw
      properties:
        currency0:
          type: string
        currency1:
          type: string
        currency0_decimals:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        currency1_decimals:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        currency0_price_usd:
          type:
            - string
            - 'null'
        currency1_price_usd:
          type:
            - string
            - 'null'
        amount0_raw:
          type: string
        amount1_raw:
          type: string
        amount0:
          type:
            - string
            - 'null'
        amount1:
          type:
            - string
            - 'null'
        amount0_usd:
          type:
            - string
            - 'null'
        amount1_usd:
          type:
            - string
            - 'null'
        amounts_usd:
          type:
            - string
            - 'null'
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Secret API key (`sk_*`) or JWT public key (`pk_jwt_*`).

````

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