> For the complete documentation index, see [llms.txt](https://lavarage.gitbook.io/lavarage/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lavarage.gitbook.io/lavarage/platform/lavarage-api/lavaos-documentation/lending/manage-positions.md).

# Manage Positions

### <mark style="color:green;">GET</mark> /lender/positions

Provides real-time position monitoring

#### Query Parameters

<table><thead><tr><th width="195">Parameter</th><th width="110">Required</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>lenderWallet</code></td><td>Yes</td><td>string</td><td>Lender wallet address.</td></tr><tr><td><code>status</code></td><td>No</td><td>string</td><td>Filters by status of the position: <code>open</code>, <code>closed</code>, <code>liquidated</code> or <code>all</code>. It’s All by default.</td></tr><tr><td><code>includeInactionable</code></td><td>No</td><td>boolean</td><td>Include positions that cannot be acted upon. It’s False by default.</td></tr></tbody></table>

#### Headers

| Header         | Required | Type   | Description      |
| -------------- | -------- | ------ | ---------------- |
| `x-api-key`    | Yes      | string | API key          |
| `Content-Type` | Yes      | string | application/json |

#### Request Example

```http
GET https://lavarave.wtf/api/sdk/v1.0/lender/positions?lenderWallet=Ahtpvhub1Z2z3y1RUYPDb7iUkv2J9fYByWWaitPeQXVp&status=open
```

#### Response Fields

<table><thead><tr><th width="184">Field</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>onChainStatus</code></td><td>string</td><td>Current on-chain status of the position transaction. For detailed information, refer to the <a href="#position-lifecycle">Position Lifecycle</a> section.</td></tr><tr><td><code>isActionable</code></td><td>boolean</td><td>Boolean indicating whether the position can be acted upon.</td></tr><tr><td><code>status</code></td><td>string</td><td>Current status of the position: <code>active</code>, <code>sold</code>, <code>sold by take profit</code>, <code>repaid</code>, <code>liquidated</code> or <code>failed</code>.</td></tr><tr><td><code>openTimestamp</code></td><td>string</td><td>ISO datetime when the position was opened.</td></tr><tr><td><code>closeTimestamp</code></td><td>string</td><td>ISO datetime when the position was closed.<br><br>For open positions, this shows "1970-01-01T00:00:00.000Z".</td></tr><tr><td><code>quoteToken</code></td><td>object</td><td><p>Metadata of the token being borrowed.<br></p><p><strong>Contains:</strong></p><ul><li><code>address</code></li><li><code>name</code></li><li><code>symbol</code></li><li><code>decimals</code></li></ul></td></tr><tr><td><code>collateralToken</code></td><td>object</td><td><p>Metadata for the collateral token.<br></p><p><strong>Contains:</strong></p><ul><li><code>address</code></li><li><code>name</code></li><li><code>symbol</code></li><li><code>decimals</code></li></ul></td></tr><tr><td><code>initialBorrowQuote</code></td><td>string</td><td>Amount borrowed when the position was opened in quote token.</td></tr><tr><td><code>initialMarginQuote</code></td><td>string</td><td>Initial margin provided by the user when opening the position in quote token.</td></tr><tr><td><code>apr</code></td><td>number</td><td>Annual interest rate for this offer in percentage form, e.g. 169.</td></tr><tr><td><code>lastInterestCollectTimestamp</code></td><td>string</td><td>ISO datetime of the last interest collection.<br><br>Only present when auto-collect occurred, otherwise not included in the response.</td></tr><tr><td><code>initialPositionBase</code></td><td>string</td><td>The size of the position in collateral tokens when it was opened.</td></tr><tr><td><code>closePositionQuote</code></td><td>string</td><td>The size of the position in quote token when it was closed.<br><br>Only present for closed &#x26; liquidated positions. Shows "0" for <code>active</code> and <code>failed</code> positions.</td></tr><tr><td><code>currentPrice</code></td><td>string</td><td>When position = <code>active</code>, this shows the current price of the collateral token in quote token terms.<br><br>When position = <code>closed</code>, this shows the price at the time of closing.</td></tr><tr><td><code>positionLtv</code></td><td>number</td><td>Current Loan-to-Value ratio as decimal (e.g., 0.75 = 75%).</td></tr><tr><td><code>positionAddress</code></td><td>string</td><td>Address of the position.</td></tr><tr><td><code>offerAddress</code></td><td>string</td><td>Address of the loan offer.</td></tr><tr><td><code>traderAddress</code></td><td>string</td><td>Wallet address of the trader.</td></tr><tr><td><code>entryPrice</code></td><td>number</td><td>Price at which the position was opened.</td></tr><tr><td><code>interestAccrued</code></td><td>number</td><td>Total interest accrued on this position.</td></tr><tr><td><code>liquidationPrice</code></td><td>number</td><td>Price at which the lender may liquidate the position.</td></tr><tr><td><code>offerCreatedAt</code></td><td>string</td><td>ISO datetime when the original loan offer was created.</td></tr><tr><td><code>updatedAt</code></td><td>number</td><td>UNIX timestamp of the last update to this position record.</td></tr><tr><td><code>takeProfitPrice</code></td><td>string</td><td>Price at which the take profit order will attempt to sell the position. Only present when a take profit price is set for this position.</td></tr><tr><td><p><mark style="color:purple;"><code>positionValue</code></mark></p><p>(Beta)</p></td><td>object</td><td>Calculated position value object containing current valuation and PnL.<br><br>This field is in beta testing and may change in future releases.</td></tr></tbody></table>

#### Response Example

```json
{
  "onChainStatus": "EXECUTED",
  "isActionable": true,
  "status": "active",
  "openTimestamp": "2025-06-21T20:09:46.000Z",
  "closeTimestamp": "1970-01-01T00:00:00.000Z",
  "quoteToken": {
    "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "name": "USD Coin",
    "symbol": "USDC",
    "decimals": 6
  },
  "collateralToken": {
    "address": "5UUH9RTDiSpq6HKS6bp4NdU9PNJpXRXuiw6ShBTBhgH2",
    "name": "TROLL",
    "symbol": "TROLL",
    "decimals": 6
  },
  "initialBorrowQuote": "1983.75",
  "initialMarginQuote": "1250",
  "apr": 169,
  "lastInterestCollectTimestamp": "2025-07-21T02:49:47.000Z",
  "initialPositionBase": "216548.227914",
  "closePositionQuote": "0",
  "currentPrice": "0.0211537163",
  "positionLtv": 0.4350626813191232,
  "positionAddress": "Aq8fpvRW2qBURRcxyyJ99VUmDmJNxNhnbMuQMJFbBSMa",
  "offerAddress": "EbvPQqzarjTUV5cTXuUz9MjQEHb8MMfpTsoRFH6YQREg",
  "traderAddress": "5zX5TajSP6qM36FTgsxapYJKniGi19cV3ztPEG4zSUSJ",
  "entryPrice": 0.014933163070188006,
  "interestAccrued": 9.185034246575343,
  "liquidationPrice": 0.010225769481491157,
  "offerCreatedAt": "2025-04-21T03:55:52.248Z",
  "updatedAt": "2025-06-21T20:09:46.000Z",
  "positionValue": {
    "valueInQuoteToken": 4580.799778560497,
    "pnlInQuoteToken": 1337.8647443139216
  }
}
```
