> ## 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
        - pledges
        - collateral_value_in_primary
        - max_weighted_collateral_in_primary
        - borrow_capacity_in_primary
        - liquidatable
        - lending_positions
        - lender_claim_in_primary
      properties:
        account:
          type: string
        borrow_capacity_in_primary:
          type: string
        collateral_value_in_primary:
          type: string
        debt:
          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_in_primary:
          type: string
        lending_positions:
          type: array
          items:
            $ref: '#/components/schemas/LendingPositionDto'
        liquidatable:
          type: boolean
        max_weighted_collateral_in_primary:
          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
            - 'null'
          description: None when the account has no borrower record.
    LendingPositionDto:
      type: object
      required:
        - store_address
        - shares
        - claim_in_primary
        - frozen
      properties:
        claim_in_primary:
          type: string
        frozen:
          type: boolean
        shares:
          type: string
        store_address:
          type: string
    BorrowLendPledgeDto:
      type: object
      required:
        - asset
        - decimals
        - amount
        - value_in_primary
      properties:
        amount:
          type: string
        asset:
          type: string
        decimals:
          type: integer
          format: int32
          minimum: 0
        value_in_primary:
          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.