MeowQuant is an independent third-party information site, not the official OKX. The sign-up button carries invite code OK30001, and we may earn a promotional service fee as a result. Full disclosure →

OKX · Strategy Hands-On

How to Set Up an OKX Grid Bot: Parameters, Range, and a One-Week Test

The grid bot is probably the quant tool beginners find easiest to pick up — and easiest to get burned by. Easy to pick up, because you open one with a few clicks in the OKX dashboard, no code. Easy to get burned, because it creates the illusion that "leave it running and money makes itself" — right up until the market goes one-way and you discover it's been catching falling knives for you the whole time.

This piece walks the grid bot through from the start: what it actually earns money on, how to fill in the three core parameters, how to draw a reliable range using support and resistance, which to pick between a range grid and an infinite grid, whether you can use AI-recommended parameters straight, and most importantly — how it gets you stuck in a one-way decline. At the end is our own one-week BTC/USDT grid review, run with a small amount of real money. The numbers aren't dramatic, but every one of them is something we actually did. By the end you should be able to judge for yourself: this coin, this market — is it actually right for a grid?

What a grid earns money on

The logic of grid trading takes one line to state: within a price range, slice the price into many grids, buy a bit each grid it falls, sell a bit each grid it rises. As price swings up and down, the bot buys low and sells high one grid at a time, earning the spread on those small swings.

Here's an intuitive example. Say you judge a coin will chop back and forth between 100 and 120. You slice that 20-wide range into 10 grids, 2 each. When price falls to 110 the bot places a buy and takes the coin; when it rises to 112 it sells that batch, earning the 2 spread (minus fees); then it falls to 108 and buys again, rises to 110 and sells again. As long as price keeps bouncing within the range, this action repeats endlessly, and each completed "buy–sell" books one grid of profit.

That's the whole magic of a grid. It doesn't predict up or down — it only earns the swings. So it has one very counterintuitive trait: the more frequently price swings, the more a grid earns; the flatter or more one-way price goes, the more awkward a grid becomes. Get that clear and you understand what it's suited for and what it isn't.

It only works well in choppy markets

Market conditions roughly come in three kinds: choppy, one-way up, one-way down. A grid thrives only in the first; the other two both make it look dumb.

  • Choppy market: price swings up and down within a range — this is the grid's home turf. The more swings, the more fills, the thicker the accumulated spread profit.
  • One-way up: price climbs all the way, and the grid sells out its holdings early in the rise, then watches price keep climbing while it has nothing left — earning far less than if it had just bought and held.
  • One-way down: this is the most dangerous. Price drops all the way, the bot's buy orders inside the range fill one after another, your account piles up with holdings bought above the current price, and the unrealized loss grows. We'll spend a separate section on this later, because it's the main way grids lose money.

So before opening a grid, the thing worth spending time on isn't tuning parameters but judging: the coin you've got your eye on — is it more likely to chop within a range, or to make a one-way move soon? If you genuinely can't tell, the answer is often "don't open one yet," or only test with very small money. There's no shortcut to judging the market, but at least you need to realize it matters more than any parameter.

How to set the three core parameters

Open a spot grid in the OKX dashboard and you can't avoid three core parameters: range (upper and lower price bounds), grid count, and per-grid amount (which is essentially determined by total amount and grid count). Fill these three in right and the grid takes shape. We'll go through them one by one.

① Range: upper and lower price bounds

The range is the two prices you expect price to swing between. The lower bound is the lowest price you're willing to keep catching knives down to; the upper bound is the highest price you're willing to sell at. Set the range too wide and price wanders forever before touching a grid — sparse fills, slow profit; set it too narrow and the grid stops the moment price walks out of it — busy work for nothing. How to find a sensible range, the next section covers using support and resistance.

② Grid count: how many slices the range is cut into

Grid count determines the price gap per grid. The more grids, the narrower each grid, the thinner the profit per fill but the more frequent the fills; the fewer grids, the wider each grid, the thicker the profit per fill but the more price has to move to trigger once.

Here's a common beginner mistake: thinking more grids is always better and cranking it to the max. The problem is that every fill pays a fee, and when grids are too dense, that thin per-grid spread may not even cover the round-trip fee — working for free, or even paying out of pocket. A plain rule of thumb: keep each grid's spread clearly larger than the sum of two fees ("buy + sell"), so that completing each grid yields net profit. How many grids is right depends on the range width and your fee tier — registering with an invite code gets you a fee discount, which directly affects how dense you can set the grid. On that point, we built a dedicated fee and rebate estimator you can work through first.

③ Per-grid amount / total amount

OKX generally has you fill in a total amount, and the bot splits it across the grids automatically by grid count. The thing to get clear here isn't "how much I invest, how much I earn," but "if price falls to the lower bound and all the buy orders fill, how much money in total do I have to put up to catch them." This amount you must be able to bear — because a grid is designed to buy more as price falls, so you need to make sure that in the worst case there's enough money in the account to hold to the lower bound, without running out mid-way and leaving the grid incomplete.

Reminder: Many people open a grid thinking only about "how much it earns while price is in the range," without ever calculating "if price drops straight to the lower bound, how much I have to put up and how much I'd be down." Before you open one, work out this worst-case number, confirm you can take it, then click confirm.

Drawing a range with support and resistance

The upper and lower bounds shouldn't be picked off the top of your head; the most common reference is support and resistance. Put simply:

  • Support: a price level where, historically, price has repeatedly bounced and couldn't fall further — usable as a reference for the lower bound.
  • Resistance: a price level where price has repeatedly fallen back and couldn't rise further — usable as a reference for the upper bound.

Finding them isn't complicated either: pull up the coin's candles over the past month or two, see which range price keeps swinging within, and roughly where the upper and lower edges sit. Set the grid's upper bound near resistance and the lower bound near support — meaning "I'm betting price keeps chopping within this validated box."

Two practical bits of experience are worth mentioning. First, you can leave a bit of margin below the support you see for the lower bound, because support often gets briefly pierced and pulled back ("wicks"); a little margin avoids getting swept out of the range by a single wick. Second, the range doesn't have to capture the extremes — you don't need to pin the exact low and high; just set a range you're confident price will most likely swing within. A grid earns the bouncing within the range, not from calling tops and bottoms.

Range grid vs infinite grid

The OKX dashboard usually has more than one kind of grid. The two you'll meet most often are the range grid (spot grid) and the infinite grid, with different logic and different suitable scenarios.

Comparison Range grid Infinite grid
Upper bound Yes, you set it No upper bound
After breaking above the upper bound Stops, sells everything Keeps selling and placing higher
Suitable market Chop with a clear range Bullish long term, but wants to ride up
In a one-way uptrend Sells out too early, misses the rest Can keep capturing the climb
In a one-way downtrend Can stop-loss on breaking below the lower bound Keeps catching knives, stuck deeper

How to choose? If you have a fairly clear view of the price range and think it's chopping within a box, choose the range grid — its bounds are clear and it's more controllable. If you're long-term bullish on a coin and want the grid to keep selling higher as it climbs without a ceiling, the infinite grid is handier, at the cost that it likewise has no floor in a decline and catches knives deeper. Neither is superior — only a match or mismatch with your read of the market. At the beginner stage we suggest starting with the clearly-bounded range grid, keeping controllability in your own hands first.

AI-recommended parameters vs manual

When you open a grid on OKX, it usually offers recommended parameters like an "AI smart strategy" that auto-fills the range and grid count for you. Should you use it?

This recommendation is essentially a backtest over historical volatility from a past stretch, giving a set of defaults that did well over that history. Its upside is real: when you have no idea what to fill in, it gives you a grounded starting point instead of staring at empty boxes. But its limitation is just as clear — it optimizes the past, not the future. The range it gives is usually computed from historical volatility, and if conditions change next (volatility suddenly widens or narrows, say), this set of parameters may no longer fit.

What we do is treat the AI recommendation as a reference, not the answer: first check whether the range it gives matches our read of what's ahead; if its lower bound feels too optimistic (not low enough), we manually drop it a bit for margin; if the grids are so dense fees can't be covered, we manually thin them out. Most importantly, whether or not we use the AI recommendation, we add our own stop-loss — and many AI defaults come with none. In other words, AI gets you started, but the few clicks that call the shots are still yours.

However well you set a grid, the wrong fee tier ruins it — every grid fill pays a fee, and with dense fills that bill is substantial. If you don't have an OKX account yet, or want to open a separate account specifically for strategies, registering with our invite code OK30001 gets a fee discount, and a high-frequency-fill approach like a grid benefits especially. Register OKX with OK30001 →

How to set take-profit and stop-loss

A grid is a loop that just keeps running, so you have to set "when it should stop," or it keeps executing as the market turns bad. When you open a grid on OKX, it generally supports trigger-stop conditions, mainly two kinds:

  • Stop-loss (stop on breaking below the lower bound): this is the one we think you most need to set. When price breaks below a level you set, the bot stops and closes the position at market. Its point is: when the market really goes one-way down, it gets you out in time, so you're not holding a position sinking deeper and deeper. The cost is possibly getting swept out on a "false break and pull-back," but to block extreme losses, that cost is worth paying.
  • Take-profit (stop on breaking above the upper bound): stops and settles when price rises to a level. A range grid already stops on breaking above the upper bound, so this is more for infinite grids or people who want to lock in profit.

On how to set the stop-loss price, a common approach is placing it a bit below the lower bound — giving room for support to get wicked while still cutting decisively on a genuine break. Don't set the stop-loss too close to the lower bound, or normal range swings trigger it constantly; and don't skip it, which leaves the worst case fully exposed.

How a grid loses in a one-way decline

This section matters most, because when beginners lose on a grid, nine times out of ten it's here. Once we explain the mechanism thoroughly, you'll truly respect it.

A grid is designed to "buy more as it falls." In a choppy market that's a strength — buy on the way down, sell on the way up, earn the spread. But when price stops bouncing and instead drops all the way, that strength turns into a trap: the bot faithfully places a buy at every grid, buying a batch with each grid the price falls, and your account fills up with holdings bought above the current market price. The more price drops, the more knives you catch, the bigger the unrealized loss.

Worse, these holdings are all "stuck" in the grid — the bot is waiting for price to come back up so it can sell them at a profit, but if price never returns, they stay stuck. You think you're running a steady buy-low-sell-high strategy, when in fact you're adding to a falling asset all the way down. Without a stop-loss, the grid keeps catching like this until price breaks below the lower bound (range grid) or until your money runs out (infinite grid).

This is exactly why we keep stressing two things: judge whether the market is choppy before opening a grid, and always set a stop-loss below the lower bound. The former keeps you from opening a grid on a coin in one-way decline as much as possible; the latter gives you an exit gate even if you judged wrong. Do both and the grid's biggest risk is caged; skip them and a grid can drag you to the bottom at any time.

Risk warning: A grid bot does not guarantee profit. It can steadily catch small swings in a choppy market, but in a one-way decline it keeps catching falling knives and the unrealized loss keeps widening, and in extreme cases your principal can shrink sharply. Any claim that a grid earns "guaranteed gains" or "lying-down XX% annualized" is not credible. Crypto prices are highly volatile. This article is strategy mechanics and a test record, not investment advice of any kind — use only spare money you can afford to lose entirely, and comply with the laws where you live.

One-week test review

After all that theory, we ran a real-money (small-money, really) week to show you. Below is this test's setup and result. The numbers are real, so they won't be dazzling — a grid earns slow, trickling small money anyway, not a get-rich tool.

📋 Editorial test · 2026-06-01 → 06-07
On the morning of June 1 we opened a BTC/USDT range grid on the OKX spot grid for practice, with about 500 USDT of capital. Parameters: the range was set to a band of about ±6% based on the box of the prior month, the grid count was set to 30 (set only after working out that each grid's spread was clearly above the round-trip fee), and we placed a stop-loss about 2% below the lower bound. Over the week BTC mostly chopped within the range and didn't go one-way. Checking again at the same time on June 7, the bot had triggered 40-plus fills cumulatively, with grid profit (realized spread) around 0.9% of capital, and adding in the holdings' float over the period, the overall result was slightly positive. The most nerve-racking moment was a downside wick on June 4 that nearly swept the stop-loss line — luckily it didn't break and pulled back, which also confirmed that the lower bound needs margin. The plain takeaway after a week: when the market cooperates, a grid really does steadily catch small swings, but the return is measured by the week, not a daily explosion — and if this week had been a one-way decline, this set of parameters would most likely have been a very different story.

What you should take from this test isn't that 0.9% (it only represents this one week of this one market), but a few reusable judgments: a grid's return pace is slow and accumulates through fill count; with the right parameters and a cooperating market, it works steadily; but its fate hinges heavily on your initial read of the market and that stop-loss line. Remember these points and they'll serve you better than any specific number.

FAQ

What kind of market is a grid bot good for?

Choppy markets. When price swings up and down within a range, a grid can buy low and sell high one grid at a time to catch the swings. In a one-way uptrend a grid does worse than just holding (it sells out too early); in a one-way downtrend a grid keeps catching falling knives and gets stuck deeper and deeper. So before you open a grid, judge whether the coin you're watching looks more choppy or more one-way recently — that step matters more than tuning parameters.

Is more grids always better?

No. The more grids, the smaller each grid's price gap, the thinner the profit per fill, and since every fill pays a fee, too many grids gets most of the profit eaten by fees. Too few grids and you miss the small swings. The common approach is to keep each grid's price gap clearly larger than the round-trip fee cost, set according to your range width and your fee tier, rather than blindly maxing it out.

What's the difference between a range grid and an infinite grid?

A range grid needs you to set upper and lower bounds; it works while price moves within the range and stops if price breaks above the upper bound or below the lower bound, suiting choppy markets where you have a view on the range. An infinite grid has no upper bound — it sells more as price rises and buys more as it falls, and in theory can ride a trend upward, but the cost is that it keeps catching falling knives in a one-way decline all the same. Neither is better; it depends on your read of the market and the drawdown you can stomach.

Is it reliable to use AI-recommended parameters?

AI-recommended parameters are a set of defaults based on historical backtests, useful as a starting point when you have no idea what to fill in, but the default range is usually computed from volatility over a past stretch and doesn't represent the future. What we do is treat the AI recommendation as a reference: first check whether the range it gives fits our own read of what's ahead, then manually narrow it or add a stop-loss, rather than copying it straight and clicking confirm.

Do you always have to set a stop-loss on a grid?

Strongly recommended. A grid's biggest risk is price breaking below the lower bound and dropping all the way, with every buy order inside the range filled and a pile of holdings stuck above the current price. Setting a stop-loss below the lower bound lets you cut and exit when the market turns bad, instead of holding a position that sinks deeper and deeper. The cost is possibly getting stopped out on a false breakout, which is the price of controlling extreme losses.

Can a grid bot guarantee profit?

No. A grid only automates buying low and selling high; it can steadily catch small swings in a choppy market but loses in a one-way market, and no one can know the market in advance. Any claim that a grid earns guaranteed gains or a certain annualized return is not credible. Treat it as a tool suited to specific market conditions, set the range and stop-loss properly, and use only money you can afford to lose — that's the right way to use it.

Once you've got the grid down, you might want to try the more hands-off DCA bot (its thinking is the opposite of a grid's — it relies on time, not swings), or simply run someone else's strategy. If you want to write grid logic yourself instead of using the dashboard bot, head back to the API quant intro and start from opening a Key. Whichever path you take, run the numbers on the range and grid count first with the grid parameter estimator for a bit more peace of mind.

Want to practice with a grid? Get the account ready first

A grid is a high-frequency-fill approach, and your fee tier directly affects how dense you can set it and how much profit you keep. A new account opened with the invite code gets a fee discount, and a repeated-fill strategy like a grid benefits especially — open the account first, then come back to pick parameters.

OK30001 Register OKX with OK30001 →

Crypto prices are highly volatile, and contracts and leverage can wipe out your principal. Grids and automated trading don't guarantee profit and keep losing in a one-way market — use only money you can afford to lose.