> For the complete documentation index, see [llms.txt](https://haiko-docs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://haiko-docs.gitbook.io/docs/protocol/amm/order-types.md).

# Order Types

## Swaps

Swaps are the most common form of trading on Haiko. They represent a request to buy or sell on token for another, and can be fulfilled against liquidity from one or multiple markets.

Swaps can be expressed in one of two ways:

1. Exact input, e.g. "*buy as much ETH as possible with 1,000 USDC"*
2. Exact output, e.g. "*spend as little USDC as possible to buy 1 ETH"*

Multi-market swaps are swaps executed across multiple markets by iteratively trading received amounts through consecutive markets in a single atomic transaction.

## Limit Orders

Limit Orders allow a user to place an entry order that executes only when the market price reaches the user's desired price. Unlike regular liquidity positions, limit orders are automatically filled once the market price reaches the execution price of the order.

Limit orders are batched at the smart contract level for execution efficiency. This means they must be collected after being filled in a seperate transaction.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://haiko-docs.gitbook.io/docs/protocol/amm/order-types.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
