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

# Sell rules

> Take-profit and stop-loss orders the agent executes when the real price crosses your trigger.

A sell rule is a one-time plan that sells shares you already hold.

| Field | Meaning |
| - | - |
| Stock token | The token to sell |
| Shares | Exactly how many shares to sell |
| Trigger price | Per-share price in USD |
| Direction | **Take-profit** (sell at or above) or **stop-loss** (sell at or below) |

## How it runs

<Steps>
  <Step title="Watch">The agent reads the stock's real exchange price every 15 minutes. No time limit.</Step>
  <Step title="Wait for the open">Once the trigger is crossed, it waits until the US market is open.</Step>
  <Step title="Pull exactly the rule's shares">`pullShares` moves the shares from your wallet through `PlanRegistry`. You approve the registry for that token.</Step>
  <Step title="Sell and deliver">It sells at a fair on-chain price and sends the USDT to your wallet. If the sale fails, the shares are returned and the run is logged as Waited.</Step>
</Steps>

<Frame caption="A sell rule as a flow">
  <img src="https://mintcdn.com/portir-agent/Ha4ux6vIkrc7pRUd/images/d-plan-14.jpg?fit=max&auto=format&n=Ha4ux6vIkrc7pRUd&q=85&s=a3c6d69dff809615d18d3248b6b9d9e6" alt="A sell rule as a flow" width="1800" height="1125" data-path="images/d-plan-14.jpg" />
</Frame>

<Info>
  Sell rules run on **BSC testnet** today. The mainnet sell path is on the [roadmap](/resources/roadmap).
</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.