@hoox-sh/pynets 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.0] - 2026-11-04
11
+
12
+ Realtime stream session API and forming-bar semantics.
13
+
14
+ ### Added
15
+ - `RuntimeStream.updateLastBar(bar)` — re-tick the forming last bar without advancing `barCount`; `once`, TA state, and broker fills recompute from the revised history.
16
+ - `RuntimeStream.appendBars(bars)` and `RuntimeStream.barCount`.
17
+ - `RuntimeOptions.realtimeLastBar` / `Runtime.run(..., { realtimeLastBar: true })` — last bar sees `barstate.isrealtime=1`, `ishistory=0`, `islastconfirmedhistory=0`.
18
+ - `RuntimeStream.push` uses realtime last-bar semantics; `close()` confirms the last bar.
19
+
20
+ ### Changed
21
+ - `barstate.ishistory` is `1` on historical bars (including the last), matching PYNE; the realtime forming bar is `0`.
22
+ - `once` commits its fired flag only on a confirmed bar, ready for multi-tick rollback.
23
+
24
+ ### Fixed
25
+ - README stream example used the non-existent `stream.end()`; it now uses `close()`.
26
+
10
27
  ## [0.8.0] - 2026-11-04
11
28
 
12
29
  Full builtin surface: every name registered by PYNE's `BuiltinEvaluator`
package/README.md CHANGED
@@ -178,9 +178,17 @@ const stream = rt.stream(source);
178
178
  stream.on("bar", (out) => { /* one result per push */ });
179
179
  stream.push({ close: 1 });
180
180
  stream.push({ close: 2 });
181
- stream.end();
181
+
182
+ // Re-tick the forming last bar (does not advance barCount):
183
+ // barstate.isrealtime is 1, ishistory 0; once/TA/broker state recomputes.
184
+ stream.updateLastBar({ open: 2, high: 3, low: 1, close: 2.5 });
185
+ stream.appendBars([{ close: 3 }, { close: 4 }]);
186
+ stream.close(); // confirm the last bar (realtimeLastBar: false)
182
187
  ```
183
188
 
189
+ `Runtime.run(src, bars, { realtimeLastBar: true })` exposes the same flag for a
190
+ single call.
191
+
184
192
  ### Bars you actually have
185
193
 
186
194
  Hosts feed OHLCV. PyneTS will not invent a foreign market.