New

Webhooks Integration

Get signals sent directly to your server

Instructions

To receive real-time TrendFi trade signals directly on your server, follow these steps:


  1. 1. Create an endpoint
    Set up an endpoint on your server that can handle our POST requests. Upon receiving a signal, your server should return a 200 OK status code. If your server does not respond, we will retry up to 3 times, with a 5-second delay between each attempt.

  2. 2. Add webhook URL
    Once your endpoint is live, go to Settings and input your endpoint URL in the webhook input. Our system will automatically send POST requests to this URL whenever new trade signals are generated.

  3. 3. Generate a webhook token
    For added security, generate a webhook token in your Settings. This token will be included in every webhook request we send, allowing you to verify that the request is coming from TrendFi.

  4. 4. Handle response
    Each trade signal will be sent as an individual POST request, formatted in JSON. If the request fails, the same signal ID will be used for each retry attempt. We do not batch multiple signals into a single request.
JSON format
{
  "id": "b0a81649-3305-4012-a3e7-3270d7bd1532",
  "date": "2024-01-22",
  "type": "crypto",
  "ticker": "BTC",
  "price": 65293.44,
  "buy": true,
  "sell": false,
  "short": false,
  "cover": false,
  "reason": "Reason for trade",
  "token": "your-webhook-token"
}

Parameters
{
  id: string    - Unique ID for each trade.
  date: string  - Date in YYYY-MM-DD format.
  type: string  - Trade type, either "crypto" or "stock".
  ticker: string - 3 or 4 letter ticker symbol.
  price: float  - Price in USD.
  buy: boolean  - Enter a long position.
  sell: boolean - Exit a long position.
  short: boolean - Enter a short position.
  cover: boolean - Exit a short position.
  reason: string - Trade reason generated by AI.
  token: string  - Your webhook token for verification (will be null if you haven't generated one).
}

Security

When receiving webhook requests, verify the token included in the request body matches the token you generated in your settings. This ensures the request is genuinely from TrendFi and prevents unauthorized access to your endpoint. If you haven't generated a token, the token field will be null.


Discord webhooks

You can now integrate with Discord! Submit your Discord webhook URL in the Settings, and we'll automatically format signals for Discord.


By using our webhook integration, you agree to our terms, privacy policy, and disclaimer.
Ready to get started?

Track your favorite assets for free!

Try for free
No credit card required