# Dev Mode - BNB

**Binance Dev Mode** lets you manually drive trades on the BNB chain using your Leap task system.\
It runs a local Dev Mode socket server so you can trade using PancakeSwap or Four.meme — all while keeping your existing analytics and tracking logic active.

***

### ⚙️ Getting Started

#### Step 1 — Navigate to Dev Mode

From the Leap dashboard:\
**Tasks → Create Task → Dev Mode**

Then select your **BNB wallet**.

> 💡 If you only have Solana wallets, go to **Accounts → Add Wallet** and add a **BNB wallet** first.\
> The form will then unlock BNB-specific settings.

***

### 🧾 Task Setup Fields

Here’s what each field in the **Dev Mode** setup means:

| Field                   | Description                                                                                                                                  |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **Task Name**           | A simple label to identify your dev session. Appears in the Tasks list and on the web dashboard.                                             |
| **Wallet**              | The BNB account funding trades. Selecting a BNB wallet automatically enables **Pancake**, **Flap**, and **Four.meme** markets.               |
| **Optional BNB Wallet** | Lets you direct buys from a secondary BNB account while keeping a Solana wallet active elsewhere. Leave blank unless you need that split.    |
| **Buy Amount (BNB)**    | Default size for manual buys. You can edit this before starting or override per trade in the extension.                                      |
| **Buy Wallet %**        | Caps how much of your balance each buy can use — useful for running multiple positions simultaneously.                                       |
| **Slippage (%)**        | Protects against volatile prices. Small-cap launches often require **10–20%**. Adjust higher per token if trades fail.                       |
| **Exchange Toggles**    | Keep **Pancake**, **Flap**, and **Four.meme** on for BNB markets. Turn off **Raydium**, **Pump.fun**, and **Meteora** (they’re Solana-only). |
| **Gas Settings**        | Default: **Auto**, which fetches live gas prices. Use **Manual** if you want to define exact `gasPriceGwei` values.                          |
| **Processors**          | Optional routing layers: use **BlockRazor** (requires API key in Settings) or **Puissant** for relay + tip flow.                             |
| **BNB Gas Limit**       | Leave blank for automatic estimation. Set manually if you’ve tested your strategy and want strict control.                                   |

***

### 🧰 Example Request Payload

Here’s a sample payload you can send once your task is active:

```json
{
  "id": "manual-test",
  "token": "0x0000000000000000000000000000000000000000",
  "amount": 0.4,
  "buySlippage": 12,
  "gasPriceGwei": 1.8,
  "gasLimit": 210000,
  "deadlineSeconds": 90
}
```

***

### 🧩 How Dev Mode Works

Once you click **Create Task**, the app:

1. Spins up a **local socket server** on your machine.
2. Listens for REST or extension commands at:

   ```
   http://localhost:8080/api/extension/trade
   ```
3. Executes any `"buy"`, `"sell"`, or `"add"` actions you send.
4. Streams responses directly to your **task activity feed**.

***

### 🔁 Response Flow

You’ll see live trade feedback in your task feed:

| Status        | Description                                             |
| ------------- | ------------------------------------------------------- |
| **queued**    | Command received and pending execution                  |
| **confirmed** | Trade completed successfully; includes transaction hash |
| **failed**    | Validation or network issue (check logs)                |

***

### 🚀 Testing a Trade

After starting the task:

1. Use the **browser extension** or a REST client like Postman.
2. Send the JSON payload above to `http://localhost:8080/api/extension/trade`.
3. Watch the activity feed for `"queued"` → `"confirmed"` → `"tx hash"`.

✅ Once confirmed, your connection is working and ready for live BSC testing.

***

### 🧨 Shutting Down Dev Mode

You can stop Dev Mode anytime from the **Tasks list**.\
Closing the task automatically shuts down the local server.

> ⚠️ Keep the task running while testing trades — Dev Mode stops accepting requests once closed.


---

# 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.leap-blockchain.com/leap-trading-sol-bot/leap-trading-bot-setup/dev-mode-bnb.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.
