> ## 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.

# Update Collateral

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

Use `updateCollateral()` with a positive amount to top up and a negative amount to remove.

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

## Important behavior

* top-ups check USDC allowance
* insufficient allowance throws `ALLOWANCE_INSUFFICIENT`
* removing collateral increases effective leverage
