> 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/position-actions/position-partial-repay.md).

# Position Partial Repay

### <mark style="color:orange;">POST</mark> /positions/partial-repay

Reduces leverage and liquidation risk by partially repaying loan obligations.

#### Headers

<table><thead><tr><th width="187">Header</th><th width="110">Required</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x-api-key</code></td><td>Yes</td><td>string</td><td>API key</td></tr></tbody></table>

#### Example Request

```http
POST https://lavarave.wtf/api/sdk/v1.0/positions/partial-repay
```

#### Request Body Fields

<table><thead><tr><th width="193">Field</th><th width="111">Required</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>positionId</code></td><td>Yes</td><td>string</td><td>Address of the position.</td></tr><tr><td><code>repaymentBps</code></td><td>Yes</td><td>number</td><td>Percentage in basis points of the position to be repaid.<br><br>Range: 100-9900</td></tr><tr><td><code>quoteToken</code></td><td>Yes</td><td>string</td><td>Address of the token being borrowed.</td></tr><tr><td><code>userPubKey</code></td><td>Yes</td><td>string</td><td>Wallet address of the trader.</td></tr><tr><td><code>partnerFeeRecipient</code></td><td>No</td><td>string</td><td>Partner wallet address to receive fees.</td></tr><tr><td><mark style="color:blue;"><code>profitFeeMarkup</code></mark></td><td>No</td><td>string</td><td>This field is outdated and should be avoided. ⚠️</td></tr></tbody></table>

#### Response Fields

<table><thead><tr><th width="197">Field</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>transaction</code></td><td>string</td><td>Base58 encoded serialized transaction ready for signing.</td></tr><tr><td><p><mark style="color:purple;"><code>quoteResponse</code></mark></p><p>(Beta)</p></td><td>object</td><td>Additional quote information. Should be ignored for now - this field is not currently used in integration.</td></tr></tbody></table>

#### Request Body Example

```json
{
  "positionId": "u29ftYd7vfAAxHSk2hbLRsHcdC3SfcgFUdh2HxmVU1m",
  "partnerFeeRecipient": "6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF",
  "repaymentBps": 5000,
  "quoteToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "userPubKey": "Ahtpvhub1Z2z3y1RUYPDb7iUkv2J9fYByWWaitPeQXVp"
}
```

#### Response Example

```json
{
  "transaction": "base58_encoded_serialized_transaction"
}
```
