Automating Infinity Algo Alerts via 3Commas🔄
⚙️ Step 1: Configure your 3Commas Signal-Bot
Log in at 3Commas.io
Bots → Signal Bot → Create Bot
Fill the launcher:
Name
e.g. Infinity Algo BTC-USDT Signal Bot
Exchange
Binance, Coinbase, etc.
Pairs
e.g. BTC/USDT
Alert Type
Custom Signal (was “TradingView Custom Signal”)
Direction
Long, Short, or Reversal for both (was “Strategy Type”)
TP / SL
Set them here or let Infinity Algo include them in the webhook JSON
Any other risk caps
Max Investment, Leverage, etc.
Click Save Bot
📩 Step 2: Retrieve your webhook credentials
Open the bot you just saved and scroll to “Message for deal start signal.” Copy the JSON block you see—only two values matter:
{
"secret": "ab12cd34.ef56gh78…", // keep private!
"bot_uuid": "f1a2b3c4-…-9d0e1f2a",
"action": "enter_long",
"tv_exchange": "{{exchange}}",
"tv_instrument": "{{ticker}}"
}
Use these secret
and bot_uuid
in every alert.
Signal-Bots no longer accept the old bot_id
/ email_token
pair—those are for legacy DCA bots.
📈 Step 3: Create TradingView alerts for Infinity Algo
3-A Alert-box settings (identical for every alert)
Condition
pick the Infinity Algo signal you trust (e.g. “Buy Signal – Smart”, “Sell Signal – AI”)
Options
Once per bar close
Webhook URL
https://api.3commas.io/signal_bots/webhooks
Message
paste one of the JSON templates below and replace YOUR-SECRET
& YOUR-UUID
(from Step 2)
3-B Choose one workflow
Ping-pong / Reversal (Long ↔ Short with one alert per side)
Reversal
2 alerts total:
• Buy → enter_long
JSON
• Sell → enter_short
JSON
Bot auto-closes the opposite deal before opening the new one.
Explicit exit first (extra safety)
Long (or Short)
3 alerts:
• Entry (enter_long
/ enter_short
)
• Exit (disable + market_close
)
• (optional) second entry to reverse
You decide exactly when to flatten; no position overlap ever.
JSON templates
Tip: all
price_deviation
numbers stay positive; 3Commas interprets direction fromenter_long
vsenter_short
.
JSON #1 Open / add LONG
{
"secret": "YOUR-SECRET",
"bot_uuid": "YOUR-UUID",
"action": "enter_long",
"tv_exchange": "{{exchange}}",
"tv_instrument": "{{ticker}}",
"order": { "amount": 150, "currency_type": "quote" },
"take_profit": { "steps": [
{ "price_deviation": 0.01, "volume": 25 },
{ "price_deviation": 0.02, "volume": 25 },
{ "price_deviation": 0.03, "volume": 25 },
{ "price_deviation": 0.04, "volume": 15 },
{ "price_deviation": 0.05, "volume": 7 },
{ "price_deviation": 0.06, "volume": 3 }
]},
"stop_loss": { "price_deviation": 0.01 }
}
JSON #2 Open / add SHORT
{
"secret": "YOUR-SECRET",
"bot_uuid": "YOUR-UUID",
"action": "enter_short",
"tv_exchange": "{{exchange}}",
"tv_instrument": "{{ticker}}",
"order": { "amount": 150, "currency_type": "quote" },
"take_profit": { "steps": [
{ "price_deviation": 0.01, "volume": 25 },
{ "price_deviation": 0.02, "volume": 25 },
{ "price_deviation": 0.03, "volume": 25 },
{ "price_deviation": 0.04, "volume": 15 },
{ "price_deviation": 0.05, "volume": 7 },
{ "price_deviation": 0.06, "volume": 3 }
]},
"stop_loss": { "price_deviation": 0.01 }
}
JSON #3 Close any open position at market
{
"secret": "YOUR-SECRET",
"bot_uuid": "YOUR-UUID",
"action": "disable",
"positions_sub_action": "market_close"
}
market_close
flattens the deal and disables the bot until a new entry alert arrives.
🧠 Advanced tips
Multiple TP levels – include up to 8 objects in
take_profit.steps
; volumes must add to 100 %.AI vs. normal signals – if risk settings differ, run separate bots (each with its own secret/UUID).
Testing – start in 3Commas Paper Trading or tiny sizes; look for “Signal executed” in the bot log.
🛠️ Troubleshooting checklist
JSON must include valid
secret
andbot_uuid
.Webhook URL must be
https://api.3commas.io/signal_bots/webhooks
.Alerts fire Once per bar close; duplicates usually mean “Once per bar” was chosen by mistake.
One TradingView alert → one JSON block (never combine entry & exit).
Need more? See https://help.3commas.io/en.
🔤 Glossary of JSON fields
secret
Your private bot token (authenticates the webhook).
Copy it exactly from Step 2.
bot_uuid
Unique ID of the Signal-Bot.
Copy from Step 2.
action
What the bot should do.
enter_long
, enter_short
, or disable
.
positions_sub_action
Extra command when action:"disable"
.
market_close
→ flatten at market & disable the bot.
cancel
→ cancel open orders only.
tv_exchange
/ tv_instrument
Passed straight from TradingView placeholders.
Usually {{exchange}}
/ {{ticker}}
.
order.amount
Position size.
If currency_type:"quote"
→ USD value (e.g. 150).
If contracts
→ number of contracts.
If percents
→ % of available balance.
currency_type
Unit for amount
.
"quote"
, "contracts"
, or "percents"
.
price_deviation
Distance from entry for TP/SL.
Decimal %: 0.02
= +2 % (long) or –2 % (short).
volume
(inside each TP step)
Portion of the original position to close at that step.
1 – 100 (interpreted as percent). Steps must sum to 100 %.
stop_loss.price_deviation
Hard stop distance.
Positive decimal; 0.01 = –1 % on a long, +1 % on a short.
Last updated