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

# private/get_positions

> Retrieves all open positions for the authenticated account. Returns position details including size, average entry price, mark price, unrealized P&L, initial margin, maintenance margin, and other position-related information.

Results can be filtered by currency and instrument kind (future, option, etc.). To retrieve positions for a specific subaccount, use the `subaccount_id` parameter.

**Scope:** `rat#view` or `wallet:accounts:read`

[Try in API console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_positions)





## OpenAPI

````yaml /api-reference/coinbase-deribit-app-api/adv-starbase-openapi.json get /private/get_positions
openapi: 3.0.0
info:
  description: Coinbase Retail Advanced Trade API for derivatives trading.
  title: Coinbase Retail Advanced Trade (Deribit) API
  version: 2.1.1
servers:
  - url: https://drb.coinbase.com/api/v2
security: []
tags:
  - description: Can only be used over websockets.
    name: WebSocket Only
  - description: Public methods can be used without authentication.
    name: Public
  - description: >-
      <p>Private methods require authentication. All requests must include a
      valid OAuth2 token.</p>

      <p>A token can be requested using the <a
      href="#public-auth">/public/auth</a> method.</p>

      <p>When using the websockets protocol, the token must be included as a
      parameter <code>access_token</code> in the message. When using REST (HTTP
      GET), the token may also be passed in the <code>Authorization</code>
      header.</p>
    name: Private
  - name: Authentication
  - name: Session Management
  - description: >-
      Subscription works as [notifications](#notifications), so users will
      automatically (after subscribing) receive messages from the server.
      Overview for each channel response format is described in
      [subscriptions](#subscriptions) section.
    name: Subscription Management
  - name: Account Management
  - name: Trading
  - name: Market Data
paths:
  /private/get_positions:
    get:
      tags:
        - Account Management
        - Private
      description: >+
        Retrieves all open positions for the authenticated account. Returns
        position details including size, average entry price, mark price,
        unrealized P&L, initial margin, maintenance margin, and other
        position-related information.


        Results can be filtered by currency and instrument kind (future, option,
        etc.). To retrieve positions for a specific subaccount, use the
        `subaccount_id` parameter.


        **Scope:** `rat#view` or `wallet:accounts:read`


        [Try in API
        console](https://test.deribit.com/api_console?method=%2Fprivate%2Fget_positions)

      parameters:
        - in: query
          name: currency
          required: false
          schema:
            $ref: '#/components/schemas/currency_with_any'
            example: BTC
        - description: Kind filter on positions
          in: query
          name: kind
          required: false
          schema:
            $ref: '#/components/schemas/kind_without_spot'
            example: future
        - description: The user id for the subaccount
          in: query
          name: subaccount_id
          required: false
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            examples:
              request:
                description: JSON-RPC Request Example
                value:
                  id: 2236
                  jsonrpc: '2.0'
                  method: private/get_positions
                  params:
                    currency: BTC
                    kind: future
        description: JSON-RPC request body
      responses:
        '200':
          $ref: '#/components/responses/PrivateGetPositionsResponse'
        '400':
          $ref: '#/components/responses/ErrorMessageResponse'
components:
  schemas:
    currency_with_any:
      description: Currency name or `"any"` if don't care
      enum:
        - BTC
        - ETH
        - USDC
        - USDT
        - EURR
        - any
      type: string
    kind_without_spot:
      description: >-
        Instrument kind: `"future"`, `"option"`, `"future_combo"`,
        `"option_combo"` (spot is excluded as spot trades are settled
        immediately and have no open positions)
      enum:
        - future
        - option
        - future_combo
        - option_combo
      type: string
    PrivateGetPositionsResponse:
      properties:
        id:
          description: The id that was sent in the request
          type: integer
        jsonrpc:
          description: The JSON-RPC version (2.0)
          enum:
            - '2.0'
          type: string
        result:
          items:
            $ref: '#/components/schemas/position_with_elp'
          type: array
      required:
        - jsonrpc
        - result
      type: object
    ErrorMessageResponse:
      properties:
        error:
          type: integer
        id:
          description: The id that was sent in the request
          type: integer
        jsonrpc:
          description: The JSON-RPC version (2.0)
          enum:
            - '2.0'
          type: string
        message:
          type: string
      required:
        - jsonrpc
        - message
        - error
      type: object
    position_with_elp:
      allOf:
        - $ref: '#/components/schemas/position'
        - properties:
            estimated_liquidation_price:
              description: >-
                Estimated liquidation price, added only for futures, for users
                with `segregated_sm` margin model
              type: number
            open_orders_margin:
              description: Open orders margin
              type: number
          required:
            - estimated_liquidation_price
            - open_orders_margin
    position:
      properties:
        average_price:
          description: Average price of trades that built this position
          type: number
        average_price_usd:
          description: Only for options, average price in USD
          type: number
        delta:
          description: Delta parameter
          type: number
        direction:
          $ref: '#/components/schemas/position_direction'
        floating_profit_loss:
          description: Floating profit or loss
          type: number
        floating_profit_loss_usd:
          description: Only for options, floating profit or loss in USD
          type: number
        gamma:
          description: Only for options, Gamma parameter
          type: number
        index_price:
          description: Current index price
          type: number
        initial_margin:
          description: Initial margin
          type: number
        instrument_name:
          $ref: '#/components/schemas/instrument_name'
        interest_value:
          description: Value used to calculate `realized_funding` (perpetual only)
          type: number
        kind:
          $ref: '#/components/schemas/kind'
        leverage:
          description: Current available leverage for future position
          type: integer
        maintenance_margin:
          description: Maintenance margin
          type: number
        mark_price:
          description: Current mark price for position's instrument
          type: number
        realized_funding:
          description: >-
            Realized Funding in current session included in session realized
            profit or loss, only for positions of perpetual instruments
          type: number
        realized_profit_loss:
          description: Realized profit or loss
          type: number
        settlement_price:
          description: >-
            Optional (not added for spot). Last settlement price for position's
            instrument 0 if instrument wasn't settled yet
          type: number
        size:
          description: >-
            Position size for futures size in quote currency (e.g. USD), for
            options size is in base currency (e.g. BTC)
          type: number
        size_currency:
          description: Only for futures, position size in base currency
          type: number
        theta:
          description: Only for options, Theta parameter
          type: number
        total_profit_loss:
          description: Profit or loss from position
          type: number
        vega:
          description: Only for options, Vega parameter
          type: number
      required:
        - instrument_name
        - kind
        - average_price
        - direction
        - mark_price
        - delta
        - index_price
        - initial_margin
        - maintenance_margin
        - settlement_price
        - total_profit_loss
        - floating_profit_loss
        - realized_profit_loss
        - size
      type: object
    position_direction:
      description: 'Direction: `buy`, `sell` or `zero`'
      enum:
        - buy
        - sell
        - zero
      type: string
    instrument_name:
      description: Unique instrument identifier
      example: BTC-PERPETUAL
      type: string
    kind:
      description: >-
        Instrument kind: `"future"`, `"option"`, `"spot"`, `"future_combo"`,
        `"option_combo"`
      enum:
        - future
        - option
        - spot
        - future_combo
        - option_combo
      type: string
  responses:
    PrivateGetPositionsResponse:
      content:
        application/json:
          examples:
            response:
              description: Response example
              value:
                id: 2236
                jsonrpc: '2.0'
                result:
                  - average_price: 7440.18
                    delta: 0.006687487
                    direction: buy
                    estimated_liquidation_price: 1.74
                    floating_profit_loss: 0
                    index_price: 7466.79
                    initial_margin: 0.000197283
                    instrument_name: BTC-PERPETUAL
                    interest_value: 1.7362511643080387
                    kind: future
                    leverage: 34
                    maintenance_margin: 0.000143783
                    mark_price: 7476.65
                    open_orders_margin: 0.000197288
                    realized_funding: -1.e-8
                    realized_profit_loss: -9.e-9
                    settlement_price: 7476.65
                    size: 50
                    size_currency: 0.006687487
                    total_profit_loss: 0.000032781
          schema:
            $ref: '#/components/schemas/PrivateGetPositionsResponse'
      description: Success response
    ErrorMessageResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorMessageResponse'
      description: Success response

````