How SignalPipe Works
SignalPipe connects TradingView to Alpaca through a four-step execution pipeline. Every step is automated -- once configured, no manual intervention is required.
The Execution Flow
Step 1: Signal Detection
The vyn premium Pine Script strategy runs on your TradingView charts, monitoring price action across your selected stock tickers. When the strategy's technical analysis detects a buy or sell condition, it fires an alert.
Step 2: Webhook Delivery
TradingView sends an HTTP POST request to the Blockresearch SignalPipe endpoint. The webhook payload contains:
| Field | Description | Example |
|---|---|---|
ticker | The stock or crypto symbol | AAPL or BTCUSD |
action | Buy or sell | buy |
quantity | Number of shares or units | 10 |
pointer | Your unique authentication token | a7f3... |
prev_position | Previous position state | flat or long |
https://europe-west3-blockalgo-quant.cloudfunctions.net/alpacaWebhook
Step 3: Authentication and Processing
SignalPipe receives the alert and performs the following checks in order:
- Pointer authentication -- Looks up the user by their unique webhook pointer (stored as
signalPipeSecretin the database). If no matching user is found, the request is rejected. - Subscription check -- Verifies that the user has an active SignalPipe or vyn premium subscription. Without an active subscription, signals are logged but skipped.
- Account routing -- Determines which Alpaca account to use (paper or live) based on the user's default view mode or an explicit
accountfield in the payload. - Automation check -- Verifies that the target Alpaca account is connected and automation is enabled. If either is off, the signal is logged but skipped.
- Market hours check -- For live mode stock orders, verifies the US market is open (extended hours: Mon-Fri 4:00 AM - 8:00 PM ET). Crypto symbols trade 24/7 and bypass this check. Paper mode also bypasses this check.
- Quote currency conversion -- If configured, converts crypto ticker suffixes to match Alpaca's format (e.g. BTCUSDT to BTCUSD).
- Action routing -- Routes to the buy handler or sell handler based on the
actionfield.
Step 4: Order Execution on Alpaca
The appropriate handler places orders on your Alpaca account:
- Buy signals open new deals or add safety orders to existing positions
- Sell signals close positions and record realized P&L
All buy orders are placed as market orders for immediate execution. Take-profit orders are placed as limit sell orders.
Important: SignalPipe always returns HTTP 200 to TradingView, even when an error occurs internally. This prevents TradingView from retrying alerts, which could cause duplicate orders. All errors are logged to the activity log on your dashboard.