Skip to content

Webhook

A webhook connects alerts from your charting platform, such as TradingView, to the bot. When an alert fires, the bot executes an order according to the instructions you set inside the alert. The instructions are written in the alert message, so execution follows exactly what you send.

  • Pro plan. The webhook feature is available on the Pro plan.
  • A connected exchange API key. Orders are forwarded to your own exchange account through your API key. Trader Pending does not hold your funds.
  1. Generate a token. Open Settings > API & Webhook and generate a token. The token and the webhook URL will appear. Copy the token now, as it is shown only once.

  2. Add it to your alert. In your charting platform, create an Alert, enable the Webhook URL option, and paste the webhook URL from the previous step.

  3. Fill the alert message. Write the alert message as JSON. Example:

    {
    "secret": "your-secret-token",
    "action": "buy",
    "symbol": "BTCUSDT",
    "entry": 65000,
    "sl": 63000,
    "tp": [67000, 69000],
    "leverage": 5,
    "id": "{{timenow}}"
    }
    • secret. The token from the first step. Keep it secret.
    • action. Order direction, buy or sell.
    • symbol, entry, sl, leverage. The pair, entry price, stop-loss, and leverage according to your strategy.
    • tp. Take-profit as a list, from one up to three targets.
    • id. A unique marker, optional. It helps ensure that duplicate alerts sent with the same id do not become duplicate orders.
  4. Test once. Trigger the alert one time, then check your position or notifications to confirm the result is as expected.

  • The token is secret. Do not share it and do not commit it to a public repo. Anyone who holds the token can send instructions on your behalf.
  • Revoke anytime. You can revoke a token from the dashboard at any time; the old token stops working immediately.
  • A different token per strategy. Use a separate token for each strategy so it is easy to manage and can be revoked selectively.
  • Rate limit. A sane rate limit protects your account from a flood of alerts.
  • No double firing. Duplicate alerts with the same id marker will not become duplicate orders.
  • Execution follows the alert. The webhook executes exactly the instructions in your alert, so make sure the alert content is correct before you enable it.

Orders are executed automatically according to the instructions in your alert. Crypto futures is high risk and the webhook does not guarantee results. Trader Pending is non-custodial: funds stay in your own exchange account, and you are fully responsible for the strategy and the alerts you send.