Solucao de Problemas
Solucao de Problemas
Quando vocer grid bot encounters a problem, it logs specific error messages that tell you exactly what went wrong. This guide covers o mais common errors, explains their causes, and provides step-by-step solutions.
BALANCE_CHECK Error
What it means: O bot checked sua conta balance at startup and found it insufficient for the configured grid.
The check: O bot requires at least order_usd x grid_levels x 1.2 in available balance. The 1.2 multiplier provides a safety margin for fees and price movements. Por exemplo, with $100 per level and 20 levels, voce precisa at least $2,400.
Common causes:
- Your account balance is genuinely too low for a configuracao.
- Other open positions or orders are consuming margin, reducing available balance.
- You recently changed
order_usdorgrid_levelssem checking seu saldo.
Solutions:
- Check your Pacifica DEX account balance.
- Either deposit more funds to meet the requirement, or reduce sua configuracao: lower
order_usd, reducegrid_levels, or both. - Close other positions or cancel other orders that may be using margin.
- Verify ha no other bot running on o mesmo account consuming balance.
RUNLOCK Error
What it means: O bot tried to acquire its Redis-based run lock and failed. This lock ensures only one bot instance runs per user per symbol.
Common causes:
- Another instance of o mesmo bot is already running. Each user-symbol combination can only have one active bot.
- A previous bot instance crashed sem releasing its lock. The lock has a TTL (time-to-live) and will expire automatically, but this takes time.
- Redis is not accessible. O bot requires Redis for the run lock mechanism, and if Redis is down, o bot refuses to start as a safety measure.
Solutions:
- Check if another bot with o mesmo symbol is running. Stop it first if voce quer to start a new one.
- If o anterior bot crashed, wait for the lock TTL to expire (typically 2-5 minutes), then try again.
- Verify Redis is running and accessible. Check your infrastructure configuration.
- As a last resort, clear the specific lock key in Redis manually, but only if voce esta certain no other bot instance is running.
Timeout Errors
What it means: An API call to Pacifica DEX did not respond dentro do expected time.
Common causes:
- Pacifica DEX is experiencing high load or maintenance.
- Your network connection has intermittent issues.
- O exchange rate-limited your requests devido a too many API calls.
Impact: O bot handles timeouts gracefully. When a REST snapshot times out, o bot skips that cycle and tries again on o proximo one. No orders are placed during a cycle with failed data fetching. Isso previne the dangerous scenario where missing data is interpreted as “no orders exist.”
Solutions:
- Check Pacifica DEX status. If o exchange is under maintenance, wait for it to come back.
- Single timeouts are normal and recover automatically. Only investigate if timeouts persist for mais que 5 minutes.
- Check your
cycle_interval_secsetting. If e very low (under 5 seconds), you may be hitting rate limits. Increase it to 10-15 seconds. - Verify your network connection is stable.
WebSocket Disconnection
What it means: The WebSocket connection to o preco feed or trade history feed was lost.
Impact: O bot has automatic reconnection logic. Price feed disconnections trigger a fallback to REST API price queries. Trade history disconnections mean fills may be detected later atraves do periodic REST sync em vez de instantly through WebSocket.
Solutions:
- Usually no action needed. O bot reconnects automatically.
- If disconnections are frequent (multiple times per hour), check your network stability.
- Review the logs for any specific error messages accompanying the disconnection.
Bot Starts But No Trades Execute
What it means: O bot is running its cycle but no ordem de compras are being placed.
Common causes:
- The preco atual is above all nivel de grids. O bot only places ordem de compras below the preco atual. If o preco esta acima your grid high, no levels qualify.
- All nivel de grids already have orders or positions. The duplicate prevention system is working correctly.
- O bot is still in its startup phase, performing bootstrap or initial sync.
- The data health guard is blocking order placement devido a stale data.
Solutions:
- Check the preco atual relative to sua faixa de grid. If o preco esta acima your range, no buys will trigger until o preco cai.
- Review the logs for messages about why specific levels were skipped (locked, pending, in-flight, already has position).
- Wait 2-3 minutes after startup for the initial sync to complete before expecting trades.
- Check the REST snapshot health in logs para garantir data is fresh.
Grid Break Shutdown
What it means: O preco moved outside sua faixa de grid for longer than the confirmation period, and o bot performed a clean shutdown.
This is normal behavior, not an error. Grid break protection is a safety feature that prevents o bot from operating in unfavorable conditions.
What to do:
- Check the preco atual and sua faixa de grid. Understand why o preco exited the range.
- Decide se to restart with o mesmo range (if you expect o preco to return) or reconfigure with an updated range.
- If grid breaks happen frequently, your range may be too narrow. Consider widening it based on ATR analysis.
Reconciliation Corrections
What it means: The self-healing system detected that expected orders were missing and placed corrective orders.
Occasional corrections are normal. They happen when orders are cancelled by o exchange, rejected silently, or lost during brief connectivity issues. The reconciliation system exists specifically for these situations.
When to worry: If reconciliation corrections happen every few minutes consistently, there may be an underlying issue:
- Check if o exchange is rejecting sua ordems (insufficient margin, invalid parameters).
- Verify sua conta does not have restrictions or trading limits.
- Look for error messages in the logs around the time corrections occur.
General Solucao de Problemas Steps
Quando voce encounter an issue not covered above:
- Read the logs. O bot logs detailed information about every decision. The answer is almost always in the log output.
- Check o exchange. Log into Pacifica DEX directly and verify sua posicaos and orders. Compare against what o bot dashboard shows.
- Stop before changing. If something seems wrong, stop o bot first. The clean shutdown will secure sua posicaos.
- One change at a time. Se voce adjust configuration to fix an issue, change one parameter, restart, and observe. Multiple changes make diagnosis impossible.
- Paper mode test. If voce esta unsure about a configuration change, test it in paper mode first.
Resumo
- BALANCE_CHECK means insufficient funds; either deposit more or reduce order_usd and grid_levels.
- RUNLOCK means another bot instance may be running or a crashed instance left a lock; wait for TTL expiry or verify no duplicate is running.
- Timeout errors are handled automatically; investigate only if they persist beyond 5 minutes.
Proximo Passo
Return to the guide overview to explore more topics or dive into Strategy Guides for advanced configuration techniques.
✨ Este artigo foi util?
Faca suas perguntas no Discord →