GoCharting

GoCharting Webhook Setup Guide

Overview

GoCharting is a professional HTML5 charting platform optimized for Indian markets. With a Premium Plan, you can set up webhook alerts to automate your trading strategies with OpenAlgo.


Prerequisites

1. GoCharting Premium Plan

  • Webhook alerts are only available on the GoCharting Premium Plan

  • Subscribe at GoCharting to access webhook features

2. OpenAlgo Setup

  • OpenAlgo instance running and accessible

  • API key configured in OpenAlgo

  • Broker connected and authenticated

3. Public URL Configuration

Option A: Production/Custom Domain

If you have a custom domain or server:

  1. Open your .env file

  2. Update the HOST_SERVER variable:

    HOST_SERVER=https://sub.yourdomain.com

Option B: Local Development with Tunneling

If you're running OpenAlgo locally (on your computer) and want to test webhooks, you'll need to expose your local server to the internet using a tunneling service.

Popular Tunneling Services:

  • DevTunnel (Microsoft) - Good for Visual Studio users

  • ngrok - Popular cross-platform option

  • localtunnel - Free and simple alternative

  • Cloudflare Tunnel - Enterprise-grade option

How Tunneling Works:

  1. Your local OpenAlgo runs on http://127.0.0.1:5000

  2. Tunneling service creates a public URL pointing to your local server

  3. GoCharting can send webhooks to this public URL

  4. The tunnel forwards requests to your local OpenAlgo

Typical URL Formats:

  • DevTunnel: https://abc123.devtunnels.ms

  • ngrok: https://abc123.ngrok.io

  • localtunnel: https://abc123.loca.lt

Setup Steps:

  1. Install and configure your chosen tunneling service

  2. Start the tunnel pointing to port 5000 (OpenAlgo's default port)

  3. Copy the public URL provided by the tunneling service

  4. Update your .env file:

    HOST_SERVER=https://your-tunnel-url.com
  5. Restart OpenAlgo application

⚠️ Important Notes:

  • Tunnel URLs may change each time you restart (unless using paid plans)

  • Free tier tunnels may have bandwidth/time limitations

  • Update the webhook URL in GoCharting if your tunnel URL changes

  • For production use, consider a custom domain instead of tunneling


Step-by-Step Setup

Step 1: Generate Webhook Configuration

Login to OpenAlgo

  • Navigate to your OpenAlgo dashboard

  • Go to Platforms from the main navigation menu

Open GoCharting Configuration

  • Click on the "Configure GoCharting" card

  • You'll be redirected to /gocharting/

Configure Your Trade Parameters

  1. Generate JSON

    • Click the "Generate JSON" button

    • The webhook configuration will be displayed on the right side

  2. Copy Configuration

    • Webhook URL: Click "Copy" button next to the webhook URL

      https://yourdomain.com/api/v1/placeorder
    • JSON Payload: Click "Copy" button to copy the generated JSON

      {
        "apikey": "your_api_key_here",
        "strategy": "GoCharting",
        "symbol": "SAIL",
        "action": "BUY",
        "exchange": "NSE",
        "pricetype": "MARKET",
        "product": "MIS",
        "quantity": "10"
      }

Step 2: Create Alert in GoCharting

Open GoCharting Chart

  • Login to your GoCharting Premium account

  • Open the chart for your desired instrument

Set Alert Conditions

  • Right-click on the chart or use the alert button

  • Click "Create Alert"

Configure the alert parameters:

Setup Messaging

  • Name: Give your alert a descriptive name (e.g., "SAIL BUY ALERT")

  • Message: Paste your copied JSON payload here

    {
      "apikey": "your_api_key_here",
      "strategy": "GoCharting",
      "symbol": "SAIL",
      "action": "BUY",
      "exchange": "NSE",
      "pricetype": "MARKET",
      "product": "MIS",
      "quantity": "10"
    }

Webhook URL: Paste your OpenAlgo webhook URL

https://yourdomain.com/api/v1/placeorder
  1. Create the Alert

    • Review all settings

    • Click "CREATE ALERT" button

    • Your alert is now active!



Support & Resources

Documentation

Community

  • OpenAlgo GitHub: https://github.com/marketcalls/openalgo

  • Report Issues: https://github.com/marketcalls/openalgo/issues

Video Tutorials

  • Check OpenAlgo YouTube channel for video guides

  • GoCharting tutorials for alert setup


Last updated

Was this helpful?