# Perpetual Trading

## Order Matching Mechanism

Astros employs a **Price-Time Priority** system, utilizing a **First-In-First-Out (FIFO)** methodology for matching orders.

#### Matching Criteria:

Orders are matched when either of the following conditions is met:

* A **buy (bid)** order price is **equal to or higher** than the best available **sell (ask)** order price.
* A **sell (ask)** order price is **equal to or lower** than the best available **buy (bid)** order price.
* A **market order** is submitted, and opposing limit orders already exist in the order book.

In all cases, orders with earlier timestamps receive priority at the same price level.


---

# 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://naviprotocol.gitbook.io/astros/astros-perpetual/perpetual-trading.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.
