Track Maintenance and Downtime for API Trading with System Status WebSocket

Modified on Fri, 19 Dec at 4:05 PM

If you're running automated trading strategies on Delta Exchange, you know the pain: your bot keeps firing orders during scheduled maintenance, your fills fail, and by the time you realise what's happening, you've already missed critical opportunities.

Maintenance banners on our website are not of much help, as you're not sitting there watching the UI. You're monitoring logs, tracking positions, and managing risk programmatically. You need a better way to stay informed.

That's why we've built the system_status WebSocket channel.


What's Changing?

First, the important news: the announcements channel will be deprecated on February 28, 2026. If you're currently using it to track maintenance events, you'll need to migrate to system_status before then.

The new channel gives you everything the old one did—and more. You'll get real-time updates about:

  • Scheduled maintenance (typically 6-24 hours' advance notice)

  • Maintenance start and finish (actual timestamps, not just estimates)

  • System degradation and fallback modes

  • Maintenance cancellations


Why This Matters for API Traders

Knowing when the exchange will be unavailable is critical.

With system_status, you can:

  • Gracefully shut down your trading bots before maintenance begins

  • Avoid failed API calls and unnecessary error handling

  • Resume trading immediately when systems come back online

  • Monitor system health beyond just maintenance windows


How to Use It

Subscribing is straightforward. This is a public channel—no authentication required, no symbols needed. Full documentation is available here.

Subscribe to System Status

{
    "type": "subscribe",
    "payload": {
        "channels": [
            {
                "name": "system_status"
            }
        ]
    }
}

Once subscribed, you'll immediately receive a snapshot of the current system status. After that, you'll get real-time updates as things change.


Understanding the Events

The channel sends different event types depending on what's happening:

As soon as you subscribe, you'll receive a snapshot (initial state) of the current system status:

This gives you the current state immediately, so your systems know whether it's safe to start trading.


1. Maintenance Scheduled

You'll typically get 6-24 hours' notice before maintenance begins:

{

    "type": "system_status",

    "status": "live",

    "event": "maintenance_scheduled",

    "maintenance_start_time": 1765259125000000,

    "maintenance_announcement_time": 1764548092000000,

    "maintenance_finish_time": 1765259428000000,

    "timestamp": 1765239292000000

}

Important: The maintenance_start_time and maintenance_finish_time are approximate estimates. The actual maintenance start is confirmed by the maintenance_started event, and the actual completion is confirmed by the maintenance_finished event.

What to do: Start preparing your systems. You might want to flatten positions, cancel open orders, or adjust risk parameters.

2. Maintenance Started

When maintenance actually begins:

{

    "type": "system_status",

    "status": "maintenance",

    "event": "maintenance_started",

    "maintenance_start_time": 1765259301000000,

    "maintenance_announcement_time": 1764720892000000,

    "maintenance_finish_time": 1765259450000000,

    "timestamp": 1765259716000000

}

Note that the status field changes to "maintenance". Your trading systems should be paused at this point. This event confirms the actual start of maintenance—the previously announced maintenance_start_time was just an estimate.

Important: For emergency maintenance, you might get maintenance_started without a prior maintenance_scheduled event. Always handle this case.


3. Maintenance Finished

When systems are back:

{

    "type": "system_status",

    "status": "live",

    "event": "maintenance_finished",

    "maintenance_start_time": 1765259338000000,

    "maintenance_announcement_time": 1764634492000000,

    "maintenance_finish_time": 1765259575000000,

    "timestamp": 1765259744000000

}

This event confirms the actual completion of maintenance—the previously announced maintenance_finish_time was just an estimate. After maintenance, there's typically a 5-10 minute auction period before normal trading resumes. Plan for this in your reconnection logic.


4. Maintenance Cancelled

Sometimes plans change:

{

    "type": "system_status",

    "status": "api-fallback",

    "event": "maintenance_cancelled",

    "maintenance_start_time": 1765259325000000,

    "maintenance_announcement_time": 1764807292000000,

    "maintenance_finish_time": 1765259526000000,

    "timestamp": 1765259727000000

}

If scheduled maintenance gets cancelled, you'll receive this event so you can abort any prepared shutdowns. Note that the status field shows the current system state (in this case "api_fallback"), while the event field indicates that maintenance was cancelled.


5. System Status Updates

Beyond maintenance, you'll also get app_status_update events when the system status changes between operational states:

  • "live" — Everything's working normally

  • "maintenance" — Systems are down for maintenance

  • "api_fallback" — Minor issues, but core functions available (treat as live, check with support if concerned)

  • "degraded_mode" — Similar to fallback—most features work, but performance may be affected

See the full status definitions in our documentation.


Implementation Tips

Here's a simple pattern you can follow:

def handle_system_status(message):

    event = message.get('event')

    status = message.get('status')

    

    if event == 'maintenance_scheduled':

        # Log warning, prepare for shutdown

        schedule_graceful_shutdown(message['maintenance_start_time'])

        

    elif event == 'maintenance_started':

        # Stop all trading immediately

        emergency_shutdown()

        

    elif event == 'maintenance_cancelled':

        # Cancel any scheduled shutdowns

        cancel_scheduled_shutdown()

        

    elif event == 'app_status_update':

        # Update monitoring dashboard

        log_system_status(status)

Pro tip: All timestamps are in microseconds (not milliseconds). Make sure your parsing handles this correctly.


Migrating from announcements

If you're currently using the announcements channel, migration is simple. The event names and structure are similar, with a few key differences:

  1. Subscription type changes from "announcements" to "system_status"

  2. More granular status information via the status field

  3. Additional events like app_status_update and maintenance_cancelled

  4. Consistent timestamps, including maintenance_announcement_time

You have until February 28, 2026, to complete your migration, but there's no reason to wait. The new channel is live and ready to use.


Final Thoughts

Reliable infrastructure communication shouldn't be an afterthought. As an API trader, you need programmatic access to the same information that gets displayed on our website—and you need it in real-time.

The system_status WebSocket channel gives you exactly that. Subscribe today, update your monitoring systems, and never be caught off guard by maintenance again.

Questions? Reach out to our support team or check out the full API documentation for more details.

Happy trading! 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article