🔄Automating Infinity Algo Alerts via 3Commas
Guide for non-backtest version
Connect Infinity Algo signals directly to 3Commas for automated trading execution.
🎯 Three Integration Methods
Automatic Position Flipping
What it does:
Switches Long ↔ Short automatically
One bot handles both directions
Closes opposite position before opening new
Best for:
✅ Trending markets
✅ Active trading
✅ Maximum efficiency
✅ Less alert management
Direction: Reversal
Pairs: Only ONE pair per bot
Alerts: 2 total
- Buy Signal → enter_long
- Sell Signal → enter_short
Futures Note: With Hedge Mode ON, enable "Reverse position" to flip. With Hedge Mode OFF, bot automatically closes opposite side.
⚙️ Step 1: Configure Signal Bot
Navigate to 3Commas:
Log in → 3Commas.io
Bots → Signal Bot → Create Bot
Configure with these settings →
Name
e.g. Infinity Algo BTC-USDT
Exchange
Binance, Coinbase, etc.
Pairs
ONE pair only (Reversal mode)
Alert Type
Custom Signal
Direction
Long, Short, or Reversal
TP/SL
Set here or via webhook
Risk Caps
Max Investment, Leverage
📩 Step 2: Get Webhook Credentials
After saving your bot, find "Message for deal start signal" and copy:
{
"secret": "ab12cd34.ef56gh78…", // Keep this private!
"bot_uuid": "f1a2b3c4-…-9d0e1f2a", // Your bot's ID
"action": "enter_long",
"tv_exchange": "{{exchange}}",
"tv_instrument": "{{ticker}}"
}
Security: Never share your secret
token - it controls your bot! Signal-Bots no longer accept old bot_id
/email_token
pairs.
📊 Step 3: Create TradingView Alerts
Alert Configuration
Condition
Match your Pine script exactly (e.g., "1.1 Buy Signal - Smart")
Options
✅ Once per bar close
Webhook URL
https://api.3commas.io/signal_bots/webhooks
Message
JSON template with YOUR-SECRET & YOUR-UUID
📝 JSON Templates
{
"secret": "YOUR-SECRET",
"bot_uuid": "YOUR-UUID",
"action": "enter_long",
"tv_exchange": "{{exchange}}",
"tv_instrument": "{{ticker}}",
"order": {
"amount": 150,
"currency_type": "quote"
},
"take_profit": {
"enabled": true,
"steps": [
{ "order_type": "limit", "price_percent": 1, "volume_percent": 25 },
{ "order_type": "limit", "price_percent": 2, "volume_percent": 25 },
{ "order_type": "limit", "price_percent": 3, "volume_percent": 25 },
{ "order_type": "market", "price_percent": 4, "volume_percent": 25 }
]
},
"stop_loss": {
"enabled": true,
"order_type": "market",
"trigger_price_percent": 1
},
"max_lag": 300,
"timestamp": "{{timenow}}"
}
⚡ Quick Reference
price_percent
TP distance from entry
Integer: 1 = 1%, 2 = 2%
volume_percent
% of position to close
Must sum to 100%
trigger_price_percent
Stop loss distance
Integer: 1 = 1% loss
currency_type
Order size unit
quote
, base
, margin_percent
, position_percent
amount
Position size
Number based on currency_type
max_lag
Reject stale signals
Seconds (300 = 5 min)
timestamp
Signal freshness
Always use {{timenow}}
🎯 Which Method Should You Use?
Best For
Trending markets
Continuous trading
Emergency stops
Alerts Needed
2 (minimal)
3 (entry/exit/re-entry)
1 (stop all)
Position State
Always in
Flexible gaps
Fully closed
Bot Status
✅ Always active
✅ Always active
❌ Disabled
Re-entry
Automatic
Automatic
Manual required
Ideal Trader
Active/Confident
Flexible/Cautious
Risk-averse
Choose Reversal if you:
Trade trending pairs
Trust your signals
Want set-and-forget
Choose Clean Exit if you:
Need position control
Trade multiple pairs
Want gap periods
🚀 Advanced Features
Up to 8 Take Profit Levels
Volumes must total 100%
Can mix limit & market orders
Trailing only on last step
"take_profit": {
"enabled": true,
"steps": [
{ "order_type": "limit", "price_percent": 1, "volume_percent": 20 },
{ "order_type": "limit", "price_percent": 2, "volume_percent": 20 },
{ "order_type": "limit", "price_percent": 3, "volume_percent": 15 },
{ "order_type": "limit", "price_percent": 4, "volume_percent": 15 },
{ "order_type": "limit", "price_percent": 5, "volume_percent": 10 },
{ "order_type": "limit", "price_percent": 6, "volume_percent": 10 },
{ "order_type": "limit", "price_percent": 7, "volume_percent": 5 },
{ "order_type": "market", "price_percent": 8, "volume_percent": 5,
"trailing": { "enabled": true, "percent": 0.2 }
}
]
}
🛠️ Troubleshooting Checklist
Valid Credentials
JSON must include valid secret
and bot_uuid
Correct Webhook URL
Must be exactly https://api.3commas.io/signal_bots/webhooks
Alert Timing
Alerts fire Once per bar close (not "Once per bar")
One Alert Per Action
Never combine entry & exit in one JSON
Field Names
Use price_percent
not price_deviation
Volumes Sum to 100
All volume_percent
must total exactly 100
Signal Freshness
Include max_lag
and timestamp
to prevent stale signals
Bot Re-enabling
If using disable
, must manually re-enable bot
📖 JSON Field Glossary
secret
Private bot token
Copy exactly from Step 2
bot_uuid
Unique Signal-Bot ID
Copy from Step 2
action
Bot command
enter_long
, enter_short
, exit_long
, exit_short
, disable
positions_sub_action
When action is disable
market_close
→ flatten & disable
cancel
→ cancel orders only
tv_exchange
tv_instrument
TradingView placeholders
{{exchange}}
/ {{ticker}}
For futures: BTCUSDT.P
order.amount
Position size
Based on currency_type
setting
currency_type
Unit for amount
quote
→ USD value
base
→ Asset amount
margin_percent
→ % for entry
position_percent
→ % for exit
price_percent
TP distance from entry
Integer: 1 = 1%, 2 = 2%
volume_percent
% to close at each TP
1-100 (must sum to 100%)
trigger_price_percent
Stop loss trigger
Integer: 1 = 1% loss
order_type
Order execution type
limit
or market
max_lag
Signal age limit
Seconds (300 = 5 minutes)
timestamp
Current time
Always {{timenow}}
📚 Resources
Last updated
Was this helpful?