wickra-wasm 0.9.2 → 0.9.3
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/README.md +37 -26
- package/package.json +1 -1
- package/wickra_wasm.d.ts +576 -0
- package/wickra_wasm.js +1 -1
- package/wickra_wasm_bg.js +9980 -0
- package/wickra_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
[](https://docs.wickra.org)
|
|
21
21
|
[](https://docs.wickra.org/FAQ#do-all-the-language-bindings-compute-the-same-values)
|
|
22
22
|
|
|
23
|
-
**Streaming-first technical indicators. Install with `pip install wickra` — no system dependencies.**
|
|
23
|
+
**Streaming-first technical indicators. Install with `pip install wickra` — no system dependencies, zero third-party packages.**
|
|
24
24
|
|
|
25
25
|
Wickra is a multi-language technical-analysis library with a Rust core and
|
|
26
26
|
native bindings for Python, Node.js and WASM, plus a C ABI that C, C++,
|
|
@@ -29,13 +29,13 @@ state machine that updates in O(1) per new data point, so live trading bots and
|
|
|
29
29
|
historical backtests share the exact same implementation.
|
|
30
30
|
|
|
31
31
|
```python
|
|
32
|
-
import
|
|
33
|
-
import wickra as ta
|
|
32
|
+
import wickra as ta # zero third-party deps — not even NumPy
|
|
34
33
|
|
|
35
34
|
# Batch: classic TA-Lib-style usage
|
|
36
|
-
prices =
|
|
35
|
+
prices = [100.0 + i * 0.1 for i in range(1000)]
|
|
37
36
|
rsi = ta.RSI(14)
|
|
38
|
-
values = rsi.batch(prices) #
|
|
37
|
+
values = rsi.batch(prices) # array.array('d'), NaN during warmup
|
|
38
|
+
# np.asarray(values) wraps it zero-copy if you use NumPy
|
|
39
39
|
|
|
40
40
|
# Streaming: same indicator, fed tick by tick
|
|
41
41
|
rsi = ta.RSI(14)
|
|
@@ -104,8 +104,13 @@ times to get there.
|
|
|
104
104
|
- **Install in one line, anywhere.** `pip install wickra` / `npm install wickra` —
|
|
105
105
|
precompiled wheels and binaries, **no C toolchain, none of TA-Lib's setup pain**.
|
|
106
106
|
macOS · Linux · Windows.
|
|
107
|
-
- **Batteries included
|
|
108
|
-
|
|
107
|
+
- **Batteries included — zero third-party deps, in every language.** A full native
|
|
108
|
+
data layer ships in the box: a CSV candle reader, a tick-to-candle aggregator, a
|
|
109
|
+
timeframe resampler, a live Binance WebSocket feed and a historical Binance REST
|
|
110
|
+
fetcher — in **all 10 languages**. Loading a CSV, rolling ticks into candles,
|
|
111
|
+
resampling and streaming live data needs **no foreign package** — no pandas, no
|
|
112
|
+
`csv-parse`, no `ws`/`websockets`, no `jackson`, no `jsonlite`, not even NumPy.
|
|
113
|
+
`pip install wickra` / `npm install wickra` / `go get` / … pulls **nothing else**.
|
|
109
114
|
- **Truly permissive.** **MIT OR Apache-2.0** — drop it straight into commercial
|
|
110
115
|
and closed-source work.
|
|
111
116
|
|
|
@@ -148,21 +153,21 @@ Full tables (Rust + Python, streaming + batch) and how to reproduce them live in
|
|
|
148
153
|
|
|
149
154
|
Every binding calls the **same** Rust core, so this is **not** a speed claim — it
|
|
150
155
|
is the raw cost of crossing each language's FFI boundary (`SMA(20)`, 200 000 bars,
|
|
151
|
-
Ryzen 9 9950X, million updates/sec). **Batch
|
|
152
|
-
where the boundary shows** — so if you stream tick-by-tick, the table
|
|
153
|
-
which binding keeps up and which to avoid for hot loops.
|
|
156
|
+
Ryzen 9 9950X, million updates/sec). **Batch stays high for most bindings;
|
|
157
|
+
streaming is where the boundary shows** — so if you stream tick-by-tick, the table
|
|
158
|
+
tells you which binding keeps up and which to avoid for hot loops.
|
|
154
159
|
|
|
155
160
|
| Language | streaming (Mupd/s) | batch (Mupd/s) |
|
|
156
161
|
|-----------------|-------------------:|---------------:|
|
|
157
|
-
| Rust (no FFI) |
|
|
158
|
-
| C / C++ |
|
|
159
|
-
| C# |
|
|
160
|
-
| Python |
|
|
161
|
-
| Java |
|
|
162
|
-
| Go |
|
|
163
|
-
| WASM |
|
|
164
|
-
| Node.js |
|
|
165
|
-
| R | 0.1 |
|
|
162
|
+
| Rust (no FFI) | 380 | 498 |
|
|
163
|
+
| C / C++ | 365 | 358 |
|
|
164
|
+
| C# | 348 | 259 |
|
|
165
|
+
| Python | 31 | 46 |
|
|
166
|
+
| Java | 38 | 173 |
|
|
167
|
+
| Go | 23 | 394 |
|
|
168
|
+
| WASM | 21 | 169 |
|
|
169
|
+
| Node.js | 16 | 9 |
|
|
170
|
+
| R | 0.1 | 279 |
|
|
166
171
|
|
|
167
172
|
All ten share one verified implementation (see the verification badge above), so
|
|
168
173
|
the *numbers* differ but the *values* are bit-for-bit identical. Methodology and
|
|
@@ -281,12 +286,17 @@ chain.update(price);
|
|
|
281
286
|
|
|
282
287
|
## Live data sources
|
|
283
288
|
|
|
284
|
-
|
|
289
|
+
Wickra ships a complete, **native data layer** — exposed in **all 10 languages**,
|
|
290
|
+
pulling **zero third-party packages** (no pandas / `csv-parse` / `ws` / `jackson`
|
|
291
|
+
/ `jsonlite`). In Rust it lives in the `wickra-data` crate; every binding exposes
|
|
292
|
+
the same building blocks:
|
|
285
293
|
|
|
286
|
-
- A streaming OHLCV **CSV reader
|
|
287
|
-
- A **tick-to-candle aggregator** with arbitrary timeframes.
|
|
288
|
-
- A **candle resampler** for multi-timeframe analysis (1m → 5m → 1h on the fly).
|
|
289
|
-
- A **Binance Spot WebSocket** kline
|
|
294
|
+
- A streaming OHLCV **CSV reader** (`CandleReader`).
|
|
295
|
+
- A **tick-to-candle aggregator** with arbitrary timeframes (`TickAggregator`).
|
|
296
|
+
- A **candle resampler** for multi-timeframe analysis (1m → 5m → 1h on the fly, `Resampler`).
|
|
297
|
+
- A live **Binance Spot WebSocket** kline feed (`BinanceFeed`, feature `live-binance`).
|
|
298
|
+
- A historical **Binance REST** kline fetcher (`fetch_binance_klines`) — native
|
|
299
|
+
HTTP + JSON, no third-party client.
|
|
290
300
|
|
|
291
301
|
```rust
|
|
292
302
|
use wickra::{Indicator, Rsi};
|
|
@@ -303,8 +313,9 @@ while let Some(event) = stream.next_event().await? {
|
|
|
303
313
|
}
|
|
304
314
|
```
|
|
305
315
|
|
|
306
|
-
|
|
307
|
-
`
|
|
316
|
+
Native live-feed and historical-fetch examples — using `wickra.BinanceFeed` and
|
|
317
|
+
`wickra.fetch_binance_klines`, **with no third-party HTTP/WebSocket client** — live
|
|
318
|
+
under `examples/python/` (and the matching directory for every other language).
|
|
308
319
|
|
|
309
320
|
## Project layout
|
|
310
321
|
|
package/package.json
CHANGED