Custom Portfolio Alerts

Configure and integrate automated rebalancing alerts for your custom portfolio allocations.

How it Works

1. Register Key
2. Link Portfolio
3. Make / API

AlgorithmicFIRE performs daily market trend analysis after market close. You run a Make.com scenario or script to poll your consolidated status via your API key. The provided blueprint triggers email alerts directly, but Make.com can easily be configured to route notifications to SMS, Slack, Discord, or other services whenever allocations shift.

Make.com Integration Guide

Download Make.com Blueprint
  1. Import the Scenario: Go to Make.com, create a new scenario, click the three dots ... in the control panel, choose Import Blueprint, and upload the downloaded JSON file.
  2. Set Variables: Click the first block (Set Variables) and enter:
    • api_key: Your verified API Key
    • notification_email: The email address to receive alerts
  3. Authorize Connections: The blueprint features a Router that branches into two paths (daily update and delayed processing warning). Authorize your Gmail connection by doing the following:
    • Click one of the Gmail email modules and click Add to create a Connection.
    • Click the other Gmail email module and select that same newly created connection.
    • Click the disk/Save icon on the bottom control panel of the Make scenario editor to save the scenario.
    • Go to the Make.com left sidebar ➔ Connections, locate the Gmail connection you just added, and click Reauthorize (or click Credentials ➔ Reauthorize) to grant the necessary scopes.
  4. Configure Schedule & Activate: Click the scheduling icon on the first module or the bottom left control bar in Make:
    • Set the schedule to run Every weekday (Monday through Friday) at 7:00 PM Eastern Time (19:00 EST) or later. Do not schedule it earlier, as the daily market close analysis must finish processing first.
    • Toggle the Scheduling switch in the bottom-left corner to ON.
1 Request API Key

Enter your email address to receive or recover your unique API key. This key validates your subscription identity without requiring passwords.

2 Manage Alert Subscription

Associate a specific portfolio configuration string with your API Key to enable tracking status updates.

Paste the config string or any AlgorithmicFIRE portfolio URL — the config will be extracted automatically.
Name your portfolio to easily identify it in alert notifications. Must be unique per API Key.

Active Subscriptions

Enter your API key above and click "Retrieve List" to see active alerts subscriptions.

Reliability Guide: State-Matching vs. Event Polling

Many alerting systems rely on checking if a "rebalance event" occurred on the current date. However, in systematic quantitative trading setups, simple event-polling is fragile and can lead to missed adjustments. AlgorithmicFIRE uses a robust State-Matching architecture to guarantee your holdings stay perfectly aligned with the strategies.

Why Portfolio States Can Shift

  • Historical Data Restatements: Financial data providers frequently adjust historical prices retroactively due to dividends, stock splits, or corporate action corrections. These adjustments can cause historical trade signals to calculate differently.
  • Code & Strategy Updates: Fixing software bugs, tuning performance, or updating strategy parameters recalculates the entire historical simulation path.
  • Result: Your actual brokerage holdings may suddenly differ from the current target weights, even if no new rebalance signal was generated today.

The Stateless Solution

Our API handles state-matching internally on the server, keeping your integration completely stateless and easy to build:

  • has_changed (The Trigger): A boolean flag indicating if target weights have shifted since your API key last queried this endpoint. This is the only field you need to filter your alerts.
  • target_weights (Target Allocations): The current target weight (allocation) for each asset (any uninvested capital is automatically outputted under CASH).
  • allocations (Granular Tracking): Constituent strategy signals and details, useful for secondary verification or custom dashboard logging.

Developer API Access Reference

Query the live status endpoint programmatically to retrieve target allocations for all your subscribed portfolios consolidated in one single request:

curl -X GET "https://algorithmicfire.com/custom-portfolio/status?key=YOUR_KEY"

Response payload contains a consolidated list of your portfolios, rebalance change flags, and pre-formatted HTML email bodies.

JSON Response Fields

Field Description
email User email address linked to the API Key.
any_portfolio_changed Boolean flag indicating if any portfolio target weights shifted since the last query.
changed_portfolio_names Comma-separated friendly names of portfolios that changed.
email_body_html Pre-formatted HTML email summary table with rebalance updates. (Do NOT parse this - format and contents are subject to change)
is_trading_day_today Whether today is a US stock market trading day (computed in Eastern Time). Warning: Do not use this to gate scheduler executions. If you check this flag past midnight Eastern Time, or on a weekend or market holiday, it may flip to false (even if the calculations for the prior trading day are complete). To avoid missing updates, always gate scheduler executions with daily_update_complete_today instead.
daily_update_complete_today Whether today's post-market-close calculations have completed (typically around 4:30 PM EST). Always wait for this to be `true` before acting on signal changes.
portfolios List of portfolio status objects containing name, change flags, and allocations.

Sample JSON Response Payload

{
  "email": "user@example.com",
  "any_portfolio_changed": true,
  "changed_portfolio_names": "My Retirement Mix",
  "email_body_html": "<p>Consolidated email body summary table...</p>",
  "is_trading_day_today": true,
  "daily_update_complete_today": true,
  "portfolios": [
    {
      "portfolio_name": "My Retirement Mix",
      "portfolio_state_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "has_changed": true,
      "target_weights": {
        "SPY": 60.0,
        "QQQ": 20.0,
        "CASH": 20.0
      },
      "allocations": [
        {
          "ticker": "SPY",
          "strategy": "ER_MMA",
          "style": "investing",
          "weight": 60.0,
          "signal": 1.0,
          "signal_desc": "100% Invested"
        },
        {
          "ticker": "QQQ",
          "strategy": "ER_MMA",
          "style": "investing",
          "weight": 40.0,
          "signal": 0.5,
          "signal_desc": "50% Invested"
        }
      ]
    }
  ]
}

Minimal Python Integration Example

You can automate checking your portfolio status with a simple, zero-dependency Python script using the standard library:

import urllib.request
import json

api_key = "YOUR_KEY"
url = f"https://algorithmicfire.com/custom-portfolio/status?key={api_key}"

try:
    with urllib.request.urlopen(url) as response:
        if response.status == 200:
            data = json.loads(response.read().decode('utf-8'))
            if data.get("any_portfolio_changed"):
                print(f"Rebalance detected for: {data.get('changed_portfolio_names')}")
                # email_html_body = data.get("email_body_html")
            else:
                print("No rebalances detected.")
except Exception as e:
    print(f"Error querying API: {e}")