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

# View max loan availability

> View the maximum amount of loan that could be acquired now

<Tabs groupId="programming-language">
  <Tab value="Typescript" title="TS/JS">
    ```js theme={null}
    const positionOffsetsService = new PositionOffsetsService(client);

    positionOffsetsService.getAssetLoanAvailability({
        portfolio: 'PORTFOLIO_ID_HERE',
        asset: 'ETH',
    }).then(async (response) => {
        console.log('Available Asset Loan: ', response);
    })
    ```

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


## OpenAPI

````yaml GET /api/v1/portfolios/{portfolio}/loans/{asset}/availability
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}/loans/{asset}/availability:
    get:
      tags:
        - Portfolios
      summary: View max loan availability
      description: View the maximum amount of loan that could be acquired now
      operationId: portfolioLoanAvailability
      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
        - name: asset
          in: path
          description: >-
            Identifies the asset by name (e.g., `BTC`), UUID (e.g.,
            `291efb0f-2396-4d41-ad03-db3b2311cb2c`), or asset ID (e.g.,
            `1482439423963469`)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Max loan amount available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortfolioGetAvailableLoanResult_v1'
        '400':
          description: Invalid attribute
      security:
        - auth_client_id: []
          auth_passphrase: []
          auth_signature: []
          auth_timestamp: []
components:
  schemas:
    PortfolioGetAvailableLoanResult_v1:
      type: object
      properties:
        available:
          type: string
          example: 50000
  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

````