# Trading Flow

Understanding the trade process on Rollie's trading engine is helpful for users to navigate the platform effectively. Here is a simplified explanation of the trade lifecycle:

1\. Select Trade: Users choose a trading pair and the number of tokens they want, Long or Short, and choose the leverage and all parameter(s).

2\. Calculate Estimated Price and Fees: The trading engine computes the transaction's estimated price and gas fees.

3\. Sign and Submit Transaction: Users sign and submit the transaction using their connected wallet (e.g., MetaMask). The transaction is then sent to the Scroll network. All action will be performed once that specific transaction is confirmed on-chain.

4\. Confirmation: Validators on the Scroll network confirm the transaction and add it to the blockchain.

5\. Trade Completion: Once the transaction is confirmed, the trade status changes to "completed," the acquired token appears in the user's connected wallet.

It's important to note that trade action performance time can vary depending on network congestion. Users can choose to pay higher gas fees to expedite their transactions.

If a trade fails, the status will be "failed." This can happen with insufficient funds, improper slippage settings, or network congestion. The token or funds will be returned to the user's wallet in such cases.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rollie.finance/getting-started/trade/trading-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
