Spaces:
Paused
title: Maythos Live
emoji: 📈
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
MAYTHOS Live Docker Space
This Space wraps the uploaded maythos_patched.py file without changing its engine meaning or public contract.
What is included
maythos_patched.py: the uploaded engine file, kept unchangedruntime.py: live data adapter, candle aggregator, signal timeline, expiry tracker, and engine runnerapp.py: FastAPI server and health/API endpointsfrontend/: live UI for charts, raw output, debug trace, health, and source viewingDockerfileandrequirements.txt
How the wiring works
The runtime loads maythos_patched.py dynamically, instantiates MAYTHOS(debug_mode=True), and feeds it only closed 30-second candles built locally from the Deriv tick stream. The same tick stream also powers the 1m, 2m, 3m, and 5m chart views so the display stays internally consistent.
The UI shows:
- live candle chart
- live price stream
- full
MAYTHOS.tick()output - nested
debug_trace - engine health and validation errors
- warm-up state
- compact log viewer
- source-code viewer with line numbers, search, and copy
Signal timing model
The engine itself does not emit absolute timestamps for signal creation or expiry. The wrapper keeps those as derived UI fields using the candle close time as the canonical UTC reference:
signal_generated_atsignal_expires_atsignal_countdownsignal_agelifecycle_state
These are derived from the actual lifecycle output and the same 30-second candle clock that drives the engine feed.
Live candle aggregation
The Deriv public tick stream is bucketed locally into:
- 30s
- 1m
- 2m
- 3m
- 5m
Every timeframe uses the same tick source and the same UTC epoch boundaries, so the candles do not drift relative to each other. The engine is fed from the 30s candle close stream.
Deriv configuration
Optional environment variables:
DERIV_WS_URL: override the websocket URLDERIV_APP_ID: optional app_id query parameter, if you want to use oneSYMBOL_DEFAULT: default symbol such asfrxEURUSDorcryBTCUSDBASE_TIMEFRAME: engine feed timeframe in seconds; default30
If live data is unavailable, the runtime falls back to a visible demo mode and clearly marks it in the UI.
Setup for Hugging Face Spaces
- Create a new Docker Space.
- Add these project files to the repo.
- Keep the uploaded
maythos_patched.pyat the repo root unchanged. - Optionally set the environment variables above in Space settings.
- Deploy.
Notes from analysis
The file already exposes validate() and engine_health() through the MAYTHOS orchestrator. The output contract includes the usual signal and scoring fields plus debug_trace, but it does not include absolute timestamp fields for signal generation or expiry, so the wrapper derives those in the UI layer rather than altering engine output.
Health endpoint
GET /health returns OK when the runtime is healthy. GET /api/health returns structured diagnostics.