# Polymarket Reversal Bot

The **Polymarket Bot** allows you to automate trading on Polymarket prediction markets using **limit orders**, precise **time-based entries**, and strict **risk controls**.

It is designed for short-term crypto markets (5m / 15m) where execution quality, timing, and discipline matter more than prediction.

### What This Bot Does

* Trades **UP / DOWN** Polymarket markets automatically
* Uses **limit orders only** (no market orders)
* Supports **maker rebates** when available
* Enters trades only within a **defined time window**
* Enforces **loss limits, cycle limits, and position sizing**
* Fully non-custodial (you control your wallet)<br>

**Market Periods:**

* 5 minute
* 15 minute&#x20;

### Bot Configuration Overview

#### Bot Selector

You can configure up to **4 independent bots per login wallet**:

* BOT-1
* BOT-2
* BOT-3
* BOT-4

Each bot runs with its own configuration and risk limits.\
Don't use multiple bots from the same wallet on the same market. It is fine to use Bot 1 on BTC 5 mins and Bot 2 on BTC 15min but don't use Bot 1 & Bot 2 simultaneously on BTC 5 or on any market.<br>

### Core Settings

#### Market Period

Select the prediction market duration.

* `5min`
* `15min`

#### Side (UP / DOWN)

* `UP` → Buy YES only
* `DOWN` → Buy NO only
* `ALL` → Bot decides based on entry conditions<br>

### Risk Management

#### Max Loss ($)

Maximum total loss allowed for the bot session.\
Once reached, the bot stops automatically.\
\
**Bet Size ($)**

Dollar amount per trade.\
This is the **maximum position size per entry**, not per cycle.\
\
**Max Cycles**

Maximum number of trades the bot is allowed to execute.

Useful for:

* Preventing over-trading
* Backtesting behavior
* Controlled test sessions<br>

### Entry Logic

#### Synthetic Order&#x20;

A **synthetic order** is a **virtual limit order** managed by the bot.

* It is **not placed on the order book immediately**
* The bot **waits for price conditions to be met**
* Once valid, the bot submits a **real limit order instantly**

**Why it’s needed:**\
On Polymarket, you cannot place limit orders above the current price. Synthetic orders let the bot *prepare* those orders and execute them the moment they become valid.

**Key point:**\
Once triggered, a synthetic order becomes a **normal limit order**.

#### MPD (Market Price Deviation) (Coming Soon)

**MPD** defines the **maximum allowed distance in cents** between the current market price and your entry price.

**Example**

* Market price: `60¢`
* Entry price: `62¢`
* Deviation: `2¢`

If:

```
MPD = 2
```

→ order is allowed

If:

```
MPD = 1
```

→ order is blocked

#### Entry Price

Target price (in cents) for limit order entry.

**Example**:

**Meaning**:

* The bot will attempt to enter only if it can place a limit order at **95¢**&#x20;
* If price never reaches this level, **no trade is taken**
* If the entry price is above the current price, the order will be a synthetic order, therefore it will only be visible once the price reaches the entry price level. However, if the entry price is below the current price, the order will be sent as a regular limit order.

### Exit Logic

#### Take Profit (%)

Optional profit target.

If set, the bot will exit early once this profit percentage is reached.

***

#### Stop Loss (%)

Optional per-trade stop loss.

***

### Re-Buy at Entry

* `YES` → If an order fails to fill, the bot retries at the same entry price
* `NO` → Single attempt only

**Recommendation:**\
Use `NO` for cleaner execution and better control.\
Your TP/SL will be more\
MPD and TP / SL Fills (Why It Helps)

Using **MPD** makes **TP and SL fills easier and faster**.

When MPD is enabled, the bot can place a **slightly higher limit order** than the exact target price. This allows the order to **fill immediately against the best available offers** once price reaches the area.

Without MPD:

* Price must **touch the exact TP/SL level**
* Then **move back** to your limit price to fill
* Many exits get missed in fast markets

With MPD:

* Bot places a **buffered limit**
* Order fills as soon as price enters the zone

**Key idea:**\
MPD removes the need for a perfect touch-and-retrace to exit. \ <br>

### Wallet & API Setup

#### Polymarket Address

Your Polymarket trading wallet address.

This wallet:

* Executes trades
* Holds positions
* Receives profits

***

#### Private Key

THIS IS THE PRIVATE KEY OF YOUR WALLET - Don't look for this on Polymarket, this is in your crypto wallet.&#x20;

***

#### API Credentials (Required)

These are from Polymarket, simply click on the "[how to get api key](https://polymarket.com/settings?tab=builder)" and generate the key.

Fields:

* API Key
* API Secret
* API Passphrase

You can generate these directly from Polymarket.

***

### Starting the Bot

Once all required fields are filled:

1. Review your configuration
2. Click **Start**
3. Bot status changes from `IDLE` to `ACTIVE`
4. Market activity logs begin streaming


---

# 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://docs.dextrabot.com/dextrabot/polymarket-bots/polymarket-reversal-bot.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.
