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

# Get account positions

> Retrieve all open positions for a specific account with optional filtering by market.
Includes position size, entry price, unrealized PnL, liquidation price, and margin details.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/account_positions
openapi: 3.1.0
info:
  title: Decibel Trading API
  description: >-
    RESTful API for Decibel. Provides read-only endpoints for market data,
    trading operations, positions, and analytics.
  contact:
    name: Decibel Team
    url: https://decibel.trade/
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.mainnet.aptoslabs.com/decibel
    description: Mainnet
  - url: https://api.testnet.aptoslabs.com/decibel
    description: Testnet
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Market information and real-time data endpoints
  - name: User
    description: User information and account management
  - name: Trades
    description: Trading operations and history
  - name: Positions
    description: User position management
  - name: Orders
    description: Order management and history
  - name: TWAP
    description: Time-weighted average price orders
  - name: Bulk Orders
    description: Bulk order management
  - name: Vaults
    description: Vault operations and management
  - name: Analytics
    description: Analytics and performance metrics
  - name: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
paths:
  /api/v1/account_positions:
    get:
      tags:
        - Account
      summary: Get account positions
      description: >-
        Retrieve all open positions for a specific account with optional
        filtering by market.

        Includes position size, entry price, unrealized PnL, liquidation price,
        and margin details.
      operationId: handle_account_positions
      parameters:
        - name: account
          in: query
          description: Account address
          required: true
          schema:
            type: string
          example: 0x123...
        - name: limit
          in: query
          description: Maximum number of positions to return
          required: false
          schema:
            type: integer
            format: int32
            default: 500
            minimum: 0
          example: 10
        - name: include_deleted
          in: query
          description: Include deleted positions
          required: false
          schema:
            type: boolean
          example: false
        - name: market_address
          in: query
          description: Filter by specific market address
          required: false
          schema:
            type: string
          example: 0xmarket123...
      responses:
        '200':
          description: Account positions retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PositionDto'
        '500':
          description: Database error
components:
  schemas:
    PositionDto:
      type: object
      required:
        - market
        - user
        - size
        - user_leverage
        - entry_price
        - is_isolated
        - is_deleted
        - unrealized_funding
        - estimated_liquidation_price
        - transaction_version
        - has_fixed_sized_tpsls
      properties:
        entry_price:
          type: number
          format: double
        estimated_liquidation_price:
          type: number
          format: double
        has_fixed_sized_tpsls:
          type: boolean
        is_deleted:
          type: boolean
        is_isolated:
          type: boolean
        market:
          type: string
        size:
          type: number
          format: double
        sl_limit_price:
          type:
            - number
            - 'null'
          format: double
        sl_order_id:
          type:
            - string
            - 'null'
        sl_trigger_price:
          type:
            - number
            - 'null'
          format: double
        tp_limit_price:
          type:
            - number
            - 'null'
          format: double
        tp_order_id:
          type:
            - string
            - 'null'
        tp_trigger_price:
          type:
            - number
            - 'null'
          format: double
        transaction_version:
          type: integer
          format: int64
          minimum: 0
        unrealized_funding:
          type: number
          format: double
        user:
          type: string
        user_leverage:
          type: integer
          format: int32
          minimum: 0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````