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

# Deposit collateral

> Adds more collateral to an existing loan position.



## OpenAPI

````yaml post /markets/creditbook/collateral/deposit
openapi: 3.1.3
info:
  title: Loopscale API
  version: 1.0.0
servers:
  - url: https://tars.loopscale.com/v1
    description: Loopscale Production Server
security: []
paths:
  /markets/creditbook/collateral/deposit:
    post:
      tags:
        - Markets
      summary: Deposit collateral
      description: Adds more collateral to an existing loan position.
      operationId: depositCollateral
      parameters:
        - name: user-wallet
          in: header
          required: true
          schema:
            type: string
          description: Wallet address of the borrower adding collateral.
        - name: payer
          in: header
          required: false
          schema:
            type: string
          description: Optional fee payer. Defaults to `user-wallet` when omitted.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepositCollateralActionRequest'
      responses:
        '200':
          description: Serialized transaction for depositing collateral.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VersionedTransactionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/GeneralError'
components:
  schemas:
    DepositCollateralActionRequest:
      type: object
      required:
        - loan
        - depositMint
        - amount
        - assetType
        - assetIdentifier
      properties:
        loan:
          type: string
        depositMint:
          type: string
        amount:
          type: number
        assetType:
          type: integer
          description: Loopscale collateral asset type enum value.
        assetIdentifier:
          type: string
          description: Collateral asset identifier used by market information.
        assetIndexGuidance:
          $ref: '#/components/schemas/AssetIndexGuidance'
        expectedLoanValues:
          $ref: '#/components/schemas/ExpectedLoanValues'
    VersionedTransactionResponse:
      type: object
      required:
        - message
        - signatures
      properties:
        message:
          type: string
          description: Base64-encoded versioned transaction message
        signatures:
          type: array
          items:
            $ref: '#/components/schemas/VersionedTransactionSignature'
    AssetIndexGuidance:
      type: array
      items:
        type: integer
      description: >-
        Optional oracle asset ordering hints used by Loopscale when validating a
        transaction.
    ExpectedLoanValues:
      type: object
      required:
        - expectedApy
        - expectedLqt
      properties:
        expectedApy:
          type: number
          description: Expected APY in cBPS
        expectedLqt:
          type: array
          items:
            type: number
          description: Expected liquidation thresholds per ledger (cBPS)
    VersionedTransactionSignature:
      type: object
      required:
        - publicKey
        - signature
      properties:
        publicKey:
          type: string
        signature:
          type: string
  responses:
    BadRequest:
      description: Bad Request
      content:
        text/plain:
          schema:
            type: string
            example: 'Something went wrong: You have an error in your SQL syntax.'
    GeneralError:
      description: General Server Error
      content:
        text/plain:
          schema:
            type: string
            example: >-
              Failed to deserialize the JSON body into the target type: missing
              field `mints` at line 1 column 1.

````