# Order types and executions

When trading on Backpack EU, it's crucial to understand the different types of orders you can place.

**This guide will walk you through each order type and its purpose to help you execute your trading strategy effectively.**

***

## Order Types

### Market Order

* **Type:** Market
* **Description:** A market order is executed immediately at the best available current price.
  * You specify the quantity of the asset you want to buy or sell, and the trade executes at the prevailing market price.
* **Key Points:** You must specify either a **quantity** or **quoteQuantity** when placing a market order.
  * No price setting is needed; the order will fill at the best available price.
  * Market orders are subject to slippage in fast-moving markets.

### Limit Order

* **Type:** Limit
* **Description:** A limit order allows you to set a specific price at which you want to buy or sell an asset.
  * This order type guarantees the price but not the execution.
* **Key Points:** You need to set both a **price** and **quantity** for a limit order.
  * The order will only execute if the market price reaches your set limit price.
  * A limit order can be a 'maker' order if it doesn't match immediately with an existing order, adding liquidity to the market.

### Post Only

* **Field:** postOnly
* **Description:** This is a conditional flag for limit orders that ensures the order will be added to the order book and not match with a pre-existing order.
  * If it would match, the order is canceled instead.
* **Key Points:**
  * Ensures the order will be executed as a maker order, contributing to market liquidity.

### Time In Force

* **Field:** timeInForce
* **Options:** GTC, IOC, FOK
* **Description:** This determines the length of time your order will remain active before it is executed or expires.
  * **GTC** (Good 'Til Canceled): The order will stay active until it is filled or manually canceled.
  * **IOC** (Immediate or Cancel): The order must be executed immediately, and any unfilled portion is canceled.
  * **FOK** (Fill or Kill): The order must be filled in its entirety immediately, or it is entirely canceled.

### Self-Trade Prevention

* **Field:** selfTradePrevention
* **Options:** RejectTaker, RejectMaker, RejectBoth, Allow
* **Description:** These settings prevent you from matching an order with another one of your own orders.
  * **RejectTaker**: Cancels the taker side of the trade if it matches with one of your existing orders.
  * **RejectMaker**: Cancels the maker side of the trade if it matches with one of your existing orders.
  * **RejectBoth**: Cancels both sides of the potential self-trade.
  * **Allow**: Allows both sides of the self-trade to execute.

### Trigger Price

* **Field:** triggerPrice
* **Description:** This is used for conditional orders, such as stop-limit orders.
  * The **triggerPrice** is the price at which your limit order becomes active on the order book.

***

## **Detailed API Documentation**

For the specifics of each order type and to understand the complete range of order functionalities, please refer to our comprehensive API documentation at[ **https://docs.backpack.exchange**](https://docs.backpack.exchange/)

Understanding these order types and conditions will enhance your trading experience on Backpack EU. Choose the order type that aligns with your trading goals and market conditions.


---

# 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://eu.support.backpack.exchange/exchange/account-functions/order-types-and-executions.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.
