Automate your trading strategy by integrating external systems with AutoTrade using webhooks. This guide walks you through every step— from setup to execution—so you can trigger your trading robots instantly based on market signals.
What is a webhook?
A webhook is an HTTP callback that sends real-time data from one application to another whenever a specific event occurs. In trading, webhooks let you automatically execute orders or strategies when signals are generated by charting platforms like TradingView.
Prerequisites
- AutoTrade Desktop App installed and running on your computer.
- An Advanced Subscription to AutoTrade (required to enable the Webhook module).
- A saved trading robot in AutoTrade, identified by a unique name (e.g., my_robot_name).
- A webhook service endpoint. We recommend Webhook.site or any provider that supports forwarding payloads.
Configuring AutoTrade Webhooks
Follow these steps to connect your AutoTrade instance to your webhook endpoint:
- Open AutoTrade and log in.
- Navigate to Settings → Webhook.
- Enter Your Credentials:
- API Key: <your_api_key>
- API Token: <your_api_token>
- Enable the Webhook Module:
- Toggle Webhook to On.
- Save and reload the application.
- Restart AutoTrade to activate the webhook listener.
How it works
- Generate a Signal: Create an alert in your charting platform (e.g., TradingView) with a custom message or JSON payload.
- Send Alert to Webhook: TradingView sends the HTTP POST request to your webhook URL.
- Forward to AutoTrade: Your webhook service forwards the JSON payload to AutoTrade’s local server.
- Execute the Action: AutoTrade parses the payload and runs the specified action on your trading robot.
Example Payload Flow
- TradingView Alert (to Webhook Service)
{ "action": "run_robot", "kwargs": { "name": "my_robot_name" } }
- Webhook Service resend the previous payload (forward to AutoTrade)
- AutoTrade Executes the run_robot command and starts your robot named ‘my_robot_name’.
AutoTrade Socket API
For now, SSCA supports two actions:
Action | Explaination | Payload |
---|---|---|
run_robot | Execute a stored trading robot by name. | {"action":"run_robot","kwargs":{"name":"my_robot_name"}} |
kill | Shutdown AutoTrade and all running robots. | {"action":"kill","kwargs":{}} |
Next Steps
Ready to supercharge your trading workflow? Set up webhooks today and let AutoTrade handle the rest!
🔗 Download AutoTrade Now
📚 Explore Documentation & Tutorials
💬 Ask Questions & Get Support