Skip to main content

Prerequisites

Before you begin, make sure you have:
An InnovaTrading account
An API key from Dashboard Settings
Python 3.8+ or Node.js 18+ installed

Step 1: Install the SDK

pip install requests

Step 2: Get Market Data

First, fetch OHLC bars to analyze:
import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://api.innova-trading.com"

# Fetch 500 bars of EURUSD H1
response = requests.get(
    f"{BASE_URL}/api/external/bars",
    params={
        "symbol": "EURUSD",
        "timeframe": 60,
        "limit": 500
    },
    headers={"Authorization": f"Bearer {API_KEY}"}
)

bars = response.json()["bars"]
print(f"Fetched {len(bars)} bars")
print(f"Latest bar: {bars[-1]}")
{
  "success": true,
  "symbol": "EURUSD",
  "timeframe": 60,
  "count": 500,
  "bars": [
    {
      "bar_number": 0,
      "time": 1765540800,
      "datetime_utc": "2025-12-12T04:00:00Z",
      "open": 1.1732,
      "high": 1.1740,
      "low": 1.1725,
      "close": 1.1738,
      "volume": 2500
    }
  ]
}

Step 3: Create a Signal

Now let’s send a BUY signal with Stop Loss and Take Profits:
# Get the latest bar
latest_bar = bars[-1]
bar_time = latest_bar["time"]  # IMPORTANT: Use this timestamp!
entry_price = latest_bar["close"]

# Calculate levels
stop_loss = entry_price - 0.0030  # 30 pips
tp1 = entry_price + 0.0030  # 1:1 RR
tp2 = entry_price + 0.0060  # 1:2 RR
tp3 = entry_price + 0.0090  # 1:3 RR

# Create signal with multiple points
signal = {
    "symbol": "EURUSD",
    "timeframe": 60,
    "indicator_name": "My First Signal",
    "points": [
        {
            "time": bar_time,
            "type": "low",
            "price": entry_price,
            "label": "BUY",
            "color": "#3b82f6",
            "shape": "arrowUp",
            "size": 2
        },
        {
            "time": bar_time,
            "type": "low",
            "price": stop_loss,
            "label": "SL",
            "color": "#ef4444",
            "shape": "square",
            "size": 1
        },
        {
            "time": bar_time,
            "type": "high",
            "price": tp1,
            "label": "TP1",
            "color": "#22c55e",
            "shape": "circle",
            "size": 1
        },
        {
            "time": bar_time,
            "type": "high",
            "price": tp2,
            "label": "TP2",
            "color": "#22c55e",
            "shape": "circle",
            "size": 1
        },
        {
            "time": bar_time,
            "type": "high",
            "price": tp3,
            "label": "TP3",
            "color": "#22c55e",
            "shape": "circle",
            "size": 1
        }
    ],
    "metadata": {
        "signal_type": "BUY",
        "strategy": "Quick Start Example"
    }
}

# Submit the signal
response = requests.post(
    f"{BASE_URL}/api/external/indicators/my_first_signal",
    json=signal,
    headers={
        "Authorization": f"Bearer {API_KEY}",
        "Content-Type": "application/json"
    }
)

result = response.json()
print(f"Signal submitted! {result['points_received']} points")
print(f"Expires at: {result['expires_at']}")
{
  "success": true,
  "indicator_id": "my_first_signal",
  "points_received": 5,
  "symbol": "EURUSD",
  "timeframe": 60,
  "expires_at": "2025-12-13T12:00:00Z",
  "message": "Indicator data stored successfully"
}

Step 4: View Your Signal

  1. Go to InnovaTrading Chart
  2. Select EURUSD and H1 timeframe
  3. Open the Indicators panel
  4. Find “My First Signal” under External Indicators
  5. Enable it to see your signal on the chart!
Signal on chart

Next Steps