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

# Wallet open perp positions

> Derived snapshot of open positions from the `perp_positions` table
(latest row per `position_pubkey` via ReplacingMergeTree FINAL).

The response `is_fresh` field reflects the `?fresh=` request parameter.




## OpenAPI

````yaml openapi-spec/history.yaml get /api/sol/perp/wallets/{address}/perp-positions
openapi: 3.0.3
info:
  title: Raze Database API
  description: >
    Paid subscription API for Solana transaction data and history.


    Also hosts write utilities (`/utils/sol/*`): token launch, transfer, burn,

    consolidate, fees claim/config, and agent initialize — previously on

    `router.raze.bot`. Mixer/distribute removed 2026-07-25.


    ## Batch Requests

    All endpoints with path parameters (mint, signer, address, tokenMint,
    ownerAddress) support batch queries

    via comma-separated values. For example:
    `/api/sol/trades/mint/mint1,mint2,mint3?limit=50`


    - Maximum 10 values per batch request

    - Each value must be a valid address (>= 32 characters)

    - Single values behave identically to non-batch requests

    - Batch response format: `{ "success": true, "results": { "value1": {...},
    "value2": {...} }, "count": N, "timestamp": "..." }`

    - Each key in `results` contains the full single-entity response

    - Queries run in parallel for maximum performance
  version: 1.0.0
servers:
  - url: https://api.raze.bot
    description: >-
      Raze global History API — GeoDNS routes to the nearest region
      automatically
security:
  - ApiKeyAuth: []
paths:
  /api/sol/perp/wallets/{address}/perp-positions:
    get:
      summary: Wallet open perp positions
      description: |
        Derived snapshot of open positions from the `perp_positions` table
        (latest row per `position_pubkey` via ReplacingMergeTree FINAL).

        The response `is_fresh` field reflects the `?fresh=` request parameter.
      operationId: getPerpWalletPositions
      parameters:
        - name: address
          in: path
          required: true
          schema:
            type: string
          example: 62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm
        - name: fresh
          in: query
          schema:
            type: boolean
            default: false
          description: When `true`, the response `is_fresh` field is set to `true`.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PerpWalletPositionsResponse'
components:
  schemas:
    PerpWalletPositionsResponse:
      type: object
      properties:
        address:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/PerpPosition'
        count:
          type: integer
        is_fresh:
          type: boolean
          description: Reflects the `?fresh=` request parameter.
        note:
          type: string
    PerpPosition:
      type: object
      properties:
        market_id:
          type: string
        venue:
          type: string
        position_pubkey:
          type: string
        side:
          type: string
          enum:
            - long
            - short
        size:
          type: integer
          format: int64
        entry_price:
          type: integer
          format: int64
        collateral:
          type: integer
          format: int64
        unrealized_pnl:
          type: integer
          format: int64
        slot:
          type: integer
          format: int64
        snapshot_ts:
          type: integer
          format: int64
        is_open:
          type: boolean
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: apiKey

````