grid_plan
Calculate grid price levels with buy/sell sides and volumes for each level. Pure computation from grid type, range, investment, and current price, without side effects.
Instructions
Pure price-level calculation for a grid. No side-effects, no DB writes. Returns computed levels with price, side (buy/sell/null), and volume for each level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| levels | Yes | ||
| gridType | Yes | ||
| priceMax | Yes | Upper bound of the grid range (must be > priceMin) | |
| priceMin | Yes | Lower bound of the grid range (must be < priceMax) | |
| currentPrice | Yes | ||
| distribution | No | arithmetic | |
| pairDecimals | Yes | ||
| totalInvestment | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| levels | Yes |