Skip to main content

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:

  1. Copy the strategy key again from OptAlgo dashboard
  2. Check for extra spaces or line breaks
  3. Ensure key hasn't been modified
  4. 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:

  1. Check if strategy still exists in dashboard
  2. Create a new strategy
  3. Get new strategy key from dashboard
  4. Update your signals with new key

Signal Rejected: "Strategy deactivated"​

Cause: Strategy is inactive in OptAlgo dashboard

Solutions:

  1. Log in to OptAlgo dashboard
  2. Navigate to strategies
  3. Find the strategy
  4. Click "Activate" or "Enable"

Connection Errors​

Signal Rejected: "Connection not found"​

Cause: No exchange API keys configured for the strategy

Solutions:

  1. Log in to OptAlgo dashboard
  2. Go to Connections
  3. Add exchange connection
  4. Enter API keys
  5. 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:

  1. Include ticker in every signal, exits included
  2. Create one bot per trading pair, and use each bot's own key
  3. 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_ALERT and stop moves without an open trade are rejected
  • UPDATE_ORDER and CHANGE_DIRECTION are reduced to a CLOSE
  • The bot is stopped, and you receive a notification
  • Exits and stop moves for an open trade still go through

Solutions:

  1. Check subscription status in dashboard
  2. Upgrade subscription for higher limits
  3. Wait for monthly reset (if limit reached)
  4. 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:

  1. Check strategy account type in dashboard
  2. Use .P suffix for futures only
  3. No suffix for spot trading
  4. 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:

  1. Check current market price
  2. Ensure price is within exchange min/max
  3. Use correct decimal precision
  4. 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:

  1. ✅ Alert is active (not expired)
  2. ✅ Condition is met
  3. ✅ "Once Per Bar Close" setting
  4. ✅ Webhook URL is correct: https://api.optalgo.com/signal-listener/signal (the old https://api.optalgo.com/signal address does not exist)
  5. ✅ 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:

  1. Copy alert message
  2. Test in JSON validator
  3. 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:

  1. Check dashboard for open positions
  2. Verify trade_id is correct
  3. Use VALIDATE_ALERT to sync positions

Getting Help​

Check Logs​

  1. Log in to OptAlgo dashboard
  2. Navigate to Logs section
  3. Find your signal by:
    • Timestamp
    • Correlation ID
    • Transaction ID
  4. 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 (.P for futures)
  • Price relationships are valid
  • JSON format is valid
  • Required parameters included
  • TradingView webhook URL is correct (if using TV)

Next Steps​