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

# Get Portfolio Credit Information

> Retrieve a portfolio's post-trade credit information.

### Supported Products

* Trade Finance

Use the Prime SDK or CLI to test this endpoint by following the [quickstart](/prime/introduction/quickstart) guide and running with the following examples

<Tabs>
  <Tab title="Java">
    ```java theme={null}
    PortfoliosService portfoliosService = PrimeServiceFactory.createPortfoliosService(client);

    GetPortfolioCreditInformationRequest request = new GetPortfolioCreditInformationRequest.Builder()
        .portfolioId("PORTFOLIO_ID_HERE")
        .build();

    GetPortfolioCreditInformationResponse response = portfoliosService.getPortfolioCreditInformation(request);
    ```

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

  <Tab title=".NET">
    ```csharp wrap theme={null}
    var portfoliosService = new PortfoliosService(client);

    var request = new GetPortfolioCreditInformationRequest("PORTFOLIO_ID_HERE");

    var response = portfoliosService.GetPortfolioCreditInformation(request);
    ```

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

  <Tab title="Go">
    ```go wrap theme={null}
    portfoliosService := portfolios.NewPortfoliosService(client)

    request := &portfolios.GetPortfolioCreditInformationRequest{
        PortfolioId: "PORTFOLIO_ID_HERE",
    }

    response, err := portfoliosService.GetPortfolioCreditInformation(context.Background(), request)
    ```

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

  <Tab title="Python">
    ```python wrap theme={null}
    prime_client = PrimeClient(credentials)

    request = GetPortfolioCreditInformationRequest(
        portfolio_id="PORTFOLIO_ID_HERE",
    )

    response = prime_client.get_portfolio_credit_information(request)
    ```

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

  <Tab title="CLI">
    ```bash wrap theme={null}
    primectl get-credit --help
    ```

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

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

    portfoliosService.getPortfolioCredit({
        portfolioId: 'PORTFOLIO_ID_HERE'
    }).then(async (response) => {
        console.log('Portfolio Credit: ', response);
    })
    ```

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


## OpenAPI

````yaml GET  /v1/portfolios/{portfolio_id}/credit
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}/credit:
    get:
      tags:
        - Financing
      summary: Get Portfolio Credit Information
      description: Retrieve a portfolio's post-trade credit information.
      operationId: PrimeRESTAPI_GetPostTradeCredit
      parameters:
        - name: portfolio_id
          in: path
          description: The portfolio ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/coinbase.public_rest_api.GetPostTradeCreditResponse
components:
  schemas:
    coinbase.public_rest_api.GetPostTradeCreditResponse:
      type: object
      properties:
        post_trade_credit:
          $ref: >-
            #/components/schemas/coinbase.public_rest_api.PostTradeCreditInformation
    coinbase.public_rest_api.PostTradeCreditInformation:
      type: object
      properties:
        portfolio_id:
          type: string
          description: The unique ID of the portfolio
          example: e8bbed13-fa33-41de-86d5-4335d8f08166
        currency:
          type: string
          description: The currency symbol credit is denoted in
          example: USD
        limit:
          type: string
          description: The maximum credit limit
          example: '100000'
        utilized:
          type: string
          description: The amount of credit used
          example: '4000'
        available:
          type: string
          description: The amount of credit available
          example: '96000'
        frozen:
          type: boolean
          description: >-
            Whether or not a portfolio is frozen due to balance outstanding or
            other reason
          example: true
        frozen_reason:
          type: string
          description: The reason why the portfolio is frozen
          example: Portfolio frozen manually by admin
        amounts_due:
          type: array
          items:
            $ref: '#/components/schemas/coinbase.public_rest_api.AmountDue'
        enabled:
          type: boolean
          description: Whether the portfolio has credit enabled
          example: true
        adjusted_credit_utilized:
          type: string
          description: The amount of adjusted credit used
          example: '5000'
        adjusted_portfolio_equity:
          type: string
          description: The amount of adjusted portfolio equity
          example: '2000'
    coinbase.public_rest_api.AmountDue:
      type: object
      properties:
        currency:
          type: string
          description: The currency this loan is due in
          example: BTC
        amount:
          type: string
          description: The amount due
          example: '4000'
        due_date:
          type: string
          description: The date this settlement is due, expressed in UTC
          format: date-time
          example: '2021-05-31T09:59:59.000Z'

````