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

# Get aggregate positions

> 
**Limit: 1 request per 60 seconds**

`GET /v1/client/aggregate/positions`

Only the main account is allowed to call this API.




## OpenAPI

````yaml orderly.openapi get /v1/client/aggregate/positions
openapi: 3.0.1
info:
  title: EVM
  description: ''
  version: 1.0.0
servers:
  - url: https://api.orderly.org
    description: Mainnet
  - url: https://testnet-api.orderly.org
    description: Testnet
security: []
tags:
  - name: public
  - name: private
paths:
  /v1/client/aggregate/positions:
    get:
      tags:
        - private
      summary: Get aggregate positions
      description: |

        **Limit: 1 request per 60 seconds**

        `GET /v1/client/aggregate/positions`

        Only the main account is allowed to call this API.
      parameters:
        - $ref: '#/components/parameters/orderly_timestamp'
        - $ref: '#/components/parameters/orderly_account_id'
        - $ref: '#/components/parameters/orderly_key'
        - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AggregatePositionsResponse'
components:
  parameters:
    orderly_timestamp:
      name: orderly-timestamp
      in: header
      description: Timestamp of the signed request in milliseconds.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: '1649920583000'
    orderly_account_id:
      name: orderly-account-id
      in: header
      description: Account ID of the authenticated account.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: 6.858456565150415e+75
    orderly_key:
      name: orderly-key
      in: header
      description: Public orderly key used to sign the request.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: ed25519:8tm7dnKYkSc3FzgPuJaw1wztr79eeZpN35nHW5pL5XhX
    orderly_signature:
      name: orderly-signature
      in: header
      description: Signature of the request payload generated with the orderly key.
      required: true
      style: simple
      explode: false
      schema:
        type: string
      example: >-
        dG4bkKiqG0dUYLzViRZkvbI6Sy239JxAdNMIBxFZ4w030Jofr0ORV06GHtvXZkaZaWUXE+XAU3fnzKN/5fDeBQ==
  schemas:
    AggregatePositionsResponse:
      allOf:
        - $ref: '#/components/schemas/BasicResponse'
        - type: object
          properties:
            data:
              type: object
              properties:
                rows:
                  description: >-
                    Aggregate position records for the main account and its sub
                    accounts.
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        description: Account ID that owns the position.
                        type: string
                      IMR_withdraw_orders:
                        description: >-
                          Initial margin ratio after accounting for pending
                          withdraw orders.
                        type: number
                      MMR_with_orders:
                        description: >-
                          Maintenance margin ratio after accounting for open
                          orders.
                        type: number
                      average_open_price:
                        description: Average entry price of the position.
                        type: number
                      cost_position:
                        description: Cost basis of the position.
                        type: number
                      est_liq_price:
                        description: Estimated liquidation price of the position.
                        type: number
                      fee_24_h:
                        description: >-
                          Trading fees paid over the last 24 hours for the
                          position.
                        type: number
                      imr:
                        description: Current initial margin ratio of the position.
                        type: number
                      last_sum_unitary_funding:
                        description: >-
                          Latest cumulative unit funding value applied to the
                          position.
                        type: number
                      mark_price:
                        description: Current mark price of the symbol.
                        type: number
                      mmr:
                        description: Current maintenance margin ratio of the position.
                        type: number
                      pending_long_qty:
                        description: Pending long order quantity for the symbol.
                        type: number
                      pending_short_qty:
                        description: Pending short order quantity for the symbol.
                        type: number
                      pnl_24_h:
                        description: Profit and loss over the last 24 hours.
                        type: number
                      position_qty:
                        description: Current position quantity.
                        type: number
                      settle_price:
                        description: Latest settlement price of the symbol.
                        type: number
                      symbol:
                        description: Trading symbol of the position.
                        type: string
                      seq:
                        description: Sequence number of the latest position update.
                        type: number
                      timestamp:
                        description: Timestamp of the position snapshot in milliseconds.
                        type: number
                      updated_time:
                        description: >-
                          Timestamp of the latest position update in
                          milliseconds.
                        type: number
                      unsettled_pnl:
                        description: Unrealized PnL that has not been settled.
                        type: number
                      leverage:
                        description: Effective leverage applied to the position.
                        type: integer
                      margin_mode:
                        description: Margin mode used by the position.
                        type: string
                      margin:
                        description: Margin currently allocated to the position.
                        type: number
                      accrued_funding_fee:
                        description: Funding fee accrued by the position.
                        type: number
              example:
                - account_id: '0x11111'
                  IMR_withdraw_orders: 0.1
                  MMR_with_orders: 0.05
                  average_open_price: 27908.14386047
                  cost_position: -139329.358492
                  est_liq_price: 117335.92899428
                  fee_24_h: 0
                  imr: 0.1
                  last_sum_unitary_funding: 70.38
                  mark_price: 27794.9
                  mmr: 0.05
                  pending_long_qty: 0
                  pending_short_qty: 0
                  pnl_24_h: 0
                  position_qty: -5
                  settle_price: 27865.8716984
                  symbol: PERP_BTC_USDC
                  seq: 1730181536341943600
                  timestamp: 1685429350571
                  updated_time: 1685429350571
                  unsettled_pnl: 354.858492
                  leverage: 10
                - account_id: '0x22222'
                  IMR_withdraw_orders: 0.12
                  MMR_with_orders: 0.06
                  average_open_price: 28000.123456
                  cost_position: -100000.56789
                  est_liq_price: 120000.654321
                  fee_24_h: 5.5
                  imr: 0.12
                  last_sum_unitary_funding: 50.12
                  mark_price: 27794.9
                  mmr: 0.06
                  pending_long_qty: 1
                  pending_short_qty: 0
                  pnl_24_h: 150.75
                  position_qty: -3
                  settle_price: 27950.6789
                  symbol: PERP_BTC_USDC
                  seq: 1730181536341943600
                  timestamp: 1685429350572
                  updated_time: 1685429350571
                  unsettled_pnl: 354.858492
                  leverage: 10
    BasicResponse:
      required:
        - success
      type: object
      properties:
        success:
          description: Indicates whether the request was successful.
          type: boolean
          example: true
        timestamp:
          description: Server timestamp in milliseconds.
          type: integer
          example: 1702989203989

````