← Back to Guides

How to Create Your First Trading Bot

A complete walkthrough for setting up an automated BTC perpetual futures grid trading bot on the Green Khandl dashboard — from account setup to your first live trade.

Overview

A Green Khandl bot automates BTC perpetual futures grid trading on Binance. It places a series of buy and sell orders at regular price intervals, forming a grid. As the market price moves up and down through the grid, orders fill and the bot captures profit from the price oscillation — all without you needing to watch charts or place orders manually.

The bot runs 24/7 on Green Khandl's infrastructure, executing a deterministic strategy loop every second. It manages entries, exits, stop losses, and position sizing automatically based on the parameters you configure.

Prerequisites

Before you begin: Make sure your Binance API keys have Futures permissions enabled and are restricted to the Green Khandl server IP. See the API Key Guide for full instructions.

Step-by-step guide

1

Sign in to the Green Khandl dashboard

Go to app.greenkhandl.com and sign in with your email or Google account. You'll land on the main dashboard where you can see all your bots at a glance.

2

Click "Create Bot" on the dashboard

On your dashboard, click the Create Bot button. This opens the bot creation form where you'll configure all the settings for your new trading bot.

3

Give your bot a name

Enter a descriptive name for your bot — something like My BTC Grid Bot. This helps you identify it on the dashboard, especially if you run multiple bots later.

4

Enter your Binance API Key and Secret

Paste the API Key and Secret Key you generated on Binance. These are encrypted at rest and never stored in plain text.

If you haven't created your API keys yet, follow the How to Create Binance Futures API Keys guide first.

5

Choose testnet or live trading

Select whether to run the bot on Binance Testnet or Live trading. Testnet uses simulated funds so you can learn how the bot works without risking real money.

Recommendation: Start with testnet to familiarize yourself with the bot's behavior, grid mechanics, and dashboard monitoring before switching to live trading.

6

Configure grid parameters

Set the core parameters that define how your grid operates:

  • Number of grid layers — how many buy and sell orders the bot places above and below the current price. More layers means wider coverage but requires more margin.
  • Grid spacing — the price distance between each grid level. Tighter spacing captures smaller moves but fills more frequently; wider spacing targets larger swings.
  • Order size — the USDT value of each grid order. This determines how much capital each layer uses.
7

Set risk parameters

Configure the safety limits that protect your capital:

  • Stop loss — the maximum loss threshold at which the bot will close the position to prevent further drawdown.
  • Max position size — the largest total position the bot is allowed to hold at any time. This caps your exposure regardless of how many grid layers fill.
8

Click "Create" to save the bot

Review your settings and click Create. The bot is now saved to your dashboard but is not yet running — you start it manually in the next step.

9

Click the play button to start the bot

On your dashboard, find your new bot and click the play button to start it. The bot will begin scanning the market and placing grid orders based on your configuration.

You can stop the bot at any time by clicking the stop button. Stopping the bot will cancel its open grid orders.

10

Monitor performance on the bot detail page

Click on your bot to open the detail page. Here you can see:

  • PnL chart — track your profit and loss over time
  • Open orders — see the current grid orders the bot has placed
  • Trade history — review all filled orders and realized gains

The dashboard updates in real time, so you can monitor your bot's performance without needing to check Binance directly.

Important notes

Start with testnet. Testnet lets you experience the full bot lifecycle — grid placement, order fills, position management, and PnL tracking — without risking real funds. Switch to live trading only after you understand how the bot behaves.

Never risk more than you can afford to lose. Grid trading on leveraged perpetual futures carries significant risk. Only allocate capital you are prepared to lose entirely.

Understand leverage risks. The bot trades BTC/USDT perpetual futures, which are leveraged instruments. Price moves against your position are amplified, and liquidation is possible if risk parameters are set too aggressively.

Your keys are safe. API keys are encrypted at rest on Green Khandl's servers and are never shared or stored in plain text. You can revoke them from Binance at any time.

What happens next

Once your bot is running, it executes a grid strategy by placing buy and sell orders at regular price intervals around the current market price. As the price moves through the grid, orders fill and the bot profits from the price oscillation.

The bot continuously monitors market conditions and adjusts its behavior based on volatility and trend signals. It manages stop losses, position sizing, and grid depth automatically — you set the parameters, and the bot handles the execution around the clock.

If you want to adjust your bot's settings, you can stop it, update the configuration, and restart it from the dashboard at any time.

Need help?

If you run into issues, reach out at [email protected] and we'll help you get set up.