Troubleshooting
Common errors and how to fix them.
Authentication Errors
Signal Rejected: "Strategy key is empty"
Cause: Missing strategy_key parameter
Solution:
// ❌ Missing strategy_key
{
"position_side": "LONG",
"action": "BUY"
}
// ✅ Include strategy_key
{
"strategy_key": "your_encrypted_strategy_key_here",
"position_side": "LONG",
"action": "BUY"
}
Signal Rejected: "Invalid strategy key"
Cause: Incorrect or corrupted strategy_key
Solutions:
- Copy the strategy key again from OptAlgo dashboard
- Check for extra spaces or line breaks
- Ensure key hasn't been modified
- Verify you're using the correct strategy
Example Fix:
// ❌ Corrupted or partial key
{
"strategy_key": "eyJhbGciOiJIUzI1NiIsInR..."
}
// ✅ Complete valid key
{
"strategy_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdHJhdGVneV9pZCI6ImFiYzEyMyIsInVzZXJfaWQiOiJ1c2VyMTIzIn0.signature"
}
Strategy Errors
Signal Rejected: "Strategy not found"
Cause: Strategy was deleted or strategy_id in key is invalid
Solutions:
- Check if strategy still exists in dashboard
- Create a new strategy
- Get new strategy key from dashboard
- Update your signals with new key
Signal Rejected: "Strategy deactivated"
Cause: Strategy is inactive in OptAlgo dashboard
Solutions:
- Log in to OptAlgo dashboard
- Navigate to strategies
- Find the strategy
- Click "Activate" or "Enable"
Connection Errors
Signal Rejected: "Connection not found"
Cause: No exchange API keys configured for the strategy
Solutions:
- Log in to OptAlgo dashboard
- Go to Connections
- Add exchange connection
- Enter API keys
- Enable connection for strategy's account type (Spot/Futures)
Check API Permissions:
- ✅ Read access
- ✅ Trade access
- ✅ Futures access (if trading futures)
- ❌ Withdrawal (should be disabled for safety)
Validation Errors
Error: "Signal symbol does not match strategy symbol"
Cause: A signal for a single-symbol bot carries a different ticker than the bot's symbol, or no ticker at all. This applies to exits too. The rejection does not change the bot's verified state.
Example Problem:
// First signal
{
"strategy_key": "key123",
"ticker": "BTCUSDT.P"
}
// Later signal - MISMATCH
{
"strategy_key": "key123",
"ticker": "ETHUSDT.P" // ❌ Different symbol
}
Solutions:
- Include
tickerin every signal, exits included - Create one bot per trading pair, and use each bot's own key
- To trade many coins with one key, use a multi-symbol bot (Plus and Pro plans)
Correct Approach:
// Strategy 1: BTC
{
"strategy_key": "btc_strategy_key",
"ticker": "BTCUSDT.P"
}
// Strategy 2: ETH
{
"strategy_key": "eth_strategy_key",
"ticker": "ETHUSDT.P"
}
Error: "Exchange not found or does not match with strategy"
Cause: The signal's exchange is missing or differs from the bot's exchange (case does not matter)
Solution:
// ❌ Wrong exchange
{
"strategy_key": "binance_strategy_key",
"exchange": "BYBIT" // Strategy is configured for BINANCE
}
// ✅ Correct exchange
{
"strategy_key": "binance_strategy_key",
"exchange": "BINANCE"
}
Subscription Errors
Error: "subscription_not_found_or_expired_or_monthly_limit_reached"
Cause: Your OptAlgo subscription has expired, or on the Free plan you have reached the monthly trade limit (live and paper trades are counted separately)
What Happens:
- Opening signals (
LONG,SHORT),VALIDATE_ALERTand stop moves without an open trade are rejected UPDATE_ORDERandCHANGE_DIRECTIONare reduced to aCLOSE- The bot is stopped, and you receive a notification
- Exits and stop moves for an open trade still go through
Solutions:
- Check subscription status in dashboard
- Upgrade subscription for higher limits
- Wait for monthly reset (if limit reached)
- Renew expired subscription
Price Validation Errors
Error: "Stop loss price must be lower than take profit price"
Cause: Invalid price configuration for LONG position
Example Problem:
// ❌ Wrong price order for LONG
{
"position_side": "LONG",
"action": "BUY",
"entry_price": 50000,
"stop_loss_price": 52000, // ❌ Above entry
"take_profit_price": 55000
}
Solution:
// ✅ Correct price order for LONG
{
"position_side": "LONG",
"action": "BUY",
"entry_price": 50000,
"stop_loss_price": 48000, // ✅ Below entry
"take_profit_price": 55000 // ✅ Above entry
}
Rule for LONG:
stop_loss < entry < take_profit
Error: "Stop loss price must be higher than take profit price"
Cause: Invalid price configuration for SHORT position
Example Problem:
// ❌ Wrong price order for SHORT
{
"position_side": "SHORT",
"action": "SELL",
"entry_price": 50000,
"stop_loss_price": 48000, // ❌ Below entry
"take_profit_price": 45000
}
Solution:
// ✅ Correct price order for SHORT
{
"position_side": "SHORT",
"action": "SELL",
"entry_price": 50000,
"take_profit_price": 45000, // ✅ Below entry
"stop_loss_price": 52000 // ✅ Above entry
}
Rule for SHORT:
take_profit < entry < stop_loss
Symbol Format Errors
Error: "Ticker not supported or not found"
Cause: Symbol doesn't exist on exchange or wrong format
Common Issues:
// ❌ Wrong formats
"ticker": "BTCUSD.P" // Missing T
"ticker": "BTC/USDT" // Wrong separator
"ticker": "btcusdt.p" // Wrong case
"ticker": "BTCUSDT.P" // On spot strategy - wrong suffix
"ticker": "BTCUSDT" // On futures strategy - missing .P
Solutions:
// ✅ Correct formats
"ticker": "BTCUSDT.P" // Futures
"ticker": "BTCUSDT" // Spot
"ticker": "ETHUSDT.P" // Futures
"ticker": "ETHUSDT" // Spot
Error: "Account type mismatch"
Cause: Wrong .P suffix for account type
Example:
// Signal has .P suffix
{
"ticker": "BTCUSDT.P"
}
// But strategy is configured for SPOT
// Or vice versa:
{
"ticker": "BTCUSDT"
}
// But strategy is configured for FUTURES
Solution:
- Check strategy account type in dashboard
- Use
.Psuffix for futures only - No suffix for spot trading
- Or create new strategy with correct account type
Order Errors
Error: "Invalid action"
Cause: Missing or invalid action parameter for opening positions
Solution:
// ❌ Missing action
{
"position_side": "LONG"
}
// ✅ Include action
{
"position_side": "LONG",
"action": "BUY"
}
Error: "Invalid entry price"
Cause: Entry price outside exchange limits
Solutions:
- Check current market price
- Ensure price is within exchange min/max
- Use correct decimal precision
- Check exchange's tick size requirements
Error: "Price precision error"
Cause: Too many decimal places for the symbol
Example:
// ❌ Too many decimals
{
"entry_price": 50000.123456789
}
// ✅ Correct precision
{
"entry_price": 50000.12
}
Solution: Check exchange's tick size for the symbol
TradingView Integration Issues
Alert Not Triggering
The webhook answers 204 even when a check rejects the signal, so a successful delivery in TradingView does not mean the signal was executed. Check the bot's logs in OptAlgo first.
Checklist:
- ✅ Alert is active (not expired)
- ✅ Condition is met
- ✅ "Once Per Bar Close" setting
- ✅ Webhook URL is correct:
https://api.optalgo.com/signal-listener/signal(the oldhttps://api.optalgo.com/signaladdress does not exist) - ✅ JSON format is valid
JSON Format Error
Common Issues:
// ❌ Missing quotes
{
strategy_key: "abc"
}
// ❌ Trailing comma
{
"strategy_key": "abc",
}
// ❌ Wrong placeholder syntax
{
"entry_price": {close}
}
// ✅ Correct
{
"strategy_key": "abc",
"entry_price": {{close}}
}
Test JSON:
- Copy alert message
- Test in JSON validator
- Verify all placeholders work in TradingView
Position Management Issues
Can't Update Specific Position
Problem: Several trades are open on one bot, and an update affects the wrong one
Solution: If you open trades with a trade_id, send the same trade_id on every update and exit:
{
"strategy_key": "your_key",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "MOVE_STOP_LOSS",
"stop_loss_price": 49000,
"take_profit_price": 56000,
"trade_id": "BTC_LONG_001"
}
"There is an already open trade"
Problem: An entry arrived while the bot already holds a trade (with the same trade_id, or any trade when no trade_id is used). The entry is skipped.
Solution: Close the open trade first, or use UPDATE_ORDER to close it and open the new position in one signal.
"Max positions (N) reached ..."
Problem: A multi-symbol bot has all its slots taken by open coins, and a new coin's entry was ignored.
Solution: Wait for a coin to close, raise the bot's max positions (within your plan's cap), or close a coin. See Multi-symbol bots.
Position Already Closed
Problem: Trying to update or close non-existent position
Solution:
- Check dashboard for open positions
- Verify
trade_idis correct - Use
VALIDATE_ALERTto sync positions
Getting Help
Check Logs
- Log in to OptAlgo dashboard
- Navigate to Logs section
- Find your signal by:
- Timestamp
- Correlation ID
- Transaction ID
- Review error messages and events
Information to Provide Support
When contacting support, include:
- Strategy ID
- Signal timestamp
- Full signal JSON (remove strategy_key)
- Error message
- Correlation ID (from logs)
- Screenshots if applicable
Contact Support
- Dashboard: https://app.optalgo.com
- Navigate to Support section
- Provide detailed description
- Include relevant logs and error messages
Quick Diagnostic Checklist
Before contacting support, verify:
- Strategy key is correct and not expired
- Strategy exists and is active
- Exchange connection is configured
- API keys have correct permissions
- Subscription is active and not at limit
- Symbol format is correct (
.Pfor futures) - Price relationships are valid
- JSON format is valid
- Required parameters included
- TradingView webhook URL is correct (if using TV)
Next Steps
- Best Practices - Implementation tips
- Signal Flow - Understand signal processing
- Examples - Working examples