# Managing an Active GRID-deal

> How to manage a deal of the GRID-bot — cancel or close by market on the platform.

Managing an active deal via the [**trade card**](https://help.veles.finance/en/platform/components/grid-trade-card/) in Veles allows you to react quickly to market changes. You can:
- close the deal at the market price (fix the current profit or loss),
- cancel the bot's deal (remove orders and stop the bot) to take manual control of the situation.

:::note
If you need to **let the bot close the deal** first and stop it only afterwards, use the **Stop** button on the [bot card](https://help.veles.finance/en/platform/components/grid-bot-card/).
If the deal is at a loss, closing it may take a long time.
:::

## Close position at market price

This function closes the bot's position immediately, without waiting for the closing order(s) to be filled.

The dialog box displays your deal parameters (the data is static; to refresh it - close and reopen the window).

Upon confirmation, the system will:

1. Close the position on the exchange.
2. Fix the current **PnL** (profit/loss).
3. Cancel all remaining bot orders.
4. Recreate the orders.

## Stop bot (Cancel position)

The **"Stop bot"** function is used to stop the bot.

Two options are available:

1. The position will be closed at the market price.
2. The position will remain open, and the user must close it manually via the exchange's terminal or app.

After cancellation:

1. The bot will cancel all its unfilled orders.
2. Bot will switch to the **"Terminated"** status.
3. The deals will disappear from the **"Active deals"** section.
4. Funds reserved for unfilled orders will be released.
5. The deal will either be closed or left open, depending on the choice made.

## How to manually close a position on the exchange

1. Log into the exchange app or website.
2. Open your trading account (**Futures / Derivatives / Unified Trading Account**).
3. Go to the **"Positions"** tab and find the desired coin.
4. Select "Close by" -> "Limit Order" and set the price (with a profit or an acceptable loss, the exchange will display the expected result). 
5. Confirm the order; it will appear in "Current Orders."
6. Wait for the limit order to fill, or close the position by market price if you need to immediately.

### Difference between PnL

- **Realized PnL** — already reflected on the balance of the trading account.
- **Unrealized PnL** — potential result after closing the position.

:::note[Example]
You transferred 300 USDT to the trading account.
After canceling the deal, the bot stopped, but the position remained open.

- Realized PnL = -0.14 USDT
- Unrealized PnL = -30.54 USDT

After closing this position by market price, on the balance will remain:
300 – 0,14 – 30,54 = **269,32 USDT**.
:::

## Why is it important to delete orders?

Forgotten orders on the exchange can:

- block your funds,
- cause bot errors such as "Insufficient Balance",
- lead to unpredictable losses or even liquidation.

The bot automatically deletes unnecessary orders. However, if it stops with an error, the user is responsible for finding and deleting them.

:::tip[Tip]
Regularly check the "Orders" tab on the exchange and monitor your margin.
For more details, see the article [How to Reduce Liquidation Risks](https://help.veles.finance/en/getting-started/strategies/reduce-risks/).
:::
