The Trading Webhook Endpoint is a powerful cBot for cTrader that allows you to execute trading operations via HTTP requests. This tool is ideal for integrating automated trading strategies, external signals, or controlling your trading from third-party platforms like TradingView.
Product Info: Product information (default: https://ctrader.guru/)
Label: Label to identify operations (default: TWE)
License: Product license key
Key: API key to authenticate requests (default: webhook)
Interprets parameters as strings: Interpret parameters as strings (default: false)
Translate: Translates symbols into other symbols with different names
Prefix: Prefix to add to symbols
Suffix: Suffix to add to symbols
Once started, the cBot will create a webhook server at the address specified in the “Address” parameter. HTTP requests must be sent to this address, using the specified API key.
To make the webhook server accessible from the Internet, you need to properly configure your network:
Port Forwarding: You need to configure port forwarding on your router for port 80 (HTTP). This operation will forward incoming requests on port 80 to the PC running cTrader with the cBot.
IP Address:
Security: Make sure to use a robust API key and keep your operating system and cTrader updated to ensure the security of the webhook server.
Example of webhook URL:
http://[your-noip-domain].ddns.net/[API Key]
or
http://[your-public-ip]/[API Key]
NOTE: The cBot uses port 80 (HTTP) by default. If you use another port remember to include it in the webhook URL.
The Trading Webhook Endpoint accepts POST requests with JSON payload. Here are the available commands:
{
"command": "string",
"id": "string",
"symbol": "string",
"volume": number,
"lots": number,
"slPrice": number,
"tpPrice": number,
"slPips": number,
"tpPips": number
}
{
"command": "buy",
"symbol": "EURUSD",
"volume": 10000,
"slPips": 20,
"tpPips": 50
}
{
"command": "close",
"id": "12345"
}
{
"command": "edit",
"id": "12345",
"slPrice": 1.0850,
"tpPrice": 1.0950
}
The server doesn’t start: Verify that the specified IP address and port are correct and not in use by other applications.
Requests are rejected: Make sure you’re using the correct API key in the webhook URL.
Symbols are not recognized: Check that you have correctly set the symbol prefixes and suffixes, if necessary for your broker.
Operations are not executed: Verify that the cBot has the necessary permissions in your cTrader account and that there is sufficient margin available.
I can’t access the webhook from the Internet:
Access the Control Panel: From the Windows Start menu, open the Control Panel.
Open Windows Firewall: Select Windows Firewall and click on Advanced settings in the left column.
Create a new rule:
Configure the rule parameters:
80
as the specific local port, then click Next.Finish the configuration: Name the rule (e.g., "Enable Port 80") and click Finish.
Verify: Ensure that Port 80 is now open and accessible for your software.
For further assistance, don’t hesitate to contact support at https://ctrader.guru/.
Download: Trading Webhook Endpoint