Library vs host responsibilities
What ox-charts does for you, and what stays with your app.
| ox-charts does | Your app does |
|---|---|
| Draws charts, layers, drawings and order lines | Supplies bars (IDatafeed) and symbol metadata |
| Names symbols readably, prints each in its own decimals | Resolves each symbol's name, tick size, decimals and lot size (resolveSymbol) |
| Counts quantities in lots and sends units | Says what a lot is (SymbolInfo.lotSize) |
| Shows a pending order until the broker publishes it | Echoes clientOrderId on every order it publishes |
| Gates every order against limits and writes the audit log | Places, modifies and cancels at the broker (the adapter) |
| Runs OxScript in a Web Worker sandbox | Chooses where scripts are saved (scriptStore) |
Turns option.leg into a contract request | Resolves the contract (resolveOptionContract) |
| Pauses strategies on gaps, rejects and sleep | Calls pauseAll on its own disconnects |
Keeps state in the shell and storage | Persists it where it wants (storage prop) |
| Declares alerts from scripts | Delivers them (push, SMS, sound) |
No hidden broker calls
Scripts never reach a broker from the worker. Their orders are data (intents) that cross to the trading controller in your page, so everything a strategy does passes your adapter, the gate and the audit log.
Host integration
Embedding ox-charts in your app: symbol search and instrument specs, the trading adapter (including brokers that return no order id), ChartShell props, the trading dock, host theme, storage, and installing the package or linking its source.
Architecture
How ox-charts is built: the canvas engine, the React shell, one bar from the wire to the pixel, layers, trading and OxScript.