> 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/policy-overview.md).

# Policy Overview

Under the hood, policies are the driving force of Dexible's execution engine. They determine whether an order should execute, wait, pause, or cancel. Dexible currently supports the following policies:

| Policy           | Description                                                                                                                                                                                                                                    | Params                                                                        |                                                                  |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| **BoundedDelay** | Specifies a time delay between rounds                                                                                                                                                                                                          | <p>timeWindowSeconds</p><p>randomizeDelay</p>                                 |                                                                  |
| **Expiration**   | Specifies an expiration period in seconds. This will force an order to cancel when evaluating to true.                                                                                                                                         | seconds                                                                       |                                                                  |
| **FailLimit**    | Specifies a max number of failures for an order. This is automatically added to every order with a max of 30% of order's number of rounds (i.e. you cannot add this yourself). This will cause an order to cancel if it has too many failures. | maxFailures                                                                   |                                                                  |
| **GasCost**      | Specifies the gas type to apply to the order. This is required for every order.                                                                                                                                                                | <p>gasType (relative                                                          | fixed)</p><p>amount (if fixed)</p><p>deviation (if relative)</p> |
| **LimitPrice**   | Specifies a min price that the market must meet to execute the order.                                                                                                                                                                          | price (see Prices)                                                            |                                                                  |
| **PriceBounds**  | Specifies a base price and an upper/lower bound.                                                                                                                                                                                               | <p>basePrice (see Prices)</p><p>upperBoundPercent</p><p>lowerBoundPercent</p> |                                                                  |
| **Slippage**     | Specifies the amount of slippage allowed per round. This is required for all orders.                                                                                                                                                           | amount (.5 == .5%)                                                            |                                                                  |
| **StopPrice**    | Specifies an activation (trigger) price and whether the market price should be above or below the activation price.                                                                                                                            | <p>trigger (see Prices)</p><p>above (boolean)</p>                             |                                                                  |
| **StopLimit**    | Specifies and activation (trigger) price and a limit price. The activation should be above market and the limit should be at a price higher than the activation.                                                                               | <p>trigger (see Prices)<br>limitPrice (see Prices)</p>                        |                                                                  |

More will be added as the Dexible features expand. But with this set of policies, powerful algos can be realized.


---

# 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://dexible.gitbook.io/dexible-sdk/policy-overview.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.
