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

# Behind a One-Sentence Order

> When you say buy $100 of SOL, D0 runs a fixed six-step sequence. Every step is traceable, and nothing gets skipped.

Say *buy \$100 of SOL* and D0 runs the same six steps every time, in the same order.

![The six steps behind a one-sentence order: understand, live prices, price and size, the plan, you confirm, recorded](https://mintcdn.com/donut-6b37471f/9-hncouhsqAqy4cs/media/introduction/how-orders-work/pipeline-light.png?fit=max\&auto=format\&n=9-hncouhsqAqy4cs\&q=85\&s=150981b5d8b2524bafdd1d4154ca50ae)

> [accordion] The six steps in text
>
> **1. Understand what you mean**
>
> Your words become a concrete trade: what to buy, how much, and on which chain.
>
> **2. Fetch live prices**
>
> The current price and liquidity, right now. Never a remembered old price.
>
> **3. Work out price and size**
>
> The price you can actually fill at, what it will cost, and the estimated fees.
>
> **4. Show you the plan**
>
> Action, amount, asset, direction, and estimated cost, laid out in a preview. Then D0 waits.
>
> **5. You confirm, then it trades**
>
> Nothing goes out before your yes. As soon as it fills, D0 tells you the result.
>
> **6. Record to history**
>
> The trade goes into your history for later review and export.

> [!WARNING]
>
> If an order fails, D0 tells you why and gives you options. It never swaps in a different coin, flips the direction, or silently retries. Whether to change anything is your call.

## The one step that's always right: the preview

Step 4 is validated by the backend in real time: balance, quantity, minimum notional, price precision, address format, and more. It returns whether the order passes, the reason if it's rejected, and the estimated margin and fees.

That preview is the single source of truth for every number. The rates and thresholds in these docs are for reference; what you'll actually pay is whatever the preview shows.


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