Signals · Guide

Connect a Trading Bot (3Commas)

Signals can do more than notify you — pointed at a bot service like 3Commas, each entry and exit can drive a bot that places the actual orders. Here is the exact recipe.

Three parties, one clean split of jobs. CoinLAB says when and which way — a LONG entry, a close. The bot decides how much and places the order on your exchange, using its own settings. CoinLAB never touches your exchange account — the only thing that travels is a small JSON message.

That split answers the most common question up front: position size doesn't come from the signal. You set order size on the bot — that's where it belongs, next to your balance and risk settings — and the signal simply pulls the trigger.

Bot services accept webhooks in their own format only — our default JSON is made for your own scripts, and a bot will quietly ignore it. The trick is the custom message feature: whatever JSON you write is delivered as-is, so you paste the bot's own order form.

  1. In 3Commas, create your bot and open its page — it shows a webhook URL and ready-made JSON messages (one for opening a deal, one for closing).
  2. In CoinLAB, go to Menu → Lab → Signals+ Add signal, pick your strategy, and select the WEBHOOK chip. Paste the bot's webhook URL as the address.
  3. Open MESSAGE FORMAT, switch to CUSTOM, and paste the bot's "open" JSON into Entry message and its "close" JSON into Close message — copied exactly, not retyped.
  4. Test it (read the next section first!), then press CREATE.

TradingView-style blanks in the pasted template — {{timenow}} and {{close}} — fill in automatically, so a template generated for TradingView works here unchanged.

DCA Bot: the JSON carries your bot_id and email_token and needs no edits. On multi-pair bots mind the pair field — 3Commas writes pairs quote-first (USDT_BTC on spot, USDT_BTCUSDT on futures). Since each CoinLAB signal line is one strategy on one coin, a fixed pair is exactly right.

Signal Bot: the generated JSON has an action field — set it to match your strategy's direction: enter_long / exit_long for a LONG strategy (in Entry and Close respectively), enter_short / exit_short for a SHORT one. If the bot is set to webhook-based sizing, the order block (amount, currency_type) is where size lives — a fixed value works fine.

Signal Bots also honor max_lag — they reject signals older than that many seconds. Keep it: it's your safety net against stale deliveries. DCA Bots have no such filter, so know that a delivery that failed and retried can arrive up to ~45 minutes late.

SEND TEST fires the bot for real. A custom message is delivered exactly as written, with no test marker — the bot can't tell our sample from a live signal and will open a real position. Wire your first test to a paper trading account (3Commas has one built in), watch a test entry and close arrive, then switch the bot to your live account.

Once live, every delivery is logged on the signal's page and under PAGE → Notifications — if the bot's service ever rejects a message, you'll see the failure and its reason there.

Connecting a bot means trades execute without you pressing anything — you own that configuration and its results. Signals are information; how a bot acts on them is between you and your bot. Nothing here is financial advice.