Overview
| Property | Value |
|---|---|
| Position Type | Spot or Perp |
| keep_position | Configurable |
| Use Cases | Range-bound markets, accumulation, market making |
How It Works
- Grid Creation: Divides price range into evenly spaced levels
- Order Placement: Places entry orders at each level
- Fill Management: When a level fills, places take profit order
- Level Completion: Each level manages its own entry/exit cycle
- Risk Management: Overall position managed by triple barrier
Configuration
Parameters
Grid Boundaries
| Parameter | Description |
|---|---|
start_price | Lower price bound of the grid |
end_price | Upper price bound of the grid |
limit_price | Stop loss price - exits all positions if breached |
side | BUY for accumulation grid, SELL for distribution |
Sizing
| Parameter | Default | Description |
|---|---|---|
total_amount_quote | - | Total capital to deploy across all levels |
min_spread_between_orders | 0.05% | Minimum % spread between grid levels |
min_order_amount_quote | 5 | Minimum order size in quote |
Execution
| Parameter | Default | Description |
|---|---|---|
max_open_orders | 5 | Maximum simultaneous open orders |
max_orders_per_batch | None | Orders to place per batch |
order_frequency | 0 | Seconds between order batches |
activation_bounds | None | Only keep orders within this % of current price |
safe_extra_spread | 0.01% | Extra spread for safety |
Risk Management
| Parameter | Description |
|---|---|
triple_barrier_config | Stop loss, take profit, time limit for overall position |
leverage | Leverage for perpetual markets |
keep_position | Whether to keep net position on termination |
Grid Level States
Each level tracks its own state independently:| State | Description |
|---|---|
NOT_ACTIVE | No orders placed at this level |
OPEN_ORDER_PLACED | Entry order active, waiting for fill |
OPEN_ORDER_FILLED | Entry filled, take profit order being placed |
CLOSE_ORDER_PLACED | Take profit order active |
COMPLETE | Both entry and take profit filled |
Example: Accumulation Grid
Buy ETH between 3500, taking profit at each level:Example: Range Trading Grid
Trade BTC in a range, closing each level for profit:Grid vs Position Executor
| Feature | Position Executor | Grid Executor |
|---|---|---|
| Order Levels | Single | Multiple (auto-calculated) |
| Entry | One price | Range of prices |
| Take Profit | Single target | Per-level targets |
| Use Case | Directional bet | Range trading |
| Complexity | Simple | More complex |
Activation Bounds
Theactivation_bounds parameter keeps orders active only near the current price:
- Orders more than 2% from current price are cancelled
- As price moves, new orders are placed within bounds
- Reduces open order count and exchange rate limits
Position Handover
Whenkeep_position=True:
- Net inventory from all levels stays in account
- Added to Position Hold for agent management
- Useful for accumulation strategies
keep_position=False:
- All positions closed on termination
- Realized P&L from each level reported
- Clean exit with no leftover inventory

