Alphabots Skills Integration Guide: AI Agents + Trading

Algo Trading Specifics
Parth Khare
Parth Khare
Parth is Co-Founder and CEO of AlphaBots, he is responsible for research and new product initiative. He is also an expert algo trader and educator in this space.
February 27th, 2026 | 12 mins

Alphabots Skills Integration Guide

AI agents can now integrate directly with Alphabots for order placement and portfolio insights. Here's everything you need to know.


Overview

Alphabots provides two main integration methods for AI agents:

Method Protocol Best For
Webhook API HTTP POST Order placement, simple integrations
MCP Server MCP Protocol Portfolio data, analysis, rich market data

Both methods can be used together — use webhooks for execution and MCP for insights.


Getting Started

Prerequisites

  1. Alphabots Account — Sign up at alphabots.in
  2. Broker Connection — Connect Fyers, ICICI, or other supported broker
  3. Webhook UUID — Get your unique webhook UUID from Alphabots portal
  4. MCP Token — Get from Alphabots portal (for MCP integration)

Webhook Integration

Webhook URL

Your webhook URL has this format:

https://algoexestaging.alphabots.in/api/v1/signal/webhook-handler/{YOUR_UUID}

Replace {YOUR_UUID} with your actual UUID from Alphabots portal.

Order Schema

All orders are sent as JSON with this structure:

{
  "order": [{
    "type": "ENTRY",
    "symbol": "NSE:NIFTY25APRFUT",
    "quantity": 1,
    "side": "B",
    "ordertype": "MARKET",
    "segment": "FUT",
    "product": "N"
  }]
}

Field Reference

Field Type Valid Values Required Description
type string ENTRY, EXIT Yes Order type
symbol string NSE:SYMBOL-EQ, etc. Yes Trading symbol with exchange prefix
quantity number Any positive integer Yes Number of shares or lots
side string B, S Yes Buy or Sell
ordertype string MARKET, LIMIT, STOP, STOPLIMIT Yes Execution type
segment string EQ, FUT, OPT ENTRY only Equity, Future, Options
product string I, D, N ENTRY only Intraday, Delivery, Normal
limit_price number Any positive number LIMIT, STOPLIMIT Price for limit orders
stop_price number Any positive number STOP, STOPLIMIT Stop loss price

Symbol Formats

Equity Stocks

NSE:SBIN-EQ
NSE:RELIANCE-EQ
BSE:TCS-EQ

Index Futures (YYMM format for expiry)

NSE:NIFTY25APRFUT    # Nifty April 2025
NSE:BANKNIFTY25APRFUT # BankNifty April 2025

Options (Symbol + YYMM + Strike + CE/PE)

NSE:NIFTY25APR24200CE   # Nifty 24200 Call
NSE:NIFTY25APR24200PE   # Nifty 24200 Put

Example Requests

Market Entry (Buy Nifty Future)

curl -X POST https://algoexestaging.alphabots.in/api/v1/signal/webhook-handler/YOUR_UUID \
  -H "Content-Type: application/json" \
  -d '{
    "order": [{
      "type": "ENTRY",
      "symbol": "NSE:NIFTY25APRFUT",
      "quantity": 1,
      "side": "B",
      "ordertype": "MARKET",
      "segment": "FUT",
      "product": "N"
    }]
  }'

MCP Server Integration

What is MCP?

MCP (Model Context Protocol) is a standard for AI agents to access external tools and data. The Alphabots MCP server provides:

  • Portfolio summaries and P&L data
  • Broker-specific insights
  • Holdings details
  • Options analysis with Greeks
  • Weekly expiry tracking
  • Real-time market data (Yahoo Finance)

Installation

# Install globally via npm
npm install -g alphabots-mcp-server@1.0.12

# Or run directly with npx (no install needed)
npx alphabots-mcp-server@1.0.12

Configuration

Claude Desktop (macOS)

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "alphabots": {
      "command": "npx",
      "args": ["alphabots-mcp-server@1.0.12"],
      "env": {
        "mcp_token": "YOUR_MCP_TOKEN_HERE"
      }
    }
  }
}

Available MCP Tools

Tool Description Use Case
get_portfolio_summary Complete portfolio overview with P&L Daily checks, performance review
get_broker_insights Broker-specific analytics and stats Broker comparison, execution quality
get_holdings List all current holdings with details Position review, rebalancing
analyze_options CE/PE options analysis with Greeks Options strategy optimization
get_advanced_analysis Deep portfolio metrics and trends Portfolio health, risk analysis
get_weekly_expiry_options Weekly options positions and exposure Weekly expiry planning

Integration Examples

Python Trading Bot

import requests

class AlphabotsTrader:
    def __init__(self, webhook_uuid):
        self.webhook_url = f"https://algoexestaging.alphabots.in/api/v1/signal/webhook-handler/{webhook_uuid}"

    def place_entry(self, symbol, quantity, side, ordertype="MARKET", segment="EQ", product="N"):
        """Place an entry order"""
        order = {
            "order": [{
                "type": "ENTRY",
                "symbol": symbol,
                "quantity": quantity,
                "side": side,
                "ordertype": ordertype,
                "segment": segment,
                "product": product
            }]
        }
        return requests.post(self.webhook_url, json=order)

# Usage
trader = AlphabotsTrader("YOUR_UUID")
result = trader.place_entry(
    symbol="NSE:NIFTY25APRFUT",
    quantity=1,
    side="B",
    ordertype="MARKET",
    segment="FUT",
    product="I"
)

Node.js Integration

const fetch = require('node-fetch');

const url = 'https://algoexestaging.alphabots.in/api/v1/signal/webhook-handler/YOUR_UUID';
const order = {
  order: [{
    type: 'ENTRY',
    symbol: 'NSE:NIFTY25APRFUT',
    quantity: 1,
    side: 'B',
    ordertype: 'MARKET',
    segment: 'FUT',
    product: 'I'
  }]
};

fetch(url, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify(order)
}).then(r => r.json()).then(console.log);

Best Practices

Order Validation

Always validate orders before sending:

def validate_order(order):
    required = ['type', 'symbol', 'quantity', 'side', 'ordertype']
    for field in required:
        if field not in order:
            return False, f"Missing field: {field}"

    if not order['symbol'].startswith(('NSE:', 'BSE:')):
        return False, "Symbol must have NSE: or BSE: prefix"

    if order['quantity'] <= 0:
        return False, "Quantity must be positive"

    return True, "Valid"

Error Handling

def safe_place_order(order, max_retries=3):
    for attempt in range(max_retries):
        try:
            response = requests.post(webhook_url, json=order, timeout=10)
            if response.status_code == 200:
                return True, response.json()
            elif response.status_code == 429:
                time.sleep(5 * (attempt + 1))  # Backoff
        except requests.RequestException as e:
            if attempt < max_retries - 1:
                time.sleep(5)
    return False, "Max retries exceeded"

Troubleshooting

Common Issues

"Invalid Symbol" Error

Ensure symbol format: NSE: or BSE: prefix, -EQ suffix for equity

"Webhook UUID Not Found"

Re-copy UUID from Alphabots portal, verify webhook is enabled

"Broker Not Connected"

Connect broker in Alphabots portal, verify credentials


Quick Reference

Webhook URL

https://algoexestaging.alphabots.in/api/v1/signal/webhook-handler/{UUID}

Order Types

  • ENTRY — Open new position
  • EXIT — Close existing position

Product Codes

  • I — Intraday
  • D — Delivery
  • N — Normal

Order Types

  • MARKET — Execute immediately
  • LIMIT — At specific price
  • STOP — Trigger at stop price

Segment Codes

  • EQ — Equity
  • FUT — Futures
  • OPT — Options

Support


Full documentation available in SKILLS.md file on the public repo

youtubeInstagramtelegramLinkedin
BACK TO TOP ^