> 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-split.md).

# Position Split

### <mark style="color:orange;">POST</mark> /positions/split

Split a position into 2 positions. Can be used in conjunction with the sell endpoint to partially sell a position by splitting it into two separate positions and selling one.

#### Headers

<table><thead><tr><th width="175">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/split
```

#### Request Body Fields

<table><thead><tr><th width="175">Field</th><th width="110">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>userPubKey</code></td><td>Yes</td><td>string</td><td>Wallet address of the trader.</td></tr><tr><td><code>splitRatioBps</code></td><td>Yes</td><td>number</td><td>Split ratio in basis points determining how the position will be divided.<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></tbody></table>

#### Response Fields

<table><thead><tr><th width="175">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><mark style="color:purple;"><code>quoteResponse</code></mark><br>(Beta)</td><td>object</td><td>Additional quote information. <strong>Should be ignored for now</strong> - this field is not currently used in integration.</td></tr></tbody></table>

#### Request Body Example

```json
{
  "positionId": "9sFqWGuymEtJurxeovE5MvPs63UAN3WFzipdPmyBFBti",
  "userPubKey": "Ahtpvhub1Z2z3y1RUYPDb7iUkv2J9fYByWWaitPeQXVp",
  "splitRatioBps": 5000,
  "quoteToken": "So11111111111111111111111111111111111111112"
}
```

#### Response Example

```json
{
  "transaction": "NEsDDJYJ7WPMvSPfRetUPPjsNKFmPPvxY7gpxs9nDV66YAwMpkrT9D1SUUra5joYm9Nc32SYSzBYPtryudq5HoHGxKkboZvej85KmVJiusvfqWKRQtqpt5iRxfwD74axwBNShTPDkzFqYwMc23vn7JuZacawoRoqz2RigH54Xfhk9M19LvaqqYGDK4EDbQKHSStkkp19SHZZjCsPnBJUqWacjAFJfbg9YV5FMdzfGxd2AeppeA6KsgY5kN64YPUKJdqc4F6nccx6VYmRzyFASxtoUrQTP1QwEyQBhWcFoWc7DLJGHkqRLiUzghEsvdHXDnRcA4fdekZv81Q2D8esGNK17jfs94aXMVNoXF5W4ikxvYKFSu2NaYdzo7abwzeLo4kPzXzWTZBbpxx4rR1FZSqkqZv56bwMHWJuUzRCDNiV1P1EGFuUyxrVe8eTnFQs67FzDBo4CWB4yG1QjTvYYnhNohBj8RnmUpo4ja3BFkcJbFNWUrzWgDakMmEJRbMbFShG3VdNXh5TSEefuo35KFHAyAKMoXJTheA7x7WqrG9W7u6NNjFHTYbuWB1vg1wquecmjphkQJFERqfZ6QQ3NneoSb8ki2UgY7pTyL566zrSUWtmfcDZUoRRfWqg7gdnu1LLLavRbV4TgHvHyTFHrvtJWimdwrFXBkydQPanf9PX3FMSd4ygsyHYtGa4114ATnR6eAgE2s3nX7y3QVoeRa5rsRuLX9NqH6GAQQBED72z6TmAAq3M8LiAsXftStgHjrUQSGYGVsxcqYnCjs68nAxMgVMZ9KNKkTQE6KZg5ae73STuHNtTRWxVoEQxYxgLeLpUhxDt6fq4vymFwqPVD4VJt1ffQrEK5ENCFxUYQa6AB"
}
```
