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

# Get portfolio details

> Retrieves the summary, positions, and balances of a portfolio.

<Tabs groupId="programming-language">
  <Tab value="Java" title="Java">
    ```java theme={null}
    PortfoliosService portfoliosService = IntxServiceFactory.createPortfoliosService(client);
    GetPortfolioDetailRequest request = new GetPortfolioDetailRequest.Builder()
        .portfolio("portfolio_id")
        .build();
    GetPortfolioDetailResponse response = portfoliosService.getPortfolioDetail(request);
    ```

    For more information, please visit the [INTX Java SDK](https://github.com/coinbase-samples/intx-sdk-java).
  </Tab>

  <Tab value=".NET" title=".NET">
    ```cs theme={null}
    var portfoliosService = new PortfoliosService(client);
    var request = new GetPortfolioDetailsRequest(
        Portfolio: "portfolio_id",
    );
    var response = portfoliosService.GetPortfolioDetails(request);
    ```

    For more information, please visit the [INTX .NET SDK](https://github.com/coinbase-samples/intx-sdk-dotnet).
  </Tab>

  <Tab value="Go" title="Go">
    ```go theme={null}
    portfoliosSvc := portfolios.NewPortfoliosService(client)
    request := &portfolios.GetPortfolioDetailsRequest{
        Portfolio: "portfolio_id",
    }
    response, err := portfoliosSvc.GetPortfolioDetails(context.Background(), request)
    ```

    For more information, please visit the [INTX Go SDK](https://github.com/coinbase-samples/intx-sdk-go).
  </Tab>

  <Tab value="Python" title="Python">
    ```python theme={null}
    client = IntxClient()
    request = GetPortfolioDetailsRequest(
        portfolio="portfolio_id",
    )
    response = client.get_portfolio_details(request)
    ```

    For more information, please visit the [INTX Python SDK](https://github.com/coinbase-samples/intx-sdk-py).
  </Tab>

  <Tab value="Typescript" title="TS/JS">
    ```js theme={null}
    const portfoliosService = new PortfoliosService(client);

    portfoliosService.getPortfolioDetails({
        portfolio: 'PORTFOLIO_ID_HERE',
    }).then(async (response) => {
        console.log('Portfolio Details: ', response);
    })
    ```

    For more information, please visit the [INTX TS SDK](https://github.com/coinbase-samples/intx-sdk-ts).
  </Tab>

  <Tab value="CLI" title="CLI">
    ```
    intxctl get-portfolio-details --help
    ```

    For more information, please visit the [INTX CLI](https://github.com/coinbase-samples/intx-cli).
  </Tab>
</Tabs>


## OpenAPI

````yaml GET  /api/v1/portfolios/{portfolio}/detail
openapi: 3.0.3
info:
  title: REST API
  description: >
    # Welcome to Coinbase INTX API

    ## Introduction

    The INTX APIs allow institutions to trade and manage orders on the
    International Exchange. The following API pages detail various REST API
    endpoints we offer.

    ## Getting Started

    To get started, please visit one of the following pages:

    - [Quickstart](/international-exchange/introduction/quickstart)

    -
    [Overview](/api-reference/international-exchange-api/rest-api/introduction)

    -
    [Authentication](/api-reference/international-exchange-api/rest-api/authentication)

    - [Rate Limits](/international-exchange/introduction/rate-limits-overview)

    ## FIX API

    - [FIX API reference](/international-exchange/fix-api/fix-api-overview)

    ## WebSocket API

    - [WebSocket API
    reference](/international-exchange/websocket-feed/websocket-overview)
  version: '1.0'
servers:
  - url: https://api.international.coinbase.com
security: []
paths:
  /api/v1/portfolios/{portfolio}/detail:
    get:
      tags:
        - Portfolios
      summary: Get portfolio details
      description: Retrieves the summary, positions, and balances of a portfolio.
      operationId: getPortfolioDetail
      parameters:
        - name: portfolio
          in: path
          description: >-
            Identifies the portfolio by UUID (e.g.,
            `892e8c7c-e979-4cad-b61b-55a197932cf1`) or portfolio ID (e.g.,
            `5189861793641175`)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Portfolio information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortfolioDetail_v1'
        '400':
          description: Invalid attribute
      security:
        - auth_client_id: []
          auth_passphrase: []
          auth_signature: []
          auth_timestamp: []
components:
  schemas:
    PortfolioDetail_v1:
      type: object
      properties:
        summary:
          $ref: '#/components/schemas/PortfolioSummary_v1'
        balances:
          type: array
          items:
            $ref: '#/components/schemas/PortfolioBalance_v1'
        positions:
          type: array
          items:
            $ref: '#/components/schemas/PortfolioPosition_v1'
    PortfolioSummary_v1:
      type: object
      properties:
        collateral:
          description: The total collateral value in USDC for the portfolio
          type: string
          example: 14750.53
        unrealized_pnl:
          description: >-
            The profit or loss of all open positions (resets to 0 after
            settlement)
          type: string
          example: 2953.01
        unrealized_pnl_percent:
          description: >-
            The profit or loss percentage of all open positions (resets to 0
            after settlement)
          type: string
          example: 0
        position_notional:
          description: The position value in USDC of all positions
          type: string
          example: 1050.32
        open_position_notional:
          description: The notional value of all open orders and positions
          type: string
          example: 3010.02
        pending_fees:
          description: Accrued fees that haven't been paid yet
          type: string
          example: 120.31
        borrow:
          description: >-
            Total borrow amount in USDC (nets the USDC balance, position PNL,
            held USDC, accrued interest and rolling debt)
          type: string
          example: 4111.32
        accrued_interest:
          description: Interest charged for borrowed USDC balances
          type: string
          example: 10.02
        rolling_debt:
          description: Amount of settled transactions that haven't been paid
          type: string
          example: 311.02
        balance:
          description: >-
            The net balance available in the portfolio (collateral +
            unrealized_pnl - pending_fees - accrued_interest - rolling_debt)
          type: string
          example: 15751.6
        buying_power:
          description: >-
            The amount of buying power available in the portfolio (balance -
            (open_position_notional * portfolio_initial_margin))
          type: string
          example: 14964.02
        portfolio_initial_margin:
          description: >-
            The weighted average of all the position's initial margin
            utilization
          type: number
          format: double
          example: 0.05
        portfolio_current_margin:
          description: The current margin level of the portfolio
          type: number
          format: double
          example: 0.05
        portfolio_maintenance_margin:
          description: The maintenance margin of the portfolio
          type: number
          format: double
          example: 0.033
        portfolio_close_out_margin:
          description: The close out margin of the portfolio
          type: number
          format: double
          example: 0.01665
        in_liquidation:
          description: Indicates whether the portfolio is in process of liquidation
          type: boolean
        portfolio_initial_margin_notional:
          description: The notional initial margin of the portfolio
          type: number
          format: double
          example: 1571.5345
        portfolio_current_margin_notional:
          description: The notional current margin level of the portfolio
          type: number
          format: double
          example: 1571.5345
        portfolio_maintenance_margin_notional:
          description: The notional maintenance margin of the portfolio
          type: number
          format: double
          example: 1023.3081
        portfolio_close_out_margin_notional:
          description: The notional close out margin of the portfolio
          type: number
          format: double
          example: 482.6651
        margin_override:
          description: >-
            The margin override value for the portfolio, indicating notional
            requirement to hold futures positions
          type: number
          format: double
          example: 0.2
        lock_up_initial_margin:
          description: >-
            The effective margin requirement value for the portfolio
            `(max(portfolio_initial_margin, margin_override))`
          type: number
          format: double
          example: 0.3
        loan_collateral_requirement:
          type: string
          example: 0
        position_offset_notional:
          description: The notional value of margin relief provided by position offsets
          type: number
          format: double
          example: 3010.02
    PortfolioBalance_v1:
      type: object
      properties:
        asset_id:
          description: The unique identifier of the asset
          type: string
          example: 14thr7fc-1-1
        asset_name:
          description: Name of the asset
          type: string
          example: BTC
        asset_uuid:
          description: The UUID of the asset
          type: string
          format: uuid
          example: d92669ba-8a04-46d8-9b28-a2bbaeee3b9a
        quantity:
          description: The total amount of the asset in the portfolio
          type: string
          example: 1.75
        hold:
          description: The amount of the balance held from trading activity
          type: string
          example: 0.5
        hold_available_for_collateral:
          description: The amount of the held balance eligible for collateral
          type: string
          example: 0.5
        transfer_hold:
          description: The amount of the balance held from a pending transfer
          type: string
          example: 0.25
        collateral_value:
          description: The collateral value provided by this asset balance
          type: string
          example: 0.9
        max_withdraw_amount:
          description: >-
            The maximum amount of this asset that can be withdrawn on-chain at
            this time given margin requirement constraints
          type: string
          example: 0.9
        loan:
          description: The total quantity of the asset borrowed by the portfolio
          type: string
          example: 1
        loan_collateral_requirement:
          description: The notional collateral requirement to hold the loan
          type: string
          example: 0
        pledged_collateral_quantity:
          description: The amount of the asset pledged as collateral
          type: string
          example: 0.5
        loan_initial_margin_contribution:
          description: >-
            The notional amount this loan contributes to the portfolio initial
            margin notional value
          format: string
          example: 0.07
        collateral_backed_overdraft_loan:
          description: >-
            The quantity of the asset automatically borrowed by the portfolio to
            cover USDC deficits
          type: string
          example: 100.5
        user_requested_loan:
          description: >-
            The quantity of the asset borrowed by the portfolio upon explicit
            request
          type: string
          example: 548.5
        unreconciled_amount:
          description: >-
            The difference between the portfolio's exchange and external balance
            that has not yet been reconciled, for external collateral clients
            only
          type: string
          example: 10.5
        max_undelegate_amount:
          description: >-
            The maximum amount that can be undelegated from the exchange, for
            external collateral clients only
          type: string
          example: 15
    PortfolioPosition_v1:
      type: object
      properties:
        id:
          description: The unique identifier of the position
          type: string
          example: 1tvrktwe-1-457
        uuid:
          description: The UUID of the position
          type: string
          format: uuid
          example: 9ab3d012-77ef-4c1a-bf2e-11234567cd89
        symbol:
          description: Name of the instrument the position is in
          type: string
          example: BTC-PERP
        instrument_id:
          description: The unique identifier of the instrument the position is in
          type: string
          example: 14thr7ft-1-0
        instrument_uuid:
          description: The UUID of the instrument the position is in
          type: string
          format: uuid
          example: 8ca6c040-48df-426b-bb4e-74413909da26
        vwap:
          description: >-
            The price of your position based on the last settlement period.
            During each settlement period (5 minute interval), the VWAP is set
            to equal the mark_price.
          type: string
          example: 31011.75
        net_size:
          description: >-
            The size of the position with positive values reflecting a long
            position and negative values reflecting a short position
          type: string
          example: 1.75
        buy_order_size:
          description: Cumulative size of all the open buy orders
          type: string
          example: 2.65
        sell_order_size:
          description: Cumulative size of all the open sell orders
          type: string
          example: 1.2
        initial_margin:
          description: The risk initial margin ratio for this position
          type: string
          example: 0.05
        im_contribution:
          description: >-
            The amount this position contributes to the initial margin
            (allocated initial margin ratio)
          type: string
          example: 0.07
        unrealized_pnl:
          description: The profit or loss of this position (resets to 0 after settlement)
          type: string
          example: 2953.01
        mark_price:
          description: >-
            The current mark price value for the instrument of this position
            used in risk and margin calculations
          type: string
          example: 20000.63
        index_price:
          description: The index price used for the funding process
          type: string
          example: 20001.45
        entry_vwap:
          description: >-
            Volume weighted entry price of the position (not reset to the last
            funding price)
          type: string
          example: 34021.45
        open_position_notional:
          description: The notional value of the open position
          type: string
          example: 37000
        long_open_position_notional:
          description: The notional value of the open long position
          type: string
          example: 37000
        short_open_position_notional:
          description: The notional value of the open short position
          type: string
          example: 0
        position_margin_override:
          description: The margin override value for this position, if set
          type: string
          example: 0.1
  securitySchemes:
    auth_client_id:
      type: apiKey
      name: CB-ACCESS-KEY
      in: header
      description: The Client ID that owns the API Key for the request
    auth_passphrase:
      type: apiKey
      name: CB-ACCESS-PASSPHRASE
      in: header
      description: The pass phrase affiliated with the API Key
    auth_signature:
      type: apiKey
      name: CB-ACCESS-SIGN
      in: header
      description: >-
        A HMAC SHA-256 signature using the API Key secret on the string
        TIMESTAMP, METHOD, REQUEST_PATH, BODY
    auth_timestamp:
      type: apiKey
      name: CB-ACCESS-TIMESTAMP
      in: header
      description: The timestamp of when the request is being made

````