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

# updateCollateral

> Add or remove collateral from an Ostium position with the Builder SDK.

```ts theme={null}
await client.updateCollateral({ pairId, idx, amount: '50' });
await client.updateCollateral({ pairId, idx, amount: '-25' });
```

Positive values top up collateral. Negative values remove collateral.

## Response schema

```ts theme={null}
interface Response {
  txHash: `0x${string}`;
  smartAccountAddress?: `0x${string}`;
}
```
