ta-crypto 0.1.5 → 0.3.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,157 +1,300 @@
1
- # ta-crypto
2
-
3
- [![npm version](https://img.shields.io/npm/v/ta-crypto.svg)](https://www.npmjs.com/package/ta-crypto)
4
- [![CI](https://github.com/TDamiao/ta-crypto/actions/workflows/ci.yml/badge.svg)](https://github.com/TDamiao/ta-crypto/actions/workflows/ci.yml)
5
-
6
- Technical analysis indicators for crypto markets in Node.js. Inspired by pandas-ta, but focused on crypto use-cases and Node-friendly APIs.
7
-
8
- ## Features
9
-
10
- - Typed, lightweight indicators for OHLCV arrays
11
- - Crypto-specific extras like session VWAP, funding rate helpers, volatility regimes, and orderflow proxies
12
- - Functions return arrays aligned to input length with `null` for insufficient data
13
-
14
- ## Install
15
-
16
- ```bash
17
- npm i ta-crypto
18
- ```
19
-
20
- ## Quick Start
21
-
22
- ```ts
23
- import {
24
- ta,
25
- sma,
26
- rsi,
27
- macd,
28
- bbands,
29
- atr,
30
- vwap,
31
- vwapSession,
32
- realizedVolatility,
33
- fundingRateCumulative,
34
- volatilityRegime,
35
- orderflowImbalance,
36
- obv,
37
- mfi,
38
- stoch,
39
- adx
40
- } from "ta-crypto";
41
-
42
- const close = [101, 102, 99, 105, 110, 108, 111];
43
- const open = [100, 101, 100, 103, 108, 109, 110];
44
- const high = [102, 103, 101, 106, 112, 110, 112];
45
- const low = [ 99, 100, 98, 102, 107, 106, 109];
46
- const volume =[ 10, 12, 11, 15, 17, 14, 18];
47
- const session=[ 1, 1, 1, 2, 2, 2, 3];
48
-
49
- const s = sma(close, 3);
50
- const r = rsi(close, 14);
51
- const m = macd(close);
52
- const b = bbands(close, 20, 2);
53
- const a = atr(high, low, close, 14);
54
- const v = vwap(high, low, close, volume);
55
- const vs = vwapSession(high, low, close, volume, session);
56
- const rv = realizedVolatility(close, 30, 365);
57
- const fr = fundingRateCumulative([0.0001, -0.0002, 0.00005]);
58
- const vr = volatilityRegime(close, 30, 365);
59
- const ofi = orderflowImbalance(open, close, volume, 20);
60
- const o = obv(close, volume);
61
- const moneyFlow = mfi(high, low, close, volume, 14);
62
- const st = stoch(high, low, close, 14, 3);
63
- const dx = adx(high, low, close, 14);
64
-
65
- const s2 = ta.sma(close, 3);
66
- ```
67
-
68
- ## API Conventions
69
-
70
- - Input arrays must be the same length.
71
- - Outputs are aligned to input length.
72
- - `null` marks periods with insufficient data.
73
-
74
- ## Indicators
75
-
76
- Overlap:
77
- - `sma`, `ema`, `rma`, `hl2`, `hlc3`, `ohlc4`, `vwap`, `bbands`
78
-
79
- Momentum:
80
- - `rsi`, `macd`, `stoch`
81
-
82
- Volatility:
83
- - `trueRange`, `atr`, `natr`, `realizedVolatility`
84
-
85
- Performance:
86
- - `logReturn`, `percentReturn`
87
-
88
- Volume:
89
- - `obv`, `mfi`
90
-
91
- Trend:
92
- - `adx`
93
-
94
- Crypto:
95
- - `vwapSession`, `fundingRateCumulative`, `fundingRateAPR`, `volatilityRegime`, `signedVolume`, `volumeDelta`, `orderflowImbalance`
96
-
97
- ## Crypto-Specific Notes
98
-
99
- Session VWAP:
100
- - Provide a `session` array with an id per candle. VWAP resets on each new session id.
101
-
102
- Funding rate:
103
- - `fundingRateCumulative` sums periodic rates over time.
104
- - `fundingRateAPR` annualizes a periodic rate using `periodsPerYear`.
105
-
106
- Volatility regimes:
107
- - `volatilityRegime` computes realized volatility and returns -1, 0, or 1 based on z-score thresholds.
108
-
109
- Orderflow proxies:
110
- - `signedVolume`, `volumeDelta`, and `orderflowImbalance` infer buy/sell pressure from candle direction.
111
-
112
- ## Release
113
-
114
- Automated npm publish runs on tag push. Steps:
115
-
116
- 1. Ensure `NPM_TOKEN` is set in GitHub Actions secrets.
117
- - For GitHub Packages, set `GITHUB_TOKEN` (already provided) or a PAT if needed.
118
- 2. Update changelog (recommended):
119
-
120
- ```bash
121
- npm run changelog
122
- ```
123
-
124
- 3. Bump version (optional):
125
-
126
- ```bash
127
- npm run version:patch
128
- ```
129
-
130
- 4. Run:
131
-
132
- ```bash
133
- npm run release
134
- ```
135
-
136
- Or do everything in one step:
137
-
138
- ```bash
139
- npm run release:patch
140
- ```
141
-
142
- GitHub Packages:
143
- - A separate workflow publishes `@TDamiao/ta-crypto` to GitHub Packages on the same tag.
144
-
145
- This creates and pushes a tag like `v0.1.1`, triggering the release workflow.
146
-
147
- ## License
148
-
149
- MIT
150
-
151
- ## GitHub Packages
152
-
153
- Install from GitHub Packages:
154
-
155
- ```bash
156
- npm i @TDamiao/ta-crypto
157
- ```
1
+ # ta-crypto
2
+
3
+ [![npm version](https://img.shields.io/npm/v/ta-crypto.svg)](https://www.npmjs.com/package/ta-crypto)
4
+ [![CI](https://github.com/TDamiao/ta-crypto/actions/workflows/ci.yml/badge.svg)](https://github.com/TDamiao/ta-crypto/actions/workflows/ci.yml)
5
+
6
+ Technical analysis indicators for crypto markets in Node.js.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm i ta-crypto
12
+ ```
13
+
14
+ ## Quick Start
15
+
16
+ ```ts
17
+ import { sma, rsi, macd, bbands, atr, vwapSession, toOHLCV } from "ta-crypto";
18
+
19
+ const candles = [
20
+ { open: 100, high: 102, low: 99, close: 101, volume: 10, time: 1 },
21
+ { open: 101, high: 103, low: 100, close: 102, volume: 12, time: 2 }
22
+ ];
23
+
24
+ const { high, low, close, volume } = toOHLCV(candles, 0);
25
+ const s = sma(close, 14);
26
+ const r = rsi(close, 14);
27
+ const m = macd(close);
28
+ const b = bbands(close, 20, 2);
29
+ const a = atr(high, low, close, 14);
30
+ const vs = vwapSession(high, low, close, volume, [1, 1]);
31
+ ```
32
+
33
+ ## Stateful API (streaming)
34
+
35
+ ```ts
36
+ import { createSMA, createEMA, createRSI, createVWAPSession } from "ta-crypto";
37
+
38
+ const sma14 = createSMA(14);
39
+ const ema14 = createEMA(14);
40
+ const rsi14 = createRSI(14);
41
+ const nextSma = sma14.next(101.25);
42
+ const nextEma = ema14.next(101.25);
43
+ const nextRsi = rsi14.next(101.25);
44
+
45
+ const vwap = createVWAPSession();
46
+ const nextVwap = vwap.next({
47
+ high: 102,
48
+ low: 99,
49
+ close: 101,
50
+ volume: 10,
51
+ sessionId: "2026-02-10-asia"
52
+ });
53
+ ```
54
+
55
+ Websocket-like streaming loop:
56
+
57
+ ```ts
58
+ import { createEMA, createRSI } from "ta-crypto";
59
+
60
+ const ema21 = createEMA(21);
61
+ const rsi14 = createRSI(14);
62
+
63
+ ws.on("message", (tick) => {
64
+ const price = Number(tick.last);
65
+ const e = ema21.next(price);
66
+ const r = rsi14.next(price);
67
+ if (e !== null && r !== null) {
68
+ // strategy signal path
69
+ }
70
+ });
71
+ ```
72
+
73
+ ## Examples
74
+
75
+ Real-world entry points live in `examples/`:
76
+ - `examples/rsi-strategy.ts`
77
+ - `examples/vwap-session.ts`
78
+ - `examples/funding-arbitrage.ts`
79
+
80
+ If you're using ta-crypto in production or experiments, feel free to add your example here.
81
+
82
+ ## Compatibility
83
+
84
+ `ta-crypto` now ships golden tests (`test/fixtures/golden.json`) to lock behavior across releases.
85
+
86
+ Classic indicators:
87
+
88
+ | Indicator | Reference | Tolerance |
89
+ | --- | --- | --- |
90
+ | SMA, EMA, RSI | Golden baseline | 1e-10 |
91
+ | MACD, BBANDS | Golden baseline | 1e-10 |
92
+ | ATR, ADX | Golden baseline | 1e-10 |
93
+
94
+ Crypto indicators:
95
+
96
+ | Indicator | Reference | Tolerance |
97
+ | --- | --- | --- |
98
+ | VWAP Session | Golden baseline | 1e-10 |
99
+ | Stateful VWAP Session parity | Batch VWAP Session | 1e-10 |
100
+
101
+ Streaming parity:
102
+
103
+ | Indicator | Reference | Tolerance |
104
+ | --- | --- | --- |
105
+ | Stateful RSI(14) | Batch RSI(14) | 1e-10 |
106
+
107
+ External parity:
108
+
109
+ Policy source: `scripts/compat-policy.json`
110
+
111
+ | Indicator | Burn-in | Tolerance | Blocking refs | Non-blocking refs |
112
+ | --- | --- | --- | --- | --- |
113
+ | SMA(14) | 14 | 1e-10 | TA-Lib, technicalindicators | pandas-ta |
114
+ | EMA(14) | 14 | 1e-10 | TA-Lib, technicalindicators | pandas-ta |
115
+ | RSI(14) | 28 | 5e-2 | TA-Lib, technicalindicators | pandas-ta |
116
+ | MACD(12,26,9) | 80 | 2e-2 | TA-Lib, technicalindicators | pandas-ta |
117
+ | BBANDS(20,2) | 20 | 1e-10 | TA-Lib, technicalindicators | pandas-ta |
118
+ | ATR(14) | 56 | 1.5e-1 | TA-Lib, technicalindicators | pandas-ta |
119
+ | ADX/+DI/-DI(14) | 90 | 1.5 | TA-Lib, technicalindicators | pandas-ta |
120
+
121
+ Warmup and alignment rules:
122
+ - References are left-padded to full series length before comparison.
123
+ - Comparison starts at indicator-specific burn-in and uses only overlapping non-null points.
124
+ - `TA-Lib` and `technicalindicators` are release-blocking checks in CI.
125
+ - `pandas-ta` is telemetry-only (warns when divergent or unavailable by environment).
126
+
127
+ Generate/review vectors:
128
+
129
+ ```bash
130
+ npm run generate:golden
131
+ npm run test:golden
132
+ npm run generate:compat
133
+ npm run test:compat:technicalindicators
134
+ # python deps: pip install -r scripts/requirements-compat.txt
135
+ npm run test:compat:python
136
+ ```
137
+
138
+ Note:
139
+ - CI uses Linux + Python 3.12 for full TA-Lib/pandas-ta coverage.
140
+ - On Windows, `pandas-ta` may be unavailable depending on upstream wheels; the script reports explicit skip in that case.
141
+ - `TA-Lib` and `technicalindicators` are strict release gates; `pandas-ta` runs as compatibility telemetry and reports warnings when it diverges by environment.
142
+
143
+ ## Crypto Playbooks
144
+
145
+ Session VWAP reset:
146
+ - Provide one `sessionId` per candle.
147
+ - VWAP resets exactly when `sessionId` changes.
148
+ - Use exchange session boundaries (UTC day, funding window, or custom market session).
149
+
150
+ Funding APR:
151
+ - `fundingRateAPR(values, periodsPerYear)` annualizes periodic funding.
152
+ - `periodsPerYear` presets:
153
+ - `3/day` funding: `1095`
154
+ - `1/hour` funding: `8760`
155
+ - `1/8h` funding: `1095`
156
+
157
+ Volatility regime:
158
+ - `volatilityRegime(values, length, periodsPerYear, lowZ, highZ)` returns `-1`, `0`, `1`.
159
+ - Default thresholds: `lowZ = -0.5`, `highZ = 0.5`.
160
+ - Calibration approach: increase absolute thresholds for noisier low-timeframe pairs, reduce for smoother higher timeframes.
161
+
162
+ ## Indicators
163
+
164
+ Overlap:
165
+ - `sma`, `ema`, `rma`, `hl2`, `hlc3`, `ohlc4`, `vwap`, `bbands`
166
+
167
+ Momentum:
168
+ - `rsi`, `macd`, `stoch`
169
+
170
+ Volatility:
171
+ - `trueRange`, `atr`, `natr`, `realizedVolatility`
172
+
173
+ Performance:
174
+ - `logReturn`, `percentReturn`
175
+
176
+ Volume:
177
+ - `obv`, `mfi`
178
+
179
+ Trend:
180
+ - `adx`
181
+
182
+ Crypto:
183
+ - `vwapSession`, `fundingRateCumulative`, `fundingRateAPR`, `volatilityRegime`, `signedVolume`, `volumeDelta`, `orderflowImbalance`
184
+
185
+ ## Hero Features (crypto edge)
186
+
187
+ 1. Session-aware VWAP (`vwapSession`, `createVWAPSession`)
188
+ 2. Funding analytics (`fundingRateCumulative`, `fundingRateAPR`)
189
+ 3. Volatility regime labeling (`volatilityRegime`)
190
+ 4. Orderflow proxies (`signedVolume`, `volumeDelta`, `orderflowImbalance`)
191
+ 5. Streaming/stateful indicators for low-allocation pipelines
192
+
193
+ Limitations:
194
+ - Orderflow proxies infer pressure from candle direction and volume; they are not a replacement for L2/L3 order book data.
195
+ - Different libraries use different warmup conventions; comparisons use overlapping non-null windows.
196
+
197
+ ## Typing and Inputs
198
+
199
+ `ta-crypto` public APIs accept two input styles:
200
+ - Primitive arrays (`number[]`) for low-level control.
201
+ - Candle objects with long keys (`open/high/low/close/volume/time`) or aliases (`o/h/l/c/v/t`).
202
+
203
+ Single-series APIs (for example `sma`, `ema`, `rsi`, `macd`, `bbands`) accept:
204
+
205
+ ```ts
206
+ import { rsi } from "ta-crypto";
207
+
208
+ const close = [101, 102, 103, 104];
209
+ const candles = [{ o: 100, h: 102, l: 99, c: 101, v: 10, t: 1 }];
210
+
211
+ rsi(close, 14);
212
+ rsi(candles, 14); // uses candle close/c
213
+ ```
214
+
215
+ OHLC/OHLCV APIs (for example `vwap`, `stoch`, `atr`, `natr`, `mfi`, `adx`) accept:
216
+
217
+ ```ts
218
+ import { atr, vwap } from "ta-crypto";
219
+
220
+ atr([102, 103], [99, 100], [101, 102], 14);
221
+ atr([{ open: 100, high: 102, low: 99, close: 101, volume: 10 }], 14);
222
+
223
+ vwap([102, 103], [99, 100], [101, 102], [10, 12]);
224
+ vwap([{ o: 100, h: 102, l: 99, c: 101, v: 10 }]);
225
+ ```
226
+
227
+ Helpers:
228
+
229
+ ```ts
230
+ import { pluckClose, toOHLCV } from "ta-crypto";
231
+
232
+ const close = pluckClose(candles);
233
+ const ohlcv = toOHLCV(candles, 0);
234
+ const ohlcvFromArrays = toOHLCV({ o: [1, 2], h: [3, 4], l: [0, 1], c: [2, 3], v: [5, 6] });
235
+ ```
236
+
237
+ Validation:
238
+ - Multi-series APIs enforce equal lengths.
239
+ - Numeric inputs are validated as finite numbers with index-aware messages when possible.
240
+
241
+ ## Module Imports
242
+
243
+ ```ts
244
+ import { sma } from "ta-crypto/indicators";
245
+ import { vwapSession } from "ta-crypto/crypto";
246
+ import { toOHLCV } from "ta-crypto/candles";
247
+ import { createSMA, createEMA, createRSI } from "ta-crypto/stateful";
248
+ ```
249
+
250
+ ## Bench (internal baseline, 10k candles)
251
+
252
+ ```text
253
+ sma(14): 0.619 ms/run
254
+ ema(14): 0.549 ms/run
255
+ rsi(14): 0.647 ms/run
256
+ macd: 2.887 ms/run
257
+ bbands: 2.159 ms/run
258
+ atr(14): 1.356 ms/run
259
+ adx(14): 5.371 ms/run
260
+ ```
261
+
262
+ Run locally:
263
+
264
+ ```bash
265
+ npm run bench
266
+ ```
267
+
268
+ ## Contributing
269
+
270
+ ta-crypto is open to contributors.
271
+ If you use it, improve it.
272
+ If you miss something, build it.
273
+ If you're learning, this is a great codebase to practice financial math.
274
+
275
+ Start with `CONTRIBUTING.md` and `ROADMAP.md`.
276
+ If you want to contribute but don't know where to start, pick an indicator from the roadmap and add tests comparing with TA-Lib.
277
+
278
+ ## Release
279
+
280
+ Publications are gated by GitHub Actions:
281
+ - `CI` runs build/tests + compatibility checks.
282
+ - `Release` workflows run tests/compat again before publish.
283
+
284
+ Recommended with GitHub CLI:
285
+
286
+ ```bash
287
+ gh auth login
288
+ gh workflow run ci.yml
289
+ gh run list --workflow ci.yml --limit 1
290
+ ```
291
+
292
+ ```bash
293
+ npm run changelog
294
+ npm run version:patch
295
+ npm run release
296
+ ```
297
+
298
+ ## License
299
+
300
+ MIT
package/dist/api.d.ts ADDED
@@ -0,0 +1,67 @@
1
+ import type { Candle, OHLCVInput, PriceInput } from "./types.js";
2
+ type OHLCInput = Candle[] | OHLCVInput;
3
+ export declare function sma(input: PriceInput, length?: number): Array<number | null>;
4
+ export declare function ema(input: PriceInput, length?: number): Array<number | null>;
5
+ export declare function rma(input: PriceInput, length?: number): Array<number | null>;
6
+ export declare function bbands(input: PriceInput, length?: number, std?: number): {
7
+ basis: (number | null)[];
8
+ upper: (number | null)[];
9
+ lower: (number | null)[];
10
+ };
11
+ export declare function macd(input: PriceInput, fast?: number, slow?: number, signal?: number): {
12
+ macd: (number | null)[];
13
+ signal: (number | null)[];
14
+ histogram: (number | null)[];
15
+ };
16
+ export declare function rsi(input: PriceInput, length?: number): Array<number | null>;
17
+ export declare function logReturn(input: PriceInput, cumulative?: boolean): Array<number | null>;
18
+ export declare function percentReturn(input: PriceInput, cumulative?: boolean): Array<number | null>;
19
+ export declare function realizedVolatility(input: PriceInput, length?: number, periodsPerYear?: number): Array<number | null>;
20
+ export declare function hl2(high: number[], low: number[]): Array<number | null>;
21
+ export declare function hl2(input: OHLCInput): Array<number | null>;
22
+ export declare function hlc3(high: number[], low: number[], close: number[]): Array<number | null>;
23
+ export declare function hlc3(input: OHLCInput): Array<number | null>;
24
+ export declare function ohlc4(open: number[], high: number[], low: number[], close: number[]): Array<number | null>;
25
+ export declare function ohlc4(input: OHLCInput): Array<number | null>;
26
+ export declare function vwap(high: number[], low: number[], close: number[], volume: number[], length?: number): Array<number | null>;
27
+ export declare function vwap(input: OHLCInput, length?: number): Array<number | null>;
28
+ export declare function stoch(high: number[], low: number[], close: number[], kLength?: number, dLength?: number): {
29
+ k: Array<number | null>;
30
+ d: Array<number | null>;
31
+ };
32
+ export declare function stoch(input: OHLCInput, kLength?: number, dLength?: number): {
33
+ k: Array<number | null>;
34
+ d: Array<number | null>;
35
+ };
36
+ export declare function trueRange(high: number[], low: number[], close: number[]): Array<number | null>;
37
+ export declare function trueRange(input: OHLCInput): Array<number | null>;
38
+ export declare function atr(high: number[], low: number[], close: number[], length?: number): Array<number | null>;
39
+ export declare function atr(input: OHLCInput, length?: number): Array<number | null>;
40
+ export declare function natr(high: number[], low: number[], close: number[], length?: number): Array<number | null>;
41
+ export declare function natr(input: OHLCInput, length?: number): Array<number | null>;
42
+ export declare function obv(close: number[], volume: number[]): Array<number | null>;
43
+ export declare function obv(input: OHLCInput): Array<number | null>;
44
+ export declare function mfi(high: number[], low: number[], close: number[], volume: number[], length?: number): Array<number | null>;
45
+ export declare function mfi(input: OHLCInput, length?: number): Array<number | null>;
46
+ export declare function adx(high: number[], low: number[], close: number[], length?: number): {
47
+ adx: Array<number | null>;
48
+ plusDI: Array<number | null>;
49
+ minusDI: Array<number | null>;
50
+ };
51
+ export declare function adx(input: OHLCInput, length?: number): {
52
+ adx: Array<number | null>;
53
+ plusDI: Array<number | null>;
54
+ minusDI: Array<number | null>;
55
+ };
56
+ export declare function vwapSession(high: number[], low: number[], close: number[], volume: number[], session: Array<string | number>): Array<number | null>;
57
+ export declare function vwapSession(input: OHLCInput, session: Array<string | number>): Array<number | null>;
58
+ export declare function signedVolume(open: number[], close: number[], volume: number[]): Array<number | null>;
59
+ export declare function signedVolume(input: OHLCInput): Array<number | null>;
60
+ export declare function volumeDelta(open: number[], close: number[], volume: number[], length?: number): Array<number | null>;
61
+ export declare function volumeDelta(input: OHLCInput, length?: number): Array<number | null>;
62
+ export declare function orderflowImbalance(open: number[], close: number[], volume: number[], length?: number): Array<number | null>;
63
+ export declare function orderflowImbalance(input: OHLCInput, length?: number): Array<number | null>;
64
+ export declare function fundingRateCumulative(values: number[]): Array<number | null>;
65
+ export declare function fundingRateAPR(values: number[], periodsPerYear?: number): Array<number | null>;
66
+ export declare function volatilityRegime(input: PriceInput, length?: number, periodsPerYear?: number, lowZ?: number, highZ?: number): Array<number | null>;
67
+ export {};