> For the complete documentation index, see [llms.txt](https://dexible.gitbook.io/dexible-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dexible.gitbook.io/dexible-sdk/major-sdk-components/algos/market.md).

# Market

This is the simplest order type since it has very few required parameters. It's also the riskiest since it leaves the execution exposed to whatever the market price is for the tokens being swapped. Here is an example of a market order:

```
const mkt = new MarketSwap({
    amountIn:  units.inBNUnits("1", 18),
    tokenOut: matic,
    tokenIn: weth,
    slippage: new Slippage(.5, false)
});
```

That's it. The tokens, amount of input, and slippage are all that's needed to get a quote and submit for execution.


---

# 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:

```
GET https://dexible.gitbook.io/dexible-sdk/major-sdk-components/algos/market.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.
