On this pageHow a grid places orders
A grid bot places a ladder of buy orders below the current price and sell orders above it, then replaces every filled order with its opposite one level away. It makes no forecast of direction. It trades back-and-forth movement inside a range you choose, and it carries specific risks when price leaves that range. A common question is which coins are "best" for a grid. This article does not pick assets; it explains the mechanics that decide how any grid behaves, so you can reason about one yourself.
How a grid places orders
A grid has five settings: a lower bound, an upper bound, the number of levels, the capital, and how the levels are spaced. At the start, the bot puts limit buy orders on the levels below the current price and limit sell orders on the levels above it. To have something to sell, it usually buys part of its allocation of the base asset at the start.
From then on, the rule is mechanical:
- When a buy fills at a level, place a sell one level higher.
- When that sell fills, place a buy one level lower again.
Each completed buy and sell pair captures one grid step, minus two trading fees. Take a grid from 80 to 120 with levels every 10, started at 100. If price dips to 90, the buy at 90 fills and a sell appears at 100. If price returns to 100, that sell fills: one cycle of 10 per unit, before fees, and the buy at 90 is placed again. The bot repeats this for as long as price keeps crossing levels.
Arithmetic or geometric spacing
| Spacing | How levels are set | Effect |
|---|---|---|
| Arithmetic | Equal price gaps: (upper − lower) ÷ number of steps | Same profit in price units per step; the percentage step shrinks as price rises |
| Geometric | Equal ratios: each level is the previous one times (upper ÷ lower) to the power 1/steps | Same percentage per step anywhere in the range |
For a range of 100 to 200 with 10 steps, arithmetic spacing gives steps of 10, which is 10% at the bottom and about 5.3% at the top. Geometric spacing uses a ratio of about 1.0718, so every step is about 7.2%: the levels run 100, 107.18, 114.87 and so on up to 200. Wide ranges are where the difference matters.
The fee floor
Every cycle pays two fees, one on the buy and one on the sell, and the step must cover both before it contributes anything. At a hypothetical 0.10% fee per side, a round trip costs 0.20%, so any step of 0.20% or less loses money on every cycle by construction, however often it fills. Exchange minimums add another constraint: the capital divided by the number of levels must exceed the smallest order value the market accepts.
More levels mean smaller steps, more fills and more fees. A short script shows where a grid stops clearing its fees:
def grid_levels(lower, upper, n, geometric=False):
if geometric:
r = (upper / lower) ** (1 / n)
return [lower * r**i for i in range(n + 1)]
step = (upper - lower) / n
return [lower + step * i for i in range(n + 1)]
def steps_below_fee_floor(levels, fee_per_side):
floor = 2 * fee_per_side
return sum(1 for lo, hi in zip(levels, levels[1:]) if (hi - lo) / lo <= floor)
for n in (10, 100, 300):
levels = grid_levels(100, 200, n)
print(f"{n} steps: {steps_below_fee_floor(levels, 0.001)} fail to clear a 0.10% fee per side")
With an arithmetic grid from 100 to 200, 10 or 100 steps all clear the fee floor, but at 300 steps, 99 of them do not: the upper third of the grid would pay more in fees than each cycle earns. This is arithmetic about costs, not a forecast of how many cycles a grid will complete.
When price leaves the range
A grid's behavior outside its range is where most of its risk sits.
Below the lower bound, every buy has filled. In the 80 to 120 example, suppose the bot started with 2 units bought at 100 to cover the two sell levels, plus cash for the buys at 90 and 80, a total of 370. If price falls to 70, it holds 4 units at an average cost of 92.5, worth 280: down 90, about 24% of the capital. It places no more sells until price climbs back into the grid.
Above the upper bound, every sell has filled. The bot holds only the quote currency, keeps the step profits it collected and has no exposure to the rest of the rise. Nothing happens until price comes back down.
Some bots move the range to follow price. Shifting a grid upward means buying back in at higher prices, and shifting it downward means adding to a falling position, so trailing grids change the risk rather than remove it. A fixed grid accumulates the asset through a steady decline and sells out early in a steady rise.
What decides how a grid behaves
Instead of a list of coins, these are the market properties that shape any grid:
- Range or trend. A grid needs prices to cross its levels repeatedly. Whether a market will move sideways or trend over your horizon is not knowable in advance.
- Movement relative to the step. More crossings mean more cycles, but larger swings also raise the chance of leaving the range.
- Liquidity. Tight spreads and deep order books keep fills near the levels and keep emergency exits from slipping far.
- Fees. The fee level sets the minimum step, as shown above.
- Asset and venue risks. Delistings, stablecoin depegs, sudden supply changes and the exchange itself can all end a grid early.
Stops, restarts and running one yourself
Built-in grids on exchanges usually offer a stop below the range and a take-profit above it. Both close the position with market orders, which can fill well away from the trigger in a fast move.
A self-hosted grid needs more care. Its many resting orders live on the exchange, so if the bot crashes, orders keep filling while nothing replaces them, and the grid develops holes. On restart, the bot must read its open orders and fills from the exchange and rebuild the ladder before trading. Give it an API key without withdrawal rights, locked to the server's address, as described in running a crypto trading bot safely. A self-hosted grid needs a process that is always up to refill orders, which is the job of a small Linux server such as a CloudSat crypto trading bot VPS.
FAQ
Which coins are best for grid trading?
No pair can be named in advance as one that will suit a grid. What matters is whether prices keep crossing your levels, how liquid the market is, what the fees are, and what happens to you if price leaves the range in either direction.
Is grid trading low risk?
No. A grid is exposed to the asset's full decline below the range, gives up gains above it, pays fees on every fill and depends on the exchange staying available.
What happens to a grid bot in a crash?
Its buy orders fill one after another on the way down, so it ends up holding its whole allocation in the asset at an average price above the market. If a stop is set, it sells at market prices, which can be far below the trigger in a fast move.
Can a grid run on a stablecoin pair?
Mechanically, yes, but the range is very narrow, so the step must still clear two fees, and a stablecoin that loses its peg moves straight through the grid.
Crypto prices are volatile and trading involves risk of loss. Nothing in this article is financial advice.
Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.




