n8n-nodes-twelve-data 0.1.1
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.md +19 -0
- package/README.md +442 -0
- package/dist/credentials/TwelveDataApi.credentials.d.ts +13 -0
- package/dist/credentials/TwelveDataApi.credentials.js +72 -0
- package/dist/credentials/TwelveDataApi.credentials.js.map +1 -0
- package/dist/icons/github.dark.svg +3 -0
- package/dist/icons/github.svg +3 -0
- package/dist/icons/twelvedata.dark.svg +29 -0
- package/dist/icons/twelvedata.svg +18 -0
- package/dist/nodes/TwelveData/TwelveData.node.d.ts +4 -0
- package/dist/nodes/TwelveData/TwelveData.node.js +173 -0
- package/dist/nodes/TwelveData/TwelveData.node.js.map +1 -0
- package/dist/nodes/TwelveData/TwelveData.node.json +47 -0
- package/dist/nodes/TwelveData/operations/advanced.d.ts +6 -0
- package/dist/nodes/TwelveData/operations/advanced.js +168 -0
- package/dist/nodes/TwelveData/operations/advanced.js.map +1 -0
- package/dist/nodes/TwelveData/operations/coreData.d.ts +13 -0
- package/dist/nodes/TwelveData/operations/coreData.js +471 -0
- package/dist/nodes/TwelveData/operations/coreData.js.map +1 -0
- package/dist/nodes/TwelveData/operations/fundamentals.d.ts +9 -0
- package/dist/nodes/TwelveData/operations/fundamentals.js +440 -0
- package/dist/nodes/TwelveData/operations/fundamentals.js.map +1 -0
- package/dist/nodes/TwelveData/operations/index.d.ts +6 -0
- package/dist/nodes/TwelveData/operations/index.js +21 -0
- package/dist/nodes/TwelveData/operations/index.js.map +1 -0
- package/dist/nodes/TwelveData/operations/marketIntelligence.d.ts +5 -0
- package/dist/nodes/TwelveData/operations/marketIntelligence.js +156 -0
- package/dist/nodes/TwelveData/operations/marketIntelligence.js.map +1 -0
- package/dist/nodes/TwelveData/operations/referenceData.d.ts +9 -0
- package/dist/nodes/TwelveData/operations/referenceData.js +451 -0
- package/dist/nodes/TwelveData/operations/referenceData.js.map +1 -0
- package/dist/nodes/TwelveData/operations/technicalIndicators.d.ts +2 -0
- package/dist/nodes/TwelveData/operations/technicalIndicators.js +1110 -0
- package/dist/nodes/TwelveData/operations/technicalIndicators.js.map +1 -0
- package/dist/nodes/TwelveData/parameters/common.d.ts +11 -0
- package/dist/nodes/TwelveData/parameters/common.js +163 -0
- package/dist/nodes/TwelveData/parameters/common.js.map +1 -0
- package/dist/nodes/TwelveData/parameters/index.d.ts +2 -0
- package/dist/nodes/TwelveData/parameters/index.js +21 -0
- package/dist/nodes/TwelveData/parameters/index.js.map +1 -0
- package/dist/nodes/TwelveData/parameters/indicatorParams.d.ts +31 -0
- package/dist/nodes/TwelveData/parameters/indicatorParams.js +575 -0
- package/dist/nodes/TwelveData/parameters/indicatorParams.js.map +1 -0
- package/dist/nodes/TwelveData/utils/errorSanitizer.d.ts +2 -0
- package/dist/nodes/TwelveData/utils/errorSanitizer.js +33 -0
- package/dist/nodes/TwelveData/utils/errorSanitizer.js.map +1 -0
- package/dist/package.json +69 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allIndicatorParameters = exports.indicatorAdditionalOptions = exports.supertrendMultiplierParameter = exports.ichimokuLaggingSpanParameter = exports.ichimokuLeadingSpanParameter = exports.ichimokuBaseParameter = exports.ichimokuConversionParameter = exports.sarMaximumParameter = exports.sarAccelerationParameter = exports.uoTimePeriod3Parameter = exports.uoTimePeriod2Parameter = exports.uoTimePeriod1Parameter = exports.stochSlowDPeriodParameter = exports.stochSlowKPeriodParameter = exports.stochFastKPeriodParameter = exports.bbandsMaTypeParameter = exports.bbandsSdParameter = exports.signalPeriodParameter = exports.slowPeriodParameter = exports.fastPeriodParameter = exports.indicatorSeriesTypeParameter = exports.indicatorTimePeriodParameter = exports.indicatorIntervalParameter = exports.indicatorSymbolParameter = exports.indicatorsWithStochParams = exports.indicatorsWithBBandsParams = exports.indicatorsWithFastSlowPeriod = exports.indicatorsWithSeriesType = exports.indicatorsWithTimePeriod = exports.allIndicatorOperations = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
exports.allIndicatorOperations = [
|
|
6
|
+
'sma', 'ema', 'wma', 'dema', 'tema', 'trima', 'kama', 'mama', 't3',
|
|
7
|
+
'rsi', 'macd', 'stoch', 'stochrsi', 'adx', 'cci', 'mfi', 'roc', 'willr', 'mom',
|
|
8
|
+
'ppo', 'apo', 'cmo', 'dx', 'trix', 'ultosc',
|
|
9
|
+
'bbands', 'atr', 'natr', 'trange', 'supertrend',
|
|
10
|
+
'obv', 'ad', 'adosc', 'vwap',
|
|
11
|
+
'aroon', 'aroonosc', 'bop', 'sar', 'plus_di', 'minus_di', 'plus_dm', 'minus_dm',
|
|
12
|
+
'adxr', 'ht_trendmode',
|
|
13
|
+
'stddev', 'var', 'linearreg', 'linearreg_slope', 'linearreg_intercept',
|
|
14
|
+
'linearreg_angle', 'tsf', 'correl', 'beta',
|
|
15
|
+
'midpoint', 'midprice', 'ht_trendline', 'ht_sine', 'ht_dcperiod', 'ht_dcphase',
|
|
16
|
+
'ht_phasor', 'ichimoku', 'pivot_points_hl', 'percent_b', 'avgprice', 'medprice',
|
|
17
|
+
'typprice', 'wclprice',
|
|
18
|
+
'ceil', 'floor', 'round', 'exp', 'sqrt', 'ln', 'log10', 'sin', 'cos', 'tan',
|
|
19
|
+
'asin', 'acos', 'atan', 'sinh', 'cosh', 'tanh', 'add', 'sub', 'mult', 'div',
|
|
20
|
+
'max', 'min', 'sum', 'minmax', 'minmaxindex',
|
|
21
|
+
];
|
|
22
|
+
exports.indicatorsWithTimePeriod = [
|
|
23
|
+
'sma', 'ema', 'wma', 'dema', 'tema', 'trima', 'kama', 't3',
|
|
24
|
+
'rsi', 'adx', 'cci', 'mfi', 'roc', 'willr', 'mom', 'cmo', 'dx', 'trix', 'adxr',
|
|
25
|
+
'atr', 'natr',
|
|
26
|
+
'aroon', 'aroonosc', 'plus_di', 'minus_di', 'plus_dm', 'minus_dm',
|
|
27
|
+
'stddev', 'var', 'linearreg', 'linearreg_slope', 'linearreg_intercept',
|
|
28
|
+
'linearreg_angle', 'tsf', 'correl', 'beta',
|
|
29
|
+
'midpoint', 'percent_b', 'sum', 'minmax', 'minmaxindex',
|
|
30
|
+
];
|
|
31
|
+
exports.indicatorsWithSeriesType = [
|
|
32
|
+
'sma', 'ema', 'wma', 'dema', 'tema', 'trima', 'kama', 'mama', 't3',
|
|
33
|
+
'rsi', 'roc', 'mom', 'cmo', 'trix', 'ppo', 'apo',
|
|
34
|
+
'stddev', 'var', 'linearreg', 'linearreg_slope', 'linearreg_intercept',
|
|
35
|
+
'linearreg_angle', 'tsf',
|
|
36
|
+
'midpoint', 'ht_trendline', 'ht_sine', 'ht_dcperiod', 'ht_dcphase', 'ht_phasor',
|
|
37
|
+
'ceil', 'floor', 'round', 'exp', 'sqrt', 'ln', 'log10', 'sin', 'cos', 'tan',
|
|
38
|
+
'asin', 'acos', 'atan', 'sinh', 'cosh', 'tanh', 'sum', 'minmax', 'minmaxindex',
|
|
39
|
+
];
|
|
40
|
+
exports.indicatorsWithFastSlowPeriod = [
|
|
41
|
+
'macd', 'ppo', 'apo', 'adosc',
|
|
42
|
+
];
|
|
43
|
+
exports.indicatorsWithBBandsParams = ['bbands', 'percent_b'];
|
|
44
|
+
exports.indicatorsWithStochParams = ['stoch', 'stochrsi'];
|
|
45
|
+
exports.indicatorSymbolParameter = {
|
|
46
|
+
displayName: 'Symbol',
|
|
47
|
+
name: 'symbol',
|
|
48
|
+
type: 'string',
|
|
49
|
+
required: true,
|
|
50
|
+
default: '',
|
|
51
|
+
placeholder: 'e.g., AAPL, EUR/USD, BTC/USD',
|
|
52
|
+
description: 'The symbol to calculate the indicator for',
|
|
53
|
+
displayOptions: {
|
|
54
|
+
show: {
|
|
55
|
+
resource: ['technicalIndicators'],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
routing: {
|
|
59
|
+
send: {
|
|
60
|
+
type: 'query',
|
|
61
|
+
property: 'symbol',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
exports.indicatorIntervalParameter = {
|
|
66
|
+
displayName: 'Interval',
|
|
67
|
+
name: 'interval',
|
|
68
|
+
type: 'options',
|
|
69
|
+
required: true,
|
|
70
|
+
default: '1day',
|
|
71
|
+
description: 'Time interval between data points',
|
|
72
|
+
displayOptions: {
|
|
73
|
+
show: {
|
|
74
|
+
resource: ['technicalIndicators'],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
options: common_1.intervalOptions,
|
|
78
|
+
routing: {
|
|
79
|
+
send: {
|
|
80
|
+
type: 'query',
|
|
81
|
+
property: 'interval',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
exports.indicatorTimePeriodParameter = {
|
|
86
|
+
displayName: 'Time Period',
|
|
87
|
+
name: 'time_period',
|
|
88
|
+
type: 'number',
|
|
89
|
+
default: 14,
|
|
90
|
+
description: 'Number of periods for calculation (default varies by indicator)',
|
|
91
|
+
displayOptions: {
|
|
92
|
+
show: {
|
|
93
|
+
resource: ['technicalIndicators'],
|
|
94
|
+
operation: exports.indicatorsWithTimePeriod,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
routing: {
|
|
98
|
+
send: {
|
|
99
|
+
type: 'query',
|
|
100
|
+
property: 'time_period',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
exports.indicatorSeriesTypeParameter = {
|
|
105
|
+
displayName: 'Series Type',
|
|
106
|
+
name: 'series_type',
|
|
107
|
+
type: 'options',
|
|
108
|
+
default: 'close',
|
|
109
|
+
description: 'Price type to use for calculation',
|
|
110
|
+
displayOptions: {
|
|
111
|
+
show: {
|
|
112
|
+
resource: ['technicalIndicators'],
|
|
113
|
+
operation: exports.indicatorsWithSeriesType,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
options: common_1.seriesTypeOptions,
|
|
117
|
+
routing: {
|
|
118
|
+
send: {
|
|
119
|
+
type: 'query',
|
|
120
|
+
property: 'series_type',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
exports.fastPeriodParameter = {
|
|
125
|
+
displayName: 'Fast Period',
|
|
126
|
+
name: 'fast_period',
|
|
127
|
+
type: 'number',
|
|
128
|
+
default: 12,
|
|
129
|
+
description: 'Number of periods for the fast moving average',
|
|
130
|
+
displayOptions: {
|
|
131
|
+
show: {
|
|
132
|
+
resource: ['technicalIndicators'],
|
|
133
|
+
operation: exports.indicatorsWithFastSlowPeriod,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
routing: {
|
|
137
|
+
send: {
|
|
138
|
+
type: 'query',
|
|
139
|
+
property: 'fast_period',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
exports.slowPeriodParameter = {
|
|
144
|
+
displayName: 'Slow Period',
|
|
145
|
+
name: 'slow_period',
|
|
146
|
+
type: 'number',
|
|
147
|
+
default: 26,
|
|
148
|
+
description: 'Number of periods for the slow moving average',
|
|
149
|
+
displayOptions: {
|
|
150
|
+
show: {
|
|
151
|
+
resource: ['technicalIndicators'],
|
|
152
|
+
operation: exports.indicatorsWithFastSlowPeriod,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
routing: {
|
|
156
|
+
send: {
|
|
157
|
+
type: 'query',
|
|
158
|
+
property: 'slow_period',
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
exports.signalPeriodParameter = {
|
|
163
|
+
displayName: 'Signal Period',
|
|
164
|
+
name: 'signal_period',
|
|
165
|
+
type: 'number',
|
|
166
|
+
default: 9,
|
|
167
|
+
description: 'Number of periods for the signal line',
|
|
168
|
+
displayOptions: {
|
|
169
|
+
show: {
|
|
170
|
+
resource: ['technicalIndicators'],
|
|
171
|
+
operation: ['macd'],
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
routing: {
|
|
175
|
+
send: {
|
|
176
|
+
type: 'query',
|
|
177
|
+
property: 'signal_period',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
exports.bbandsSdParameter = {
|
|
182
|
+
displayName: 'Standard Deviation',
|
|
183
|
+
name: 'sd',
|
|
184
|
+
type: 'number',
|
|
185
|
+
default: 2,
|
|
186
|
+
description: 'Number of standard deviations for the bands',
|
|
187
|
+
displayOptions: {
|
|
188
|
+
show: {
|
|
189
|
+
resource: ['technicalIndicators'],
|
|
190
|
+
operation: exports.indicatorsWithBBandsParams,
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
routing: {
|
|
194
|
+
send: {
|
|
195
|
+
type: 'query',
|
|
196
|
+
property: 'sd',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
exports.bbandsMaTypeParameter = {
|
|
201
|
+
displayName: 'MA Type',
|
|
202
|
+
name: 'ma_type',
|
|
203
|
+
type: 'options',
|
|
204
|
+
default: '0',
|
|
205
|
+
description: 'Type of moving average to use',
|
|
206
|
+
displayOptions: {
|
|
207
|
+
show: {
|
|
208
|
+
resource: ['technicalIndicators'],
|
|
209
|
+
operation: exports.indicatorsWithBBandsParams,
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
options: common_1.maTypeOptions,
|
|
213
|
+
routing: {
|
|
214
|
+
send: {
|
|
215
|
+
type: 'query',
|
|
216
|
+
property: 'ma_type',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
exports.stochFastKPeriodParameter = {
|
|
221
|
+
displayName: 'Fast K Period',
|
|
222
|
+
name: 'fast_k_period',
|
|
223
|
+
type: 'number',
|
|
224
|
+
default: 14,
|
|
225
|
+
description: 'Time period for the %K line',
|
|
226
|
+
displayOptions: {
|
|
227
|
+
show: {
|
|
228
|
+
resource: ['technicalIndicators'],
|
|
229
|
+
operation: exports.indicatorsWithStochParams,
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
routing: {
|
|
233
|
+
send: {
|
|
234
|
+
type: 'query',
|
|
235
|
+
property: 'fast_k_period',
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
exports.stochSlowKPeriodParameter = {
|
|
240
|
+
displayName: 'Slow K Period',
|
|
241
|
+
name: 'slow_k_period',
|
|
242
|
+
type: 'number',
|
|
243
|
+
default: 3,
|
|
244
|
+
description: 'Smoothing period for the %K line',
|
|
245
|
+
displayOptions: {
|
|
246
|
+
show: {
|
|
247
|
+
resource: ['technicalIndicators'],
|
|
248
|
+
operation: exports.indicatorsWithStochParams,
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
routing: {
|
|
252
|
+
send: {
|
|
253
|
+
type: 'query',
|
|
254
|
+
property: 'slow_k_period',
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
exports.stochSlowDPeriodParameter = {
|
|
259
|
+
displayName: 'Slow D Period',
|
|
260
|
+
name: 'slow_d_period',
|
|
261
|
+
type: 'number',
|
|
262
|
+
default: 3,
|
|
263
|
+
description: 'Smoothing period for the %D line',
|
|
264
|
+
displayOptions: {
|
|
265
|
+
show: {
|
|
266
|
+
resource: ['technicalIndicators'],
|
|
267
|
+
operation: exports.indicatorsWithStochParams,
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
routing: {
|
|
271
|
+
send: {
|
|
272
|
+
type: 'query',
|
|
273
|
+
property: 'slow_d_period',
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
exports.uoTimePeriod1Parameter = {
|
|
278
|
+
displayName: 'Time Period 1',
|
|
279
|
+
name: 'time_period1',
|
|
280
|
+
type: 'number',
|
|
281
|
+
default: 7,
|
|
282
|
+
description: 'First time period',
|
|
283
|
+
displayOptions: {
|
|
284
|
+
show: {
|
|
285
|
+
resource: ['technicalIndicators'],
|
|
286
|
+
operation: ['ultosc'],
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
routing: {
|
|
290
|
+
send: {
|
|
291
|
+
type: 'query',
|
|
292
|
+
property: 'time_period1',
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
exports.uoTimePeriod2Parameter = {
|
|
297
|
+
displayName: 'Time Period 2',
|
|
298
|
+
name: 'time_period2',
|
|
299
|
+
type: 'number',
|
|
300
|
+
default: 14,
|
|
301
|
+
description: 'Second time period',
|
|
302
|
+
displayOptions: {
|
|
303
|
+
show: {
|
|
304
|
+
resource: ['technicalIndicators'],
|
|
305
|
+
operation: ['ultosc'],
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
routing: {
|
|
309
|
+
send: {
|
|
310
|
+
type: 'query',
|
|
311
|
+
property: 'time_period2',
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
exports.uoTimePeriod3Parameter = {
|
|
316
|
+
displayName: 'Time Period 3',
|
|
317
|
+
name: 'time_period3',
|
|
318
|
+
type: 'number',
|
|
319
|
+
default: 28,
|
|
320
|
+
description: 'Third time period',
|
|
321
|
+
displayOptions: {
|
|
322
|
+
show: {
|
|
323
|
+
resource: ['technicalIndicators'],
|
|
324
|
+
operation: ['ultosc'],
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
routing: {
|
|
328
|
+
send: {
|
|
329
|
+
type: 'query',
|
|
330
|
+
property: 'time_period3',
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
};
|
|
334
|
+
exports.sarAccelerationParameter = {
|
|
335
|
+
displayName: 'Acceleration',
|
|
336
|
+
name: 'acceleration',
|
|
337
|
+
type: 'number',
|
|
338
|
+
default: 0.02,
|
|
339
|
+
description: 'Acceleration factor',
|
|
340
|
+
displayOptions: {
|
|
341
|
+
show: {
|
|
342
|
+
resource: ['technicalIndicators'],
|
|
343
|
+
operation: ['sar'],
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
routing: {
|
|
347
|
+
send: {
|
|
348
|
+
type: 'query',
|
|
349
|
+
property: 'acceleration',
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
exports.sarMaximumParameter = {
|
|
354
|
+
displayName: 'Maximum',
|
|
355
|
+
name: 'maximum',
|
|
356
|
+
type: 'number',
|
|
357
|
+
default: 0.2,
|
|
358
|
+
description: 'Maximum acceleration factor',
|
|
359
|
+
displayOptions: {
|
|
360
|
+
show: {
|
|
361
|
+
resource: ['technicalIndicators'],
|
|
362
|
+
operation: ['sar'],
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
routing: {
|
|
366
|
+
send: {
|
|
367
|
+
type: 'query',
|
|
368
|
+
property: 'maximum',
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
};
|
|
372
|
+
exports.ichimokuConversionParameter = {
|
|
373
|
+
displayName: 'Conversion Line Period',
|
|
374
|
+
name: 'conversion_line_period',
|
|
375
|
+
type: 'number',
|
|
376
|
+
default: 9,
|
|
377
|
+
description: 'Tenkan-sen period',
|
|
378
|
+
displayOptions: {
|
|
379
|
+
show: {
|
|
380
|
+
resource: ['technicalIndicators'],
|
|
381
|
+
operation: ['ichimoku'],
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
routing: {
|
|
385
|
+
send: {
|
|
386
|
+
type: 'query',
|
|
387
|
+
property: 'conversion_line_period',
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
};
|
|
391
|
+
exports.ichimokuBaseParameter = {
|
|
392
|
+
displayName: 'Base Line Period',
|
|
393
|
+
name: 'base_line_period',
|
|
394
|
+
type: 'number',
|
|
395
|
+
default: 26,
|
|
396
|
+
description: 'Kijun-sen period',
|
|
397
|
+
displayOptions: {
|
|
398
|
+
show: {
|
|
399
|
+
resource: ['technicalIndicators'],
|
|
400
|
+
operation: ['ichimoku'],
|
|
401
|
+
},
|
|
402
|
+
},
|
|
403
|
+
routing: {
|
|
404
|
+
send: {
|
|
405
|
+
type: 'query',
|
|
406
|
+
property: 'base_line_period',
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
};
|
|
410
|
+
exports.ichimokuLeadingSpanParameter = {
|
|
411
|
+
displayName: 'Leading Span B Period',
|
|
412
|
+
name: 'leading_span_b_period',
|
|
413
|
+
type: 'number',
|
|
414
|
+
default: 52,
|
|
415
|
+
description: 'Senkou Span B period',
|
|
416
|
+
displayOptions: {
|
|
417
|
+
show: {
|
|
418
|
+
resource: ['technicalIndicators'],
|
|
419
|
+
operation: ['ichimoku'],
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
routing: {
|
|
423
|
+
send: {
|
|
424
|
+
type: 'query',
|
|
425
|
+
property: 'leading_span_b_period',
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
};
|
|
429
|
+
exports.ichimokuLaggingSpanParameter = {
|
|
430
|
+
displayName: 'Lagging Span Period',
|
|
431
|
+
name: 'lagging_span_period',
|
|
432
|
+
type: 'number',
|
|
433
|
+
default: 26,
|
|
434
|
+
description: 'Chikou Span displacement',
|
|
435
|
+
displayOptions: {
|
|
436
|
+
show: {
|
|
437
|
+
resource: ['technicalIndicators'],
|
|
438
|
+
operation: ['ichimoku'],
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
routing: {
|
|
442
|
+
send: {
|
|
443
|
+
type: 'query',
|
|
444
|
+
property: 'lagging_span_period',
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
};
|
|
448
|
+
exports.supertrendMultiplierParameter = {
|
|
449
|
+
displayName: 'Multiplier',
|
|
450
|
+
name: 'multiplier',
|
|
451
|
+
type: 'number',
|
|
452
|
+
default: 3,
|
|
453
|
+
description: 'ATR multiplier for SuperTrend calculation',
|
|
454
|
+
displayOptions: {
|
|
455
|
+
show: {
|
|
456
|
+
resource: ['technicalIndicators'],
|
|
457
|
+
operation: ['supertrend'],
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
routing: {
|
|
461
|
+
send: {
|
|
462
|
+
type: 'query',
|
|
463
|
+
property: 'multiplier',
|
|
464
|
+
},
|
|
465
|
+
},
|
|
466
|
+
};
|
|
467
|
+
exports.indicatorAdditionalOptions = {
|
|
468
|
+
displayName: 'Additional Options',
|
|
469
|
+
name: 'indicatorOptions',
|
|
470
|
+
type: 'collection',
|
|
471
|
+
placeholder: 'Add Option',
|
|
472
|
+
default: {},
|
|
473
|
+
displayOptions: {
|
|
474
|
+
show: {
|
|
475
|
+
resource: ['technicalIndicators'],
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
options: [
|
|
479
|
+
{
|
|
480
|
+
displayName: 'End Date',
|
|
481
|
+
name: 'end_date',
|
|
482
|
+
type: 'string',
|
|
483
|
+
default: '',
|
|
484
|
+
placeholder: 'e.g., 2024-12-31',
|
|
485
|
+
description: 'End date for data (format: YYYY-MM-DD)',
|
|
486
|
+
routing: {
|
|
487
|
+
send: {
|
|
488
|
+
type: 'query',
|
|
489
|
+
property: 'end_date',
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
displayName: 'Exchange',
|
|
495
|
+
name: 'exchange',
|
|
496
|
+
type: 'string',
|
|
497
|
+
default: '',
|
|
498
|
+
placeholder: 'e.g., NYSE, NASDAQ',
|
|
499
|
+
description: 'Filter by specific exchange',
|
|
500
|
+
routing: {
|
|
501
|
+
send: {
|
|
502
|
+
type: 'query',
|
|
503
|
+
property: 'exchange',
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
displayName: 'Output Size',
|
|
509
|
+
name: 'outputsize',
|
|
510
|
+
type: 'number',
|
|
511
|
+
default: 30,
|
|
512
|
+
description: 'Number of data points to return (max 5000)',
|
|
513
|
+
routing: {
|
|
514
|
+
send: {
|
|
515
|
+
type: 'query',
|
|
516
|
+
property: 'outputsize',
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
displayName: 'Start Date',
|
|
522
|
+
name: 'start_date',
|
|
523
|
+
type: 'string',
|
|
524
|
+
default: '',
|
|
525
|
+
placeholder: 'e.g., 2024-01-01',
|
|
526
|
+
description: 'Start date for data (format: YYYY-MM-DD)',
|
|
527
|
+
routing: {
|
|
528
|
+
send: {
|
|
529
|
+
type: 'query',
|
|
530
|
+
property: 'start_date',
|
|
531
|
+
},
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
displayName: 'Timezone',
|
|
536
|
+
name: 'timezone',
|
|
537
|
+
type: 'string',
|
|
538
|
+
default: '',
|
|
539
|
+
placeholder: 'e.g., America/New_York, UTC',
|
|
540
|
+
description: 'Timezone for the returned data',
|
|
541
|
+
routing: {
|
|
542
|
+
send: {
|
|
543
|
+
type: 'query',
|
|
544
|
+
property: 'timezone',
|
|
545
|
+
},
|
|
546
|
+
},
|
|
547
|
+
},
|
|
548
|
+
],
|
|
549
|
+
};
|
|
550
|
+
exports.allIndicatorParameters = [
|
|
551
|
+
exports.indicatorSymbolParameter,
|
|
552
|
+
exports.indicatorIntervalParameter,
|
|
553
|
+
exports.indicatorTimePeriodParameter,
|
|
554
|
+
exports.indicatorSeriesTypeParameter,
|
|
555
|
+
exports.fastPeriodParameter,
|
|
556
|
+
exports.slowPeriodParameter,
|
|
557
|
+
exports.signalPeriodParameter,
|
|
558
|
+
exports.bbandsSdParameter,
|
|
559
|
+
exports.bbandsMaTypeParameter,
|
|
560
|
+
exports.stochFastKPeriodParameter,
|
|
561
|
+
exports.stochSlowKPeriodParameter,
|
|
562
|
+
exports.stochSlowDPeriodParameter,
|
|
563
|
+
exports.uoTimePeriod1Parameter,
|
|
564
|
+
exports.uoTimePeriod2Parameter,
|
|
565
|
+
exports.uoTimePeriod3Parameter,
|
|
566
|
+
exports.sarAccelerationParameter,
|
|
567
|
+
exports.sarMaximumParameter,
|
|
568
|
+
exports.ichimokuConversionParameter,
|
|
569
|
+
exports.ichimokuBaseParameter,
|
|
570
|
+
exports.ichimokuLeadingSpanParameter,
|
|
571
|
+
exports.ichimokuLaggingSpanParameter,
|
|
572
|
+
exports.supertrendMultiplierParameter,
|
|
573
|
+
exports.indicatorAdditionalOptions,
|
|
574
|
+
];
|
|
575
|
+
//# sourceMappingURL=indicatorParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicatorParams.js","sourceRoot":"","sources":["../../../../nodes/TwelveData/parameters/indicatorParams.ts"],"names":[],"mappings":";;;AAQA,qCAA6E;AAShE,QAAA,sBAAsB,GAAG;IAErC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI;IAElE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK;IAC9E,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ;IAE3C,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY;IAE/C,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM;IAE5B,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU;IAC/E,MAAM,EAAE,cAAc;IAEtB,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,qBAAqB;IACtE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM;IAE1C,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY;IAC9E,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE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,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,0CAA0C;YACvD,OAAO,EAAE;gBACR,IAAI,EAAE;oBACL,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,YAAY;iBACtB;aACD;SACD;QACD;YACC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,6BAA6B;YAC1C,WAAW,EAAE,gCAAgC;YAC7C,OAAO,EAAE;gBACR,IAAI,EAAE;oBACL,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,UAAU;iBACpB;aACD;SACD;KACD;CACD,CAAC;AAMW,QAAA,sBAAsB,GAAsB;IACxD,gCAAwB;IACxB,kCAA0B;IAC1B,oCAA4B;IAC5B,oCAA4B;IAC5B,2BAAmB;IACnB,2BAAmB;IACnB,6BAAqB;IACrB,yBAAiB;IACjB,6BAAqB;IACrB,iCAAyB;IACzB,iCAAyB;IACzB,iCAAyB;IACzB,8BAAsB;IACtB,8BAAsB;IACtB,8BAAsB;IACtB,gCAAwB;IACxB,2BAAmB;IACnB,mCAA2B;IAC3B,6BAAqB;IACrB,oCAA4B;IAC5B,oCAA4B;IAC5B,qCAA6B;IAC7B,kCAA0B;CAC1B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sanitizeError = sanitizeError;
|
|
4
|
+
exports.sanitizeErrorObject = sanitizeErrorObject;
|
|
5
|
+
function sanitizeError(error) {
|
|
6
|
+
const errorMessage = error.message || String(error);
|
|
7
|
+
const sanitized = errorMessage.replace(/apikey[=:]?\s*[a-zA-Z0-9_-]+/gi, 'apikey=[REDACTED]');
|
|
8
|
+
const cleanError = sanitized.replace(/Authorization[=:]?\s*[a-zA-Z0-9_-]+/gi, 'Authorization: [REDACTED]');
|
|
9
|
+
return cleanError;
|
|
10
|
+
}
|
|
11
|
+
function sanitizeErrorObject(error) {
|
|
12
|
+
if (!error || typeof error !== 'object') {
|
|
13
|
+
return { message: sanitizeError(error) };
|
|
14
|
+
}
|
|
15
|
+
const sanitized = {};
|
|
16
|
+
const errorObj = error;
|
|
17
|
+
for (const key in errorObj) {
|
|
18
|
+
if (Object.prototype.hasOwnProperty.call(errorObj, key)) {
|
|
19
|
+
const value = errorObj[key];
|
|
20
|
+
if (typeof value === 'string') {
|
|
21
|
+
sanitized[key] = sanitizeError(value);
|
|
22
|
+
}
|
|
23
|
+
else if (typeof value === 'object' && value !== null) {
|
|
24
|
+
sanitized[key] = sanitizeErrorObject(value);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
sanitized[key] = value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return sanitized;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=errorSanitizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorSanitizer.js","sourceRoot":"","sources":["../../../../nodes/TwelveData/utils/errorSanitizer.ts"],"names":[],"mappings":";;AA2BA,sCAgBC;AAQD,kDAuBC;AA/CD,SAAgB,aAAa,CAAC,KAAc;IAC3C,MAAM,YAAY,GAAI,KAAe,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;IAG/D,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CACrC,gCAAgC,EAChC,mBAAmB,CACnB,CAAC;IAGF,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CACnC,uCAAuC,EACvC,2BAA2B,CAC3B,CAAC;IAEF,OAAO,UAAU,CAAC;AACnB,CAAC;AAQD,SAAgB,mBAAmB,CAAC,KAAc;IACjD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACzC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;IAC1C,CAAC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