Automated Trading with TrendSpider Trading Bots using Sferica (Step-by-Step)

Automated Trading with TrendSpider Trading Bots using Sferica (Step-by-Step)

Published on: September 21, 2025

Automated Trading with TrendSpider Trading Bots using Sferica — Step-by-Step

If you already use TrendSpider and want to go from signals to hands-free automated trading, this guide shows the exact setup with Sferica, including the webhook URL and copy/paste JSON bodies for long/short entries and exits.

 

What happens under the hood

  • Your Trading Bot (or Alert) in TrendSpider triggers
  • TrendSpider sends a webhook to your Sferica endpoint.
  • Sferica reads the payload and places the order on the exchange connection you select.

 

Prerequisites

  • A Sferica account with at least one exchange connected.
  • Your Connection Pointer (identifies which exchange connection to use).
  • A TrendSpider account with a strategy or bot you want to automate.

 

Step 1 — Copy your Connection Pointer in Sferica

  • Log in to Sferica → Exchanges Connector → copy the Pointer for the exchange you’ll trade on.
  • Keep it handy, you’ll paste it into the JSON bodies below.

 

Step 2 — Open your TrendSpider bot/alert and enable Webhook

  • In a Trading Bot, edit the Entry and Exit webhooks.
  • For a standard Alert, choose Action → Webhook.

Pro Tip: If you want both long and short, configure both flows: Enter Long / Exit Long and Enter Short / Exit Short.

 

Step 3 — Paste the Webhook URL

Use this URL for all your Entry and Exit webhooks: http://217.160.238.76
 

Step 4 — Paste the Webhook Body (JSON)

Use %bot_symbol% (TrendSpider fills this automatically).
Replace REPLACE_WITH_ORDER_SIZE and REPLACE_WITH_POINTER_FROM_SFERICA.

 

Enter Long

{
  "ticker": "%bot_symbol%",
  "action": "buy",
  "prev_position": "flat",
  "quantity": "REPLACE_WITH_ORDER_SIZE",
  "pointer": "REPLACE_WITH_POINTER_FROM_SFERICA"
}

Exit Long

{
  "ticker": "%bot_symbol%",
  "action": "sell",
  "prev_position": "long",
  "quantity": "REPLACE_WITH_ORDER_SIZE",
  "pointer": "REPLACE_WITH_POINTER_FROM_SFERICA"
}

Enter Short

{
  "ticker": "%bot_symbol%",
  "action": "sell",
  "prev_position": "flat",
  "quantity": "REPLACE_WITH_ORDER_SIZE",
  "pointer": "REPLACE_WITH_POINTER_FROM_SFERICA"
}

Exit Short

{
  "ticker": "%bot_symbol%",
  "action": "buy",
  "prev_position": "short",
  "quantity": "REPLACE_WITH_ORDER_SIZE",
  "pointer": "REPLACE_WITH_POINTER_FROM_SFERICA"
}

 

Example (EURUSD, qty 1000 units, pointer abc123)::

{
  "ticker": "%bot_symbol%",
  "action": "buy",
  "prev_position": "flat",
  "quantity": "1000",
  "pointer": "abc123"
}

Notes:
prev_position tells Sferica what you held before this order (flat, long, or short) so it can act correctly.
• Keep JSON valid—no trailing commas or smart quotes.

Step 5 — Risk management & sizing

  • Start with a small quantity (or paper trading if available).
  • Confirm tickers/symbols match your exchange (spot vs. futures, symbol naming).
  • If your strategy pyramids or flips, ensure the entry/exit logic and prev_position values reflect that behavior.

 

Step 6 — Test end-to-end

  • Trigger your bot in TrendSpider (manually or with a test condition).
  • Watch for a success message and verify the order reached your exchange.
  • Scale size only after multiple successful test runs.

 

Troubleshooting

  • No order placed? Check if the bot fired, confirm the Webhook URL and valid JSON.
  • “Pointer” not found? Re-copy your Sferica Connection Pointer and paste again.
  • Wrong symbol? Align %bot_symbol% formatting with what your exchange supports.
  • Quantity errors? Use realistic min sizes for the instrument (exchange rules apply).

 

FAQs

  • Does Sferica support both long and short? Yes, use the four templates above and set prev_position correctly.
  • Can I run multiple bots to the same exchange? Yes, absolutely, reuse the same Pointer or create separate pointers for isolation.
  • Can I combine Discord alerts with automation? Yes, join our free Discord alerts channel to test signals first, then automate when ready.

Next steps

Ready to Automate Your Trading?

Explore our plans and start your 14-day free trial today.

View Pricing