> ## 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.

# Account positions

> Account's open positions with PnL and liquidation prices



## AsyncAPI

````yaml api-reference/asyncapi.json accountPositions
id: accountPositions
title: Account positions
description: Account's open positions with PnL and liquidation prices
servers:
  - id: testnet
    protocol: wss
    host: api.testnet.aptoslabs.com/decibel/ws
    bindings: []
    variables: []
address: account_positions:{accountAddr}
parameters:
  - id: accountAddr
    jsonSchema:
      type: string
      description: Account address (Aptos address format, e.g. 0x123...)
    description: Account address (Aptos address format, e.g. 0x123...)
    type: string
    required: true
    deprecated: false
bindings: []
operations:
  - &ref_6
    id: receiveaccountPositions
    title: Receiveaccount positions
    description: >-
      Receive updates for account's open positions with pnl and liquidation
      prices
    type: receive
    messages:
      - &ref_7
        id: AccountPositionsMessage
        payload:
          - name: AccountPositionsMessage
            description: Account's open positions with PnL and liquidation prices
            type: object
            properties:
              - name: positions
                type: array
                required: true
                properties:
                  - name: entry_price
                    type: number
                    required: true
                  - name: estimated_liquidation_price
                    type: number
                    required: true
                  - name: has_fixed_sized_tpsls
                    type: boolean
                    required: true
                  - name: is_deleted
                    type: boolean
                    required: true
                  - name: is_isolated
                    type: boolean
                    required: true
                  - name: market
                    type: string
                    required: true
                  - name: size
                    type: number
                    required: true
                  - name: sl_limit_price
                    type: &ref_0
                      - number
                      - 'null'
                    required: false
                  - name: sl_order_id
                    type: &ref_1
                      - string
                      - 'null'
                    required: false
                  - name: sl_trigger_price
                    type: &ref_2
                      - number
                      - 'null'
                    required: false
                  - name: tp_limit_price
                    type: &ref_3
                      - number
                      - 'null'
                    required: false
                  - name: tp_order_id
                    type: &ref_4
                      - string
                      - 'null'
                    required: false
                  - name: tp_trigger_price
                    type: &ref_5
                      - number
                      - 'null'
                    required: false
                  - name: transaction_version
                    type: integer
                    required: true
                  - name: unrealized_funding
                    type: number
                    required: true
                  - name: user
                    type: string
                    required: true
                  - name: user_leverage
                    type: integer
                    required: true
              - name: topic
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - topic
            - positions
          properties:
            positions:
              type: array
              items:
                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
                    x-parser-schema-id: <anonymous-schema-40>
                  estimated_liquidation_price:
                    type: number
                    format: double
                    x-parser-schema-id: <anonymous-schema-41>
                  has_fixed_sized_tpsls:
                    type: boolean
                    x-parser-schema-id: <anonymous-schema-42>
                  is_deleted:
                    type: boolean
                    x-parser-schema-id: <anonymous-schema-43>
                  is_isolated:
                    type: boolean
                    x-parser-schema-id: <anonymous-schema-44>
                  market:
                    type: string
                    x-parser-schema-id: <anonymous-schema-45>
                  size:
                    type: number
                    format: double
                    x-parser-schema-id: <anonymous-schema-46>
                  sl_limit_price:
                    type: *ref_0
                    format: double
                    x-parser-schema-id: <anonymous-schema-47>
                  sl_order_id:
                    type: *ref_1
                    x-parser-schema-id: <anonymous-schema-48>
                  sl_trigger_price:
                    type: *ref_2
                    format: double
                    x-parser-schema-id: <anonymous-schema-49>
                  tp_limit_price:
                    type: *ref_3
                    format: double
                    x-parser-schema-id: <anonymous-schema-50>
                  tp_order_id:
                    type: *ref_4
                    x-parser-schema-id: <anonymous-schema-51>
                  tp_trigger_price:
                    type: *ref_5
                    format: double
                    x-parser-schema-id: <anonymous-schema-52>
                  transaction_version:
                    type: integer
                    format: int64
                    minimum: 0
                    x-parser-schema-id: <anonymous-schema-53>
                  unrealized_funding:
                    type: number
                    format: double
                    x-parser-schema-id: <anonymous-schema-54>
                  user:
                    type: string
                    x-parser-schema-id: <anonymous-schema-55>
                  user_leverage:
                    type: integer
                    format: int32
                    minimum: 0
                    x-parser-schema-id: <anonymous-schema-56>
                x-parser-schema-id: PositionDto
              x-parser-schema-id: <anonymous-schema-39>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-57>
          x-parser-schema-id: AccountPositionsResponse
        title: Account positions message
        description: Account's open positions with PnL and liquidation prices
        example: |-
          {
            "topic": "account_positions:0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
            "positions": [
              {
                "market": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
                "user": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
                "size": 2.5,
                "user_leverage": 10,
                "entry_price": 49800,
                "is_isolated": false,
                "is_deleted": false,
                "unrealized_funding": -25.5,
                "estimated_liquidation_price": 45000,
                "transaction_version": 12345681,
                "tp_order_id": "tp_001",
                "tp_trigger_price": 52000,
                "tp_limit_price": 51900,
                "sl_order_id": "sl_001",
                "sl_trigger_price": 48000,
                "sl_limit_price": null,
                "has_fixed_sized_tpsls": false
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: AccountPositionsMessage
          - id: x-parser-message-name
            value: AccountPositionsMessage
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: accountPositions
sendOperations:
  - *ref_6
receiveOperations: []
sendMessages:
  - *ref_7
receiveMessages: []
extensions:
  - id: x-parser-unique-object-id
    value: accountPositions
securitySchemes: []

````