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

# Borrow More

> Draw additional funds against an existing loan

Increases the borrowed amount on an active loan without posting more collateral. The contract reverts if the resulting debt would exceed what the existing collateral supports at the current price.

Single transaction in both modes. No approval is involved because funds move out of the pool, not in.

<Warning>
  A loan carrying a stamped fixed rate cannot be drawn on again. The extra principal would ride on a rate stamped for a different amount at a different time, so the market refuses it. The call comes back as `FIXED_RATE_LOAN` and the message names the stamped rate. Open a new loan at current terms instead.
</Warning>

## Path Parameters

<ParamField path="marketId" type="string" required>Market ID.</ParamField>

## Body Parameters

<ParamField body="loanId" type="integer" required>
  On-chain loan ID. A positive integer. Accepted as a JSON number or as a numeric string, so the value [Get Loan](/endpoints/lending/get-loan) returns passes straight back.
</ParamField>

<ParamField body="amount" type="string" required>
  Additional amount to borrow, as a decimal string in borrow asset units.
</ParamField>

<ParamField body="signedPrice" type="object">
  EIP-712 signed price from [Sign Price](/endpoints/lending/sign-price). Omit to price against the stored oracle value.

  <Expandable>
    <ParamField body="price" type="string">Price in base units.</ParamField>
    <ParamField body="timestamp" type="integer">Signing timestamp.</ParamField>
    <ParamField body="validUntil" type="integer">Signature expiry.</ParamField>
    <ParamField body="signature" type="string">EIP-712 signature.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="txHash" type="string">
  Hash of the transaction you broadcast for this operation. Send it to confirm the transaction and record the result. Omit it to receive the calldata.
</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="txHash" type="string">Transaction hash. Returned when confirming with `txHash`.</ResponseField>
    <ResponseField name="loanId" type="integer">Loan ID, echoed back. Returned when confirming with `txHash`.</ResponseField>
    <ResponseField name="additionalBorrow" type="string">Amount borrowed, echoed back. Returned when confirming with `txHash`.</ResponseField>
    <ResponseField name="action" type="string">`SIGN_TRANSACTION` when `txHash` is omitted.</ResponseField>
    <ResponseField name="transaction" type="object">Unsigned transaction, `{ to, data, value, chainId }`, for the `borrowMore` call. Returned when `txHash` is omitted.</ResponseField>
    <ResponseField name="functionName" type="string">`borrowMore`. Returned when `txHash` is omitted.</ResponseField>
    <ResponseField name="warnings" type="array">Present when a preflight found something that does not block the draw: the collateral instrument's recorded maturity, or a market whose lender of record has published no terms of use. Same shape and same `kind` values as on [Open Loan](/endpoints/lending/open-loan#warnings).</ResponseField>
  </Expandable>
</ResponseField>

<Warning>
  Borrowing more moves the loan closer to its liquidation threshold. Read the resulting health factor from [Get Loan](/endpoints/lending/get-loan) afterwards, and expose it to the borrower before they commit.
</Warning>

<Note>
  Capacity is checked before any transaction is offered. An amount past what the collateral supports is refused with `EXCEEDS_MAX_BORROW`, and one the pool cannot fund with `INSUFFICIENT_LIQUIDITY`. That check is skipped when a `signedPrice` is supplied, because the contract then prices against the signature rather than the stored value. In that case the amount reverts on-chain instead. Compute headroom from [Get Max Borrow](/endpoints/lending/get-max-borrow) against the loan's collateral, less outstanding principal and accrued interest.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.trusset.org/lending-external-securities/api/positions/{marketId}/borrow-more" \
    -H "X-API-Key: trusset_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{"loanId": 5, "amount": "10000"}'
  ```
</RequestExample>

<ResponseExample>
  ```json Calldata Response theme={null}
  {
    "success": true,
    "data": {
      "action": "SIGN_TRANSACTION",
      "transaction": { "to": "0x70A0...", "data": "0x..." },
      "functionName": "borrowMore"
    }
  }
  ```

  ```json Confirmed Response theme={null}
  {
    "success": true,
    "data": {
      "txHash": "0xabc...def",
      "loanId": 5,
      "additionalBorrow": "10000"
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code                       | HTTP  | Cause                                                                                                                                                                       |
| -------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NO_MARKET_ADDRESS`        | `400` | The market has no on-chain address recorded                                                                                                                                 |
| `VALIDATION_ERROR`         | `400` | `loanId` is not a positive integer, or `amount` carries more decimal places than the borrow asset supports                                                                  |
| `LOAN_NOT_ACTIVE`          | `400` | The loan is closed and can no longer be modified                                                                                                                            |
| `MARKET_PAUSED`            | `400` | The market is paused. Its admin must unpause it                                                                                                                             |
| `PRICE_STALE`              | `400` | The oracle price is outside the market's `maxPriceAge`. Push a NAV with [Sync Oracle Price](/endpoints/lending/sync-oracle), or supply a `signedPrice`                      |
| `EXCEEDS_MAX_BORROW`       | `400` | The request would take the loan past what its collateral supports. Skipped when a `signedPrice` is supplied                                                                 |
| `INSUFFICIENT_LIQUIDITY`   | `400` | The pool holds less available liquidity than the request needs                                                                                                              |
| `IDENTITY_NOT_VERIFIED`    | `400` | The borrower is no longer verified on the market's identity registry. `borrowMore` runs the same gate as `openLoan`, so a registration that lapsed mid-loan is refused here |
| `LOAN_NOT_FOUND`           | `404` | No loan with that ID exists on this market                                                                                                                                  |
| `MARKET_NOT_FOUND`         | `404` | No market with this ID on your instance                                                                                                                                     |
| `MARKET_PENDING_CURATOR`   | `409` | The market has no lender of record yet. See [Lender of record](/endpoints/lending/introduction#lender-of-record)                                                            |
| `FIXED_RATE_LOAN`          | `409` | The loan carries a stamped fixed rate, so the market refuses an additional draw                                                                                             |
| `COLLATERAL_MATURED`       | `409` | The collateral instrument passed its recorded maturity, and the record was asserted by a party to this market                                                               |
| `MARKET_STATE_UNAVAILABLE` | `503` | The market could not be read to run a check. Retry shortly                                                                                                                  |
| `LOAN_STATE_UNAVAILABLE`   | `503` | The loan could not be read from the network. Retry shortly                                                                                                                  |
