Custom Portfolio Rebalance Alerts | AlgorithmicFIRE

2 min read Original article ↗

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"
        }
      ]
    }
  ]
}