> ## 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 Buying Power

> Returns the size of a buy trade that can be performed based on existing holdings and available credit. The result will differ for different assets due to asset specific credit configurations and caps. Note that this result is changing based on asset price fluctuations, so may be rejected when submitted.

### Supported Products

* Portfolio Margin
* Trade Finance


## OpenAPI

````yaml GET /v1/portfolios/{portfolio_id}/buying_power
openapi: 3.0.1
info:
  title: REST API
  description: >-
    The Coinbase Prime REST API provides programmatic access to trading,
    custody, staking, market data, and account management functionality.
  version: '0.1'
servers:
  - url: https://api.prime.coinbase.com/
security: []
tags:
  - name: PrimeRESTAPI
paths:
  /v1/portfolios/{portfolio_id}/buying_power:
    get:
      tags:
        - Financing
      summary: Get Portfolio Buying Power
      description: >-
        Returns the size of a buy trade that can be performed based on existing
        holdings and available credit. The result will differ for different
        assets due to asset specific credit configurations and caps. Note that
        this result is changing based on asset price fluctuations, so may be
        rejected when submitted.
      operationId: PrimeRESTAPI_GetBuyingPower
      parameters:
        - name: portfolio_id
          in: path
          description: The unique ID of the portfolio
          required: true
          schema:
            type: string
        - name: base_currency
          in: query
          description: The symbol for the base currency
          required: true
          schema:
            type: string
        - name: quote_currency
          in: query
          description: The symbol for the quote currency
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_rest_api.GetBuyingPowerResponse
components:
  schemas:
    coinbase.public_rest_api.GetBuyingPowerResponse:
      type: object
      properties:
        buying_power:
          $ref: '#/components/schemas/coinbase.public_rest_api.BuyingPower'
    coinbase.public_rest_api.BuyingPower:
      type: object
      properties:
        portfolio_id:
          type: string
          description: The unique ID of the portfolio
          example: e8bbed13-fa33-41de-86d5-4335d8f08166
        base_currency:
          type: string
          description: The symbol for the base currency
          example: BTC
        quote_currency:
          type: string
          description: The symbol for the quote currency
          example: USD
        base_buying_power:
          type: string
          description: The buying power for the base currency
          example: '3.8533347963443316'
        quote_buying_power:
          type: string
          description: The buying power for the quote currency
          example: '2051207.48454132'

````