# Liquidate all positions

**URL:** https://forum.alpaca.markets/t/liquidate-all-positions/15083
**Category:** Alpaca Trading
**Created:** [October 2, 2024, 8:54am UTC](https://forum.alpaca.markets/t/liquidate-all-positions/15083 "2024-10-02T08:54:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Artic](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/artic/32/7205_2.png) [@Artic](https://forum.alpaca.markets/u/Artic)
#### Post date: [October 2, 2024, 8:54am UTC](https://forum.alpaca.markets/t/liquidate-all-positions/15083/1 "2024-10-02T08:54:16Z")

</div>

I’m using the TradingClient to perform all my trades. However, I would also like the ability to liquidate all positions.

Could someone provide an example in python on how to liquidate all positions? I’ve only seen examples using the **tradeapi.REST()** but that gives me an error and is also not what I’m using. Is there another way to achieve liquidation?

---

<div class="post-metadata">

### Author: ![Artic](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/artic/32/7205_2.png) [@Artic](https://forum.alpaca.markets/u/Artic)
#### Post date: [October 3, 2024, 12:37am UTC](https://forum.alpaca.markets/t/liquidate-all-positions/15083/2 "2024-10-03T00:37:25Z")

</div>

Can anyone provide an example of this? I’m still trying to liquidate all positions during regular market hours.

---

<div class="post-metadata">

### Author: ![Artic](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/artic/32/7205_2.png) [@Artic](https://forum.alpaca.markets/u/Artic)
#### Post date: [October 7, 2024, 6:25am UTC](https://forum.alpaca.markets/t/liquidate-all-positions/15083/3 "2024-10-07T06:25:36Z")

</div>

I finally figured it out but I’m bumping again because I wanted clarification on how liquidating works.

If I hold a number of shares of a stock and liquidate, it will sell all those shares. But if I hold a short position of 100 shares in NVDA, will liquidating that position result in a BUY order of 100 shares of NVDA?
