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

# Get apiv1borrow lendaccount



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/borrow_lend/account
openapi: 3.1.0
info:
  title: Decibel Trading API
  description: >-
    RESTful API for Decibel. Provides read-only endpoints for market data,
    trading operations, positions, and analytics.
  contact:
    name: Decibel Team
    url: https://decibel.trade/
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.mainnet.aptoslabs.com/decibel
    description: Mainnet
  - url: https://api.testnet.aptoslabs.com/decibel
    description: Testnet
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Market information and real-time data endpoints
  - name: User
    description: User information and account management
  - name: Account
    description: Account-specific endpoints and data
  - name: Trades
    description: Trading operations and history
  - name: Positions
    description: User position management
  - name: Orders
    description: Order management and history
  - name: TWAP
    description: Time-weighted average price orders
  - name: Bulk Orders
    description: Bulk order management
  - name: Vaults
    description: Vault operations and management
  - name: Analytics
    description: Analytics and performance metrics
  - name: Points
    description: Points-related account metrics
  - name: Trading Points
    description: Trading points endpoints
  - name: Trading Hz
    description: Trading Hz endpoints
  - name: Tier
    description: Tier information endpoints
  - name: Streaks
    description: User streak tracking endpoints
  - name: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
  - name: Affiliates
    description: Affiliate code and earnings endpoints
  - name: Campaigns
    description: On-chain reward campaign endpoints
paths:
  /api/v1/borrow_lend/account:
    get:
      tags:
        - Borrow/Lend
      operationId: handle_account
      parameters:
        - name: account
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BorrowLendAccountDto'
        '400':
          description: Invalid account
        '503':
          description: State unavailable
components:
  schemas:
    BorrowLendAccountDto:
      type: object
      required:
        - account
        - primary_asset
        - primary_decimals
        - indices_as_of_secs
        - debt_usdc
        - rescue_enabled
        - pledges
        - collateral_value_usdc
        - max_weighted_collateral_usdc
        - borrow_capacity_usdc
        - liquidatable
        - lending_positions
        - lender_claim_usdc
      properties:
        account:
          type: string
        borrow_capacity_usdc:
          type: string
        collateral_value_usdc:
          type: string
        debt_interest_usdc:
          type:
            - string
            - 'null'
          description: >-
            The interest a repay of the whole `debt_usdc` would report: interest

            carried over from earlier syncs plus accrual since the last one,
            capped

            by `debt_usdc`.
        debt_principal_usdc:
          type:
            - string
            - 'null'
          description: '`debt_usdc` minus `debt_interest_usdc`.'
        debt_split_unavailable:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/BorrowLendHistoryUnavailable'
              description: >-
                Null when both debt split fields are present; otherwise why they
                are null.
        debt_usdc:
          type: string
          description: >-
            Debt at the chain's last recorded index update; no off-chain
            accrual.
        indices_as_of_secs:
          type: string
          description: |-
            Unix seconds of the chain's last recorded index update, which every
            amount here is valued at.
        lender_claim_usdc:
          type: string
          description: The primary share store's claim at the indices above.
        lender_earned_usdc:
          type:
            - string
            - 'null'
          description: >-
            Lifetime, signed: `lender_claim_usdc` minus

            `lender_net_supplied_usdc`, which equals
            `lender_realized_earned_usdc`

            plus `lender_interest_earned_usdc`. Negative after a socialized
            loss.
        lender_earnings_unavailable:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/BorrowLendHistoryUnavailable'
              description: >-
                Null when every lender earnings field is present; otherwise why
                they are null.
        lender_interest_earned_usdc:
          type:
            - string
            - 'null'
          description: |-
            Signed: `lender_claim_usdc` minus `lender_principal_usdc`, the
            earnings on the current position only.
        lender_net_supplied_usdc:
          type:
            - string
            - 'null'
          description: >-
            Lifetime, signed: `lender_supplied_total_usdc` minus

            `lender_redeemed_total_usdc`. Negative once redemptions exceed
            deposits.
        lender_principal_usdc:
          type:
            - string
            - 'null'
          description: >-
            Average cost of the shares held now: each redeem releases principal
            in

            proportion to the shares it burns. 0 after a full exit.
        lender_realized_earned_usdc:
          type:
            - string
            - 'null'
          description: >-
            Signed: redeemed cash minus the principal those redeems released,
            over

            every position the account has held.
        lender_redeemed_total_usdc:
          type:
            - string
            - 'null'
        lender_supplied_total_usdc:
          type:
            - string
            - 'null'
        lending_positions:
          type: array
          items:
            $ref: '#/components/schemas/LendingPositionDto'
          description: |-
            The account's primary dLEND share store, if it has one. Shares in a
            secondary store are not the account's position, matching the chain's
            `lender_position`.
        liquidatable:
          type: boolean
        max_weighted_collateral_usdc:
          type: string
        pledges:
          type: array
          items:
            $ref: '#/components/schemas/BorrowLendPledgeDto'
        primary_asset:
          type: string
        primary_decimals:
          type: integer
          format: int32
          minimum: 0
        rescue_enabled:
          type: boolean
          description: |-
            Always present. An account with no borrower record reads the chain
            default, true.
    BorrowLendHistoryUnavailable:
      type: string
      description: |-
        Why a split is null. The debt split only ever reports
        `interest_not_reported`; the lender split `history_lagging` or
        `history_inconsistent`.
      enum:
        - history_lagging
        - history_inconsistent
        - interest_not_reported
    LendingPositionDto:
      type: object
      required:
        - store_address
        - shares
        - claim_usdc
        - frozen
      properties:
        claim_usdc:
          type: string
        frozen:
          type: boolean
        shares:
          type: string
        store_address:
          type: string
    BorrowLendPledgeDto:
      type: object
      required:
        - asset
        - decimals
        - amount
        - value_usdc
      properties:
        amount:
          type: string
        asset:
          type: string
        decimals:
          type: integer
          format: int32
          minimum: 0
        value_usdc:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.