[Compose recipes]

Lawful source × stream × engine × storage combinations: offline, desk, multi-venue, CSV, edge, and git library.

Compose recipes

AXIS treats composition as the product. This page lists recipes—complete four-tuples with intent, constraints, and failure modes—not marketing tiers.

Abstract

Formal active set:

Active set = { source, stream, engine, storage }

Built-in ids (catalog may grow via URL plugins):

KindBuilt-ins
Sourcebinance-rest, mock-walk, csv-upload, (+ examples e.g. CoinGecko)
Streambinance-ws, mock-poll, none, (+ CF DO example)
Engineserver, pyodide
Storagelocal, cloud, git

Recipe matrix

RecipeSourceStreamEngineStorageNeeds netNeeds backend
Offline labmock-walkmock-pollpyodidelocalfirst boot onlyno
Desk researchbinance-restbinance-wsserver → FlasklocalyesFlask
Multi-venue deskbinance-rest + URL sourcesbinance-ws / noneserverlocalyesFlask
CSV deskcsv-uploadnone / mock-pollserver or pyodidelocalno*optional
AXIS at the edgevenue RESTvenue WS / DOserver → WorkercloudyesWorker (+ optional Flask proxy)
Repo libraryanyanyanygityes (save/list)git host API

*CSV needs local file; engine may still call network if server.


Offline lab

Intent: airplane mode, demos, CI-less teaching, pure AXIS UX.

AxisIdWhy
Sourcemock-walkSynthetic OHLCV in-process
Streammock-pollSynthetic bar advance
EnginepyodideIn-browser pynescript via Pyodide
StoragelocalIndexedDB script library

Setup

  1. Install static or dev AXIS with public/pyodide + public/vendor present.
  2. Select the four-tuple in topbar / settings.
  3. Load → Run while online once (warm Pyodide).
  4. DevTools → Offline; re-run.

Invariants: no POST /run; no exchange traffic; drawings + library remain local.

Failure modes: missing wheels → HTML SPA fallback errors; cold start timeout on huge bar sets.


Desk research

Intent: real venue history + live klines + full PYNE server fidelity.

AxisIdWhy
Sourcebinance-restPublic REST klines
Streambinance-wsPublic WS kline stream
EngineserverFlask Pro API POST {endpoint}/run
StoragelocalFast offline library

Setup

make run                 # :5002
cd frontend && bun run dev

Settings → Backend URL http://localhost:5002 → Test. Symbol like BTCUSDT, interval 1h / 1d.

CORS: AXIS origin must be allowed by Flask ALLOWED_ORIGINS.

Failure modes: rate limits; symbol not on venue; CORS; engine timeout on long history (AXIS scales timeout with bar count).


Multi-venue / multi-source

Intent: compare feeds without forking the AXIS.

AxisPattern
SourceBuilt-in binance-rest or Manager → Install URL plugin (e.g. CoinGecko example) → Use
StreamMatch venue when available; else none for historical-only
EngineUsually server for parity
Storagelocal or git for shared research

Workflow

  1. Manager → Catalog → capability badges (offline / auth / network / proxy).
  2. Use sets active source.
  3. Load and Run as usual.

Dynamic plugins rehydrate from localStorage install list on boot (restoreInstalledPlugins).

Failure modes: plugin URL not CORS-readable; invalid export shape; built-ins cannot be unregistered without force flags.


CSV desk

Intent: proprietary or offline CSV/OHLCV files.

AxisId
Sourcecsv-upload
Streamnone (typical) or mock-poll for artificial advance
Enginepyodide (airgap) or server
Storagelocal

Workflow

  1. Source → CSV upload (file picker opens if no file yet).
  2. AXIS parses via parseOhlcvFile into upload store.
  3. Load injects bars; symbol field less critical for synthetic series.
  4. Run strategies against that tape.

Invariants: bars stay in memory/session upload store—not the long-lived app state blob (size).

Failure modes: bad headers/time units; empty parse; re-select same file requires clearing input (AXIS resets file input after pick).


AXIS at the edge

Intent: browser AXIS + Cloudflare Worker data plane (keys, usage, optional D1 scripts, DO fan-out).

AxisIdWhy
Sourcevenue REST (built-in or proxy-aware)History
Streamvenue WS or DO-backed example streamSingle upstream → N clients
Engineserver endpoint = WorkerWorker proxies /api/run → Flask or future in-worker runtime
Storagecloud/api/scripts + Bearer Pro key

Setup

  1. wrangler dev / deploy Worker project pynescript-superchart (frozen name).
  2. Endpoint → Worker origin.
  3. Storage cloud → API key from admin /api/keys.
  4. Script Library uses cloud list/read/write; If-Match on concurrent writes.

Invariants: CF project id is infrastructure, not brand; health JSON may say pynescript-axis-worker.

Failure modes: missing Bearer key; D1 unbound → memory store (dev only); DO session query params wrong.


Git library

Intent: Pine sources as first-class repo files; Save = commit.

AxisId
Source / Stream / Engineany research tuple
Storagegit

Config (Manager → Script Library or pluginsConfig)

FieldNotes
providergithub | gitlab
tokencontents:write / api
owner, repoGitHub path; GitLab projectId optional
branchdefault main
basePathdefault pine-library
apiBaseUrlself-hosted forges

Invariants: drafts stay local; only explicit Save/remove hit the remote. Commit message template supports {{name}} / {{iso}}.

Failure modes: 401 token scope; wrong base path; GitLab path vs numeric id confusion.


Choosing a recipe

Internals

ConcernPath
Active selectionfrontend/src/store activePlugins
Built-in catalogssources/catalog.ts, streams/*, engines/catalog.ts, storage/catalog.ts
URL pluginsplugins/loader.ts
Compose UIui/Topbar.tsx, ui/PluginManager.tsx, ui/SettingsDialog.tsx

See also