@upbit-official/upbit-sdk 1.0.0 → 1.1.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.
Files changed (190) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +21 -0
  3. package/client.d.mts +10 -4
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +10 -4
  6. package/client.d.ts.map +1 -1
  7. package/client.js +23 -5
  8. package/client.js.map +1 -1
  9. package/client.mjs +23 -5
  10. package/client.mjs.map +1 -1
  11. package/index.d.mts +3 -1
  12. package/index.d.mts.map +1 -1
  13. package/index.d.ts +3 -1
  14. package/index.d.ts.map +1 -1
  15. package/index.js +2 -1
  16. package/index.js.map +1 -1
  17. package/index.mjs +1 -1
  18. package/index.mjs.map +1 -1
  19. package/internal/ws-parser.d.mts +40 -0
  20. package/internal/ws-parser.d.mts.map +1 -0
  21. package/internal/ws-parser.d.ts +40 -0
  22. package/internal/ws-parser.d.ts.map +1 -0
  23. package/internal/ws-parser.js +125 -0
  24. package/internal/ws-parser.js.map +1 -0
  25. package/internal/ws-parser.mjs +118 -0
  26. package/internal/ws-parser.mjs.map +1 -0
  27. package/internal/ws-simple-types.d.mts +8 -0
  28. package/internal/ws-simple-types.d.mts.map +1 -0
  29. package/internal/ws-simple-types.d.ts +8 -0
  30. package/internal/ws-simple-types.d.ts.map +1 -0
  31. package/internal/ws-simple-types.js +3 -0
  32. package/internal/ws-simple-types.js.map +1 -0
  33. package/internal/ws-simple-types.mjs +2 -0
  34. package/internal/ws-simple-types.mjs.map +1 -0
  35. package/internal/ws.d.mts +1 -0
  36. package/internal/ws.d.mts.map +1 -1
  37. package/internal/ws.d.ts +1 -0
  38. package/internal/ws.d.ts.map +1 -1
  39. package/internal/ws.js.map +1 -1
  40. package/internal/ws.mjs.map +1 -1
  41. package/lib/index.d.mts +4 -2
  42. package/lib/index.d.mts.map +1 -1
  43. package/lib/index.d.ts +4 -2
  44. package/lib/index.d.ts.map +1 -1
  45. package/lib/index.js +2 -1
  46. package/lib/index.js.map +1 -1
  47. package/lib/index.mjs +1 -1
  48. package/lib/index.mjs.map +1 -1
  49. package/lib/jsonParseFloat.d.mts +5 -5
  50. package/lib/jsonParseFloat.d.mts.map +1 -1
  51. package/lib/jsonParseFloat.d.ts +5 -5
  52. package/lib/jsonParseFloat.d.ts.map +1 -1
  53. package/lib/jsonParseFloat.js +30 -12
  54. package/lib/jsonParseFloat.js.map +1 -1
  55. package/lib/jsonParseFloat.mjs +30 -12
  56. package/lib/jsonParseFloat.mjs.map +1 -1
  57. package/lib/ws.d.mts +102 -15
  58. package/lib/ws.d.mts.map +1 -1
  59. package/lib/ws.d.ts +102 -15
  60. package/lib/ws.d.ts.map +1 -1
  61. package/lib/ws.js +208 -34
  62. package/lib/ws.js.map +1 -1
  63. package/lib/ws.mjs +204 -33
  64. package/lib/ws.mjs.map +1 -1
  65. package/package.json +1 -1
  66. package/resources/index.d.mts +3 -2
  67. package/resources/index.d.mts.map +1 -1
  68. package/resources/index.d.ts +3 -2
  69. package/resources/index.d.ts.map +1 -1
  70. package/resources/index.js +3 -1
  71. package/resources/index.js.map +1 -1
  72. package/resources/index.mjs +3 -2
  73. package/resources/index.mjs.map +1 -1
  74. package/resources/ws-info/index.d.mts +6 -0
  75. package/resources/ws-info/index.d.mts.map +1 -0
  76. package/resources/ws-info/index.d.ts +6 -0
  77. package/resources/ws-info/index.d.ts.map +1 -0
  78. package/resources/ws-info/index.js +6 -0
  79. package/resources/ws-info/index.js.map +1 -0
  80. package/resources/ws-info/index.mjs +2 -0
  81. package/resources/ws-info/index.mjs.map +1 -0
  82. package/resources/ws-info/internal-base.d.mts +63 -0
  83. package/resources/ws-info/internal-base.d.mts.map +1 -0
  84. package/resources/ws-info/internal-base.d.ts +63 -0
  85. package/resources/ws-info/internal-base.d.ts.map +1 -0
  86. package/resources/ws-info/internal-base.js +47 -0
  87. package/resources/ws-info/internal-base.js.map +1 -0
  88. package/resources/ws-info/internal-base.mjs +41 -0
  89. package/resources/ws-info/internal-base.mjs.map +1 -0
  90. package/resources/ws-info/ws-info.d.mts +1180 -0
  91. package/resources/ws-info/ws-info.d.mts.map +1 -0
  92. package/resources/ws-info/ws-info.d.ts +1180 -0
  93. package/resources/ws-info/ws-info.d.ts.map +1 -0
  94. package/resources/ws-info/ws-info.js +8 -0
  95. package/resources/ws-info/ws-info.js.map +1 -0
  96. package/resources/ws-info/ws-info.mjs +4 -0
  97. package/resources/ws-info/ws-info.mjs.map +1 -0
  98. package/resources/ws-info/ws.d.mts +91 -0
  99. package/resources/ws-info/ws.d.mts.map +1 -0
  100. package/resources/ws-info/ws.d.ts +91 -0
  101. package/resources/ws-info/ws.d.ts.map +1 -0
  102. package/resources/ws-info/ws.js +463 -0
  103. package/resources/ws-info/ws.js.map +1 -0
  104. package/resources/ws-info/ws.mjs +458 -0
  105. package/resources/ws-info/ws.mjs.map +1 -0
  106. package/resources/ws-info.d.mts +2 -0
  107. package/resources/ws-info.d.mts.map +1 -0
  108. package/resources/ws-info.d.ts +2 -0
  109. package/resources/ws-info.d.ts.map +1 -0
  110. package/resources/ws-info.js +5 -0
  111. package/resources/ws-info.js.map +1 -0
  112. package/resources/ws-info.mjs +2 -0
  113. package/resources/ws-info.mjs.map +1 -0
  114. package/resources/ws-private/index.d.mts +3 -1
  115. package/resources/ws-private/index.d.mts.map +1 -1
  116. package/resources/ws-private/index.d.ts +3 -1
  117. package/resources/ws-private/index.d.ts.map +1 -1
  118. package/resources/ws-private/index.js.map +1 -1
  119. package/resources/ws-private/index.mjs +1 -1
  120. package/resources/ws-private/index.mjs.map +1 -1
  121. package/resources/ws-private/internal-base.d.mts.map +1 -1
  122. package/resources/ws-private/internal-base.d.ts.map +1 -1
  123. package/resources/ws-private/internal-base.js.map +1 -1
  124. package/resources/ws-private/internal-base.mjs.map +1 -1
  125. package/resources/ws-private/ws-private.d.mts +301 -9
  126. package/resources/ws-private/ws-private.d.mts.map +1 -1
  127. package/resources/ws-private/ws-private.d.ts +301 -9
  128. package/resources/ws-private/ws-private.d.ts.map +1 -1
  129. package/resources/ws-private/ws-private.js.map +1 -1
  130. package/resources/ws-private/ws-private.mjs.map +1 -1
  131. package/resources/ws-private/ws.d.mts +2 -2
  132. package/resources/ws-private/ws.d.mts.map +1 -1
  133. package/resources/ws-private/ws.d.ts +2 -2
  134. package/resources/ws-private/ws.d.ts.map +1 -1
  135. package/resources/ws-private/ws.js +15 -20
  136. package/resources/ws-private/ws.js.map +1 -1
  137. package/resources/ws-private/ws.mjs +15 -20
  138. package/resources/ws-private/ws.mjs.map +1 -1
  139. package/resources/ws-public/index.d.mts +3 -1
  140. package/resources/ws-public/index.d.mts.map +1 -1
  141. package/resources/ws-public/index.d.ts +3 -1
  142. package/resources/ws-public/index.d.ts.map +1 -1
  143. package/resources/ws-public/index.js.map +1 -1
  144. package/resources/ws-public/index.mjs +1 -1
  145. package/resources/ws-public/index.mjs.map +1 -1
  146. package/resources/ws-public/internal-base.d.mts.map +1 -1
  147. package/resources/ws-public/internal-base.d.ts.map +1 -1
  148. package/resources/ws-public/internal-base.js.map +1 -1
  149. package/resources/ws-public/internal-base.mjs.map +1 -1
  150. package/resources/ws-public/ws-public.d.mts +355 -5
  151. package/resources/ws-public/ws-public.d.mts.map +1 -1
  152. package/resources/ws-public/ws-public.d.ts +355 -5
  153. package/resources/ws-public/ws-public.d.ts.map +1 -1
  154. package/resources/ws-public/ws.d.mts +2 -2
  155. package/resources/ws-public/ws.d.mts.map +1 -1
  156. package/resources/ws-public/ws.d.ts +2 -2
  157. package/resources/ws-public/ws.d.ts.map +1 -1
  158. package/resources/ws-public/ws.js +15 -20
  159. package/resources/ws-public/ws.js.map +1 -1
  160. package/resources/ws-public/ws.mjs +15 -20
  161. package/resources/ws-public/ws.mjs.map +1 -1
  162. package/src/client.ts +92 -5
  163. package/src/index.ts +24 -1
  164. package/src/internal/ws-parser.ts +164 -0
  165. package/src/internal/ws-simple-types.ts +34 -0
  166. package/src/internal/ws.ts +1 -0
  167. package/src/lib/index.ts +17 -2
  168. package/src/lib/jsonParseFloat.ts +37 -12
  169. package/src/lib/ws.ts +367 -55
  170. package/src/resources/index.ts +42 -2
  171. package/src/resources/ws-info/index.ts +44 -0
  172. package/src/resources/ws-info/internal-base.ts +96 -0
  173. package/src/resources/ws-info/ws-info.ts +1855 -0
  174. package/src/resources/ws-info/ws.ts +574 -0
  175. package/src/resources/ws-info.ts +1 -0
  176. package/src/resources/ws-private/index.ts +12 -1
  177. package/src/resources/ws-private/internal-base.ts +0 -1
  178. package/src/resources/ws-private/ws-private.ts +420 -18
  179. package/src/resources/ws-private/ws.ts +16 -23
  180. package/src/resources/ws-public/index.ts +16 -1
  181. package/src/resources/ws-public/internal-base.ts +0 -1
  182. package/src/resources/ws-public/ws-public.ts +459 -4
  183. package/src/resources/ws-public/ws.ts +16 -23
  184. package/src/version.ts +1 -1
  185. package/version.d.mts +1 -1
  186. package/version.d.ts +1 -1
  187. package/version.js +1 -1
  188. package/version.js.map +1 -1
  189. package/version.mjs +1 -1
  190. package/version.mjs.map +1 -1
@@ -0,0 +1,1180 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as WsInfoAPI from "./ws-info.js";
3
+ export declare class WsInfo extends APIResource {
4
+ }
5
+ export interface BollingerBandsIndicator {
6
+ candle_date_time_utc: string;
7
+ code: string;
8
+ indicator: 'bollinger_bands';
9
+ params: BollingerBandsIndicator.Params;
10
+ stream_type: 'REALTIME';
11
+ /**
12
+ * Candle timeframe used to calculate an indicator
13
+ */
14
+ timeframe: IndicatorTimeframe;
15
+ timestamp: number;
16
+ type: 'indicator';
17
+ value: BollingerBandsIndicator.Value;
18
+ }
19
+ export declare namespace BollingerBandsIndicator {
20
+ interface Params {
21
+ multiplier: 1 | 1.5 | 2 | 2.5 | 3;
22
+ period: 10 | 20 | 50;
23
+ }
24
+ interface Value {
25
+ bb_lower: string;
26
+ bb_middle: string;
27
+ bb_upper: string;
28
+ }
29
+ }
30
+ export interface BollingerBandsIndicatorSignal {
31
+ candle_date_time_utc: string;
32
+ code: string;
33
+ /**
34
+ * Empty condition parameters for a trigger without event parameters
35
+ */
36
+ event_params: BollingerBandsIndicatorSignal.EventParams;
37
+ indicator: 'bollinger_bands';
38
+ params: BollingerBandsIndicatorSignal.Params;
39
+ stream_type: 'REALTIME';
40
+ /**
41
+ * Candle timeframe used to calculate an indicator
42
+ */
43
+ timeframe: IndicatorTimeframe;
44
+ timestamp: number;
45
+ trigger: 'price_cross_above' | 'price_cross_below';
46
+ type: 'indicator_signal';
47
+ value: BollingerBandsIndicatorSignal.Value;
48
+ }
49
+ export declare namespace BollingerBandsIndicatorSignal {
50
+ /**
51
+ * Empty condition parameters for a trigger without event parameters
52
+ */
53
+ interface EventParams {
54
+ }
55
+ interface Params {
56
+ multiplier: 1.5 | 2 | 2.5;
57
+ period: 20;
58
+ }
59
+ interface Value {
60
+ bb_lower: string;
61
+ bb_middle: string;
62
+ bb_upper: string;
63
+ }
64
+ }
65
+ export type Indicator = VolumeIndicator | RsiIndicator | MovingAverageIndicator | MaCrossoverIndicator | BollingerBandsIndicator | MacdIndicator;
66
+ export type IndicatorSignal = VolumeIndicatorSignal | RsiOverboughtIndicatorSignal | RsiOversoldIndicatorSignal | MovingAverageIndicatorSignal | MaCrossoverIndicatorSignal | BollingerBandsIndicatorSignal | MacdIndicatorSignal;
67
+ export type IndicatorTimeframe = '5m' | '15m' | '60m' | '240m' | '1d';
68
+ export type IndicatorType = 'volume' | 'rsi' | 'moving_average' | 'ma_crossover' | 'bollinger_bands' | 'macd';
69
+ export interface MaCrossoverIndicator {
70
+ candle_date_time_utc: string;
71
+ code: string;
72
+ indicator: 'ma_crossover';
73
+ params: MaCrossoverIndicator.WsMaCrossoverIndicatorParams5_20 | MaCrossoverIndicator.WsMaCrossoverIndicatorParams20_60 | MaCrossoverIndicator.WsMaCrossoverIndicatorParams30_90 | MaCrossoverIndicator.WsMaCrossoverIndicatorParams50_200;
74
+ stream_type: 'REALTIME';
75
+ /**
76
+ * Candle timeframe used to calculate an indicator
77
+ */
78
+ timeframe: IndicatorTimeframe;
79
+ timestamp: number;
80
+ type: 'indicator';
81
+ value: MaCrossoverIndicator.Value;
82
+ }
83
+ export declare namespace MaCrossoverIndicator {
84
+ interface WsMaCrossoverIndicatorParams5_20 {
85
+ long_period: 20;
86
+ short_period: 5;
87
+ /**
88
+ * Moving average calculation type
89
+ */
90
+ type: 'SMA' | 'EMA';
91
+ }
92
+ interface WsMaCrossoverIndicatorParams20_60 {
93
+ long_period: 60;
94
+ short_period: 20;
95
+ /**
96
+ * Moving average calculation type
97
+ */
98
+ type: 'SMA' | 'EMA';
99
+ }
100
+ interface WsMaCrossoverIndicatorParams30_90 {
101
+ long_period: 90;
102
+ short_period: 30;
103
+ /**
104
+ * Moving average calculation type
105
+ */
106
+ type: 'SMA' | 'EMA';
107
+ }
108
+ interface WsMaCrossoverIndicatorParams50_200 {
109
+ long_period: 200;
110
+ short_period: 50;
111
+ /**
112
+ * Moving average calculation type
113
+ */
114
+ type: 'SMA' | 'EMA';
115
+ }
116
+ interface Value {
117
+ ma_long: string;
118
+ ma_short: string;
119
+ }
120
+ }
121
+ export interface MaCrossoverIndicatorSignal {
122
+ candle_date_time_utc: string;
123
+ code: string;
124
+ /**
125
+ * Empty condition parameters for a trigger without event parameters
126
+ */
127
+ event_params: MaCrossoverIndicatorSignal.EventParams;
128
+ indicator: 'ma_crossover';
129
+ params: MaCrossoverIndicatorSignal.WsIndicatorSignalMaCrossoverParams5_20 | MaCrossoverIndicatorSignal.WsIndicatorSignalMaCrossoverParams20_60 | MaCrossoverIndicatorSignal.WsIndicatorSignalMaCrossoverParams30_90 | MaCrossoverIndicatorSignal.WsIndicatorSignalMaCrossoverParams50_200;
130
+ stream_type: 'REALTIME';
131
+ /**
132
+ * Candle timeframe used to calculate an indicator
133
+ */
134
+ timeframe: IndicatorTimeframe;
135
+ timestamp: number;
136
+ trigger: 'golden_cross' | 'dead_cross';
137
+ type: 'indicator_signal';
138
+ value: MaCrossoverIndicatorSignal.Value;
139
+ }
140
+ export declare namespace MaCrossoverIndicatorSignal {
141
+ /**
142
+ * Empty condition parameters for a trigger without event parameters
143
+ */
144
+ interface EventParams {
145
+ }
146
+ interface WsIndicatorSignalMaCrossoverParams5_20 {
147
+ long_period: 20;
148
+ short_period: 5;
149
+ /**
150
+ * Moving average calculation type
151
+ */
152
+ type: 'SMA' | 'EMA';
153
+ }
154
+ interface WsIndicatorSignalMaCrossoverParams20_60 {
155
+ long_period: 60;
156
+ short_period: 20;
157
+ /**
158
+ * Moving average calculation type
159
+ */
160
+ type: 'SMA' | 'EMA';
161
+ }
162
+ interface WsIndicatorSignalMaCrossoverParams30_90 {
163
+ long_period: 90;
164
+ short_period: 30;
165
+ /**
166
+ * Moving average calculation type
167
+ */
168
+ type: 'SMA' | 'EMA';
169
+ }
170
+ interface WsIndicatorSignalMaCrossoverParams50_200 {
171
+ long_period: 200;
172
+ short_period: 50;
173
+ /**
174
+ * Moving average calculation type
175
+ */
176
+ type: 'SMA' | 'EMA';
177
+ }
178
+ interface Value {
179
+ ma_long: string;
180
+ ma_short: string;
181
+ }
182
+ }
183
+ export interface MacdIndicator {
184
+ candle_date_time_utc: string;
185
+ code: string;
186
+ indicator: 'macd';
187
+ params: MacdIndicator.WsMacdIndicatorParams12_26_9 | MacdIndicator.WsMacdIndicatorParams8_17_9 | MacdIndicator.WsMacdIndicatorParams5_35_5;
188
+ stream_type: 'REALTIME';
189
+ /**
190
+ * Candle timeframe used to calculate an indicator
191
+ */
192
+ timeframe: IndicatorTimeframe;
193
+ timestamp: number;
194
+ type: 'indicator';
195
+ value: MacdIndicator.Value;
196
+ }
197
+ export declare namespace MacdIndicator {
198
+ interface WsMacdIndicatorParams12_26_9 {
199
+ fast: 12;
200
+ signal_period: 9;
201
+ slow: 26;
202
+ }
203
+ interface WsMacdIndicatorParams8_17_9 {
204
+ fast: 8;
205
+ signal_period: 9;
206
+ slow: 17;
207
+ }
208
+ interface WsMacdIndicatorParams5_35_5 {
209
+ fast: 5;
210
+ signal_period: 5;
211
+ slow: 35;
212
+ }
213
+ interface Value {
214
+ histogram: string;
215
+ macd: string;
216
+ macd_signal: string;
217
+ }
218
+ }
219
+ export interface MacdIndicatorSignal {
220
+ candle_date_time_utc: string;
221
+ code: string;
222
+ /**
223
+ * Empty condition parameters for a trigger without event parameters
224
+ */
225
+ event_params: MacdIndicatorSignal.EventParams;
226
+ indicator: 'macd';
227
+ params: MacdIndicatorSignal.WsIndicatorSignalMacdParams12_26_9 | MacdIndicatorSignal.WsIndicatorSignalMacdParams8_17_9 | MacdIndicatorSignal.WsIndicatorSignalMacdParams5_35_5;
228
+ stream_type: 'REALTIME';
229
+ /**
230
+ * Candle timeframe used to calculate an indicator
231
+ */
232
+ timeframe: IndicatorTimeframe;
233
+ timestamp: number;
234
+ trigger: 'golden_cross' | 'dead_cross' | 'zero_cross_above' | 'zero_cross_below';
235
+ type: 'indicator_signal';
236
+ value: MacdIndicatorSignal.Value;
237
+ }
238
+ export declare namespace MacdIndicatorSignal {
239
+ /**
240
+ * Empty condition parameters for a trigger without event parameters
241
+ */
242
+ interface EventParams {
243
+ }
244
+ interface WsIndicatorSignalMacdParams12_26_9 {
245
+ fast: 12;
246
+ signal_period: 9;
247
+ slow: 26;
248
+ }
249
+ interface WsIndicatorSignalMacdParams8_17_9 {
250
+ fast: 8;
251
+ signal_period: 9;
252
+ slow: 17;
253
+ }
254
+ interface WsIndicatorSignalMacdParams5_35_5 {
255
+ fast: 5;
256
+ signal_period: 5;
257
+ slow: 35;
258
+ }
259
+ interface Value {
260
+ histogram: string;
261
+ macd: string;
262
+ macd_signal: string;
263
+ }
264
+ }
265
+ export interface MovingAverageIndicator {
266
+ candle_date_time_utc: string;
267
+ code: string;
268
+ indicator: 'moving_average';
269
+ params: MovingAverageIndicator.Params;
270
+ stream_type: 'REALTIME';
271
+ /**
272
+ * Candle timeframe used to calculate an indicator
273
+ */
274
+ timeframe: IndicatorTimeframe;
275
+ timestamp: number;
276
+ type: 'indicator';
277
+ value: MovingAverageIndicator.Value;
278
+ }
279
+ export declare namespace MovingAverageIndicator {
280
+ interface Params {
281
+ period: 3 | 5 | 7 | 10 | 15 | 20 | 25 | 30 | 50 | 60 | 90 | 99 | 100 | 120 | 200;
282
+ /**
283
+ * Moving average calculation type
284
+ */
285
+ type: 'SMA' | 'EMA';
286
+ }
287
+ interface Value {
288
+ value: string;
289
+ }
290
+ }
291
+ export interface MovingAverageIndicatorSignal {
292
+ candle_date_time_utc: string;
293
+ code: string;
294
+ /**
295
+ * Empty condition parameters for a trigger without event parameters
296
+ */
297
+ event_params: MovingAverageIndicatorSignal.EventParams;
298
+ indicator: 'moving_average';
299
+ params: MovingAverageIndicatorSignal.Params;
300
+ stream_type: 'REALTIME';
301
+ /**
302
+ * Candle timeframe used to calculate an indicator
303
+ */
304
+ timeframe: IndicatorTimeframe;
305
+ timestamp: number;
306
+ trigger: 'price_cross_above' | 'price_cross_below';
307
+ type: 'indicator_signal';
308
+ value: MovingAverageIndicatorSignal.Value;
309
+ }
310
+ export declare namespace MovingAverageIndicatorSignal {
311
+ /**
312
+ * Empty condition parameters for a trigger without event parameters
313
+ */
314
+ interface EventParams {
315
+ }
316
+ interface Params {
317
+ period: 5 | 10 | 20 | 30 | 60 | 90 | 120 | 200;
318
+ /**
319
+ * Moving average calculation type
320
+ */
321
+ type: 'SMA' | 'EMA';
322
+ }
323
+ interface Value {
324
+ value: string;
325
+ }
326
+ }
327
+ export interface RsiIndicator {
328
+ candle_date_time_utc: string;
329
+ code: string;
330
+ indicator: 'rsi';
331
+ params: RsiIndicator.Params;
332
+ stream_type: 'REALTIME';
333
+ /**
334
+ * Candle timeframe used to calculate an indicator
335
+ */
336
+ timeframe: IndicatorTimeframe;
337
+ timestamp: number;
338
+ type: 'indicator';
339
+ value: RsiIndicator.Value;
340
+ }
341
+ export declare namespace RsiIndicator {
342
+ interface Params {
343
+ period: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 25;
344
+ }
345
+ interface Value {
346
+ rsi: string;
347
+ }
348
+ }
349
+ export type RsiIndicatorSignal = RsiOverboughtIndicatorSignal | RsiOversoldIndicatorSignal;
350
+ export interface RsiOverboughtIndicatorSignal {
351
+ candle_date_time_utc: string;
352
+ code: string;
353
+ event_params: RsiOverboughtIndicatorSignal.EventParams;
354
+ indicator: 'rsi';
355
+ params: RsiOverboughtIndicatorSignal.Params;
356
+ stream_type: 'REALTIME';
357
+ /**
358
+ * Candle timeframe used to calculate an indicator
359
+ */
360
+ timeframe: IndicatorTimeframe;
361
+ timestamp: number;
362
+ trigger: 'overbought';
363
+ type: 'indicator_signal';
364
+ value: RsiOverboughtIndicatorSignal.Value;
365
+ }
366
+ export declare namespace RsiOverboughtIndicatorSignal {
367
+ interface EventParams {
368
+ threshold: 70 | 80;
369
+ }
370
+ interface Params {
371
+ period: 7 | 9 | 14 | 21 | 25;
372
+ }
373
+ interface Value {
374
+ rsi: string;
375
+ }
376
+ }
377
+ export interface RsiOverboughtIndicatorSignalRequest {
378
+ event_params: RsiOverboughtIndicatorSignalRequest.EventParams;
379
+ params: RsiOverboughtIndicatorSignalRequest.Params;
380
+ trigger: 'overbought';
381
+ type: 'rsi';
382
+ }
383
+ export declare namespace RsiOverboughtIndicatorSignalRequest {
384
+ interface EventParams {
385
+ threshold: 70 | 80;
386
+ }
387
+ interface Params {
388
+ period: 7 | 9 | 14 | 21 | 25;
389
+ }
390
+ }
391
+ export interface RsiOversoldIndicatorSignal {
392
+ candle_date_time_utc: string;
393
+ code: string;
394
+ event_params: RsiOversoldIndicatorSignal.EventParams;
395
+ indicator: 'rsi';
396
+ params: RsiOversoldIndicatorSignal.Params;
397
+ stream_type: 'REALTIME';
398
+ /**
399
+ * Candle timeframe used to calculate an indicator
400
+ */
401
+ timeframe: IndicatorTimeframe;
402
+ timestamp: number;
403
+ trigger: 'oversold';
404
+ type: 'indicator_signal';
405
+ value: RsiOversoldIndicatorSignal.Value;
406
+ }
407
+ export declare namespace RsiOversoldIndicatorSignal {
408
+ interface EventParams {
409
+ threshold: 20 | 30;
410
+ }
411
+ interface Params {
412
+ period: 7 | 9 | 14 | 21 | 25;
413
+ }
414
+ interface Value {
415
+ rsi: string;
416
+ }
417
+ }
418
+ export interface RsiOversoldIndicatorSignalRequest {
419
+ event_params: RsiOversoldIndicatorSignalRequest.EventParams;
420
+ params: RsiOversoldIndicatorSignalRequest.Params;
421
+ trigger: 'oversold';
422
+ type: 'rsi';
423
+ }
424
+ export declare namespace RsiOversoldIndicatorSignalRequest {
425
+ interface EventParams {
426
+ threshold: 20 | 30;
427
+ }
428
+ interface Params {
429
+ period: 7 | 9 | 14 | 21 | 25;
430
+ }
431
+ }
432
+ export interface SimpleBollingerBandsIndicator {
433
+ cd: string;
434
+ cdttmu: string;
435
+ ind: 'bollinger_bands';
436
+ p: SimpleBollingerBandsIndicator.P;
437
+ st: 'REALTIME';
438
+ /**
439
+ * Candle timeframe used to calculate an indicator
440
+ */
441
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
442
+ tms: number;
443
+ ty: 'indicator';
444
+ v: SimpleBollingerBandsIndicator.V;
445
+ }
446
+ export declare namespace SimpleBollingerBandsIndicator {
447
+ interface P {
448
+ m: 1 | 1.5 | 2 | 2.5 | 3;
449
+ p: 10 | 20 | 50;
450
+ }
451
+ interface V {
452
+ bbl: string;
453
+ bbm: string;
454
+ bbu: string;
455
+ }
456
+ }
457
+ export interface SimpleBollingerBandsIndicatorSignal {
458
+ cd: string;
459
+ cdttmu: string;
460
+ /**
461
+ * Empty condition parameters for a trigger without event parameters
462
+ */
463
+ ep: {
464
+ [key: string]: unknown;
465
+ };
466
+ ind: 'bollinger_bands';
467
+ p: SimpleBollingerBandsIndicatorSignal.P;
468
+ st: 'REALTIME';
469
+ /**
470
+ * Candle timeframe used to calculate an indicator
471
+ */
472
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
473
+ tms: number;
474
+ tr: 'price_cross_above' | 'price_cross_below';
475
+ ty: 'indicator_signal';
476
+ v: SimpleBollingerBandsIndicatorSignal.V;
477
+ }
478
+ export declare namespace SimpleBollingerBandsIndicatorSignal {
479
+ interface P {
480
+ m: 1.5 | 2 | 2.5;
481
+ p: 20;
482
+ }
483
+ interface V {
484
+ bbl: string;
485
+ bbm: string;
486
+ bbu: string;
487
+ }
488
+ }
489
+ export type SimpleInfoServerEvent = SimpleVolumeIndicator | SimpleRsiIndicator | SimpleMovingAverageIndicator | SimpleMaCrossoverIndicator | SimpleBollingerBandsIndicator | SimpleMacdIndicator | SimpleVolumeIndicatorSignal | SimpleRsiOverboughtIndicatorSignal | SimpleRsiOversoldIndicatorSignal | SimpleMovingAverageIndicatorSignal | SimpleMaCrossoverIndicatorSignal | SimpleBollingerBandsIndicatorSignal | SimpleMacdIndicatorSignal;
490
+ export interface SimpleMaCrossoverIndicator {
491
+ cd: string;
492
+ cdttmu: string;
493
+ ind: 'ma_crossover';
494
+ p: SimpleMaCrossoverIndicator.WsSimpleMaCrossoverIndicatorParams5_20 | SimpleMaCrossoverIndicator.WsSimpleMaCrossoverIndicatorParams20_60 | SimpleMaCrossoverIndicator.WsSimpleMaCrossoverIndicatorParams30_90 | SimpleMaCrossoverIndicator.WsSimpleMaCrossoverIndicatorParams50_200;
495
+ st: 'REALTIME';
496
+ /**
497
+ * Candle timeframe used to calculate an indicator
498
+ */
499
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
500
+ tms: number;
501
+ ty: 'indicator';
502
+ v: SimpleMaCrossoverIndicator.V;
503
+ }
504
+ export declare namespace SimpleMaCrossoverIndicator {
505
+ interface WsSimpleMaCrossoverIndicatorParams5_20 {
506
+ lop: 20;
507
+ shp: 5;
508
+ /**
509
+ * Moving average calculation type
510
+ */
511
+ t: 'SMA' | 'EMA';
512
+ }
513
+ interface WsSimpleMaCrossoverIndicatorParams20_60 {
514
+ lop: 60;
515
+ shp: 20;
516
+ /**
517
+ * Moving average calculation type
518
+ */
519
+ t: 'SMA' | 'EMA';
520
+ }
521
+ interface WsSimpleMaCrossoverIndicatorParams30_90 {
522
+ lop: 90;
523
+ shp: 30;
524
+ /**
525
+ * Moving average calculation type
526
+ */
527
+ t: 'SMA' | 'EMA';
528
+ }
529
+ interface WsSimpleMaCrossoverIndicatorParams50_200 {
530
+ lop: 200;
531
+ shp: 50;
532
+ /**
533
+ * Moving average calculation type
534
+ */
535
+ t: 'SMA' | 'EMA';
536
+ }
537
+ interface V {
538
+ mal: string;
539
+ mas: string;
540
+ }
541
+ }
542
+ export interface SimpleMaCrossoverIndicatorSignal {
543
+ cd: string;
544
+ cdttmu: string;
545
+ /**
546
+ * Empty condition parameters for a trigger without event parameters
547
+ */
548
+ ep: {
549
+ [key: string]: unknown;
550
+ };
551
+ ind: 'ma_crossover';
552
+ p: SimpleMaCrossoverIndicatorSignal.WsSimpleIndicatorSignalMaCrossoverParams5_20 | SimpleMaCrossoverIndicatorSignal.WsSimpleIndicatorSignalMaCrossoverParams20_60 | SimpleMaCrossoverIndicatorSignal.WsSimpleIndicatorSignalMaCrossoverParams30_90 | SimpleMaCrossoverIndicatorSignal.WsSimpleIndicatorSignalMaCrossoverParams50_200;
553
+ st: 'REALTIME';
554
+ /**
555
+ * Candle timeframe used to calculate an indicator
556
+ */
557
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
558
+ tms: number;
559
+ tr: 'golden_cross' | 'dead_cross';
560
+ ty: 'indicator_signal';
561
+ v: SimpleMaCrossoverIndicatorSignal.V;
562
+ }
563
+ export declare namespace SimpleMaCrossoverIndicatorSignal {
564
+ interface WsSimpleIndicatorSignalMaCrossoverParams5_20 {
565
+ lop: 20;
566
+ shp: 5;
567
+ /**
568
+ * Moving average calculation type
569
+ */
570
+ t: 'SMA' | 'EMA';
571
+ }
572
+ interface WsSimpleIndicatorSignalMaCrossoverParams20_60 {
573
+ lop: 60;
574
+ shp: 20;
575
+ /**
576
+ * Moving average calculation type
577
+ */
578
+ t: 'SMA' | 'EMA';
579
+ }
580
+ interface WsSimpleIndicatorSignalMaCrossoverParams30_90 {
581
+ lop: 90;
582
+ shp: 30;
583
+ /**
584
+ * Moving average calculation type
585
+ */
586
+ t: 'SMA' | 'EMA';
587
+ }
588
+ interface WsSimpleIndicatorSignalMaCrossoverParams50_200 {
589
+ lop: 200;
590
+ shp: 50;
591
+ /**
592
+ * Moving average calculation type
593
+ */
594
+ t: 'SMA' | 'EMA';
595
+ }
596
+ interface V {
597
+ mal: string;
598
+ mas: string;
599
+ }
600
+ }
601
+ export interface SimpleMacdIndicator {
602
+ cd: string;
603
+ cdttmu: string;
604
+ ind: 'macd';
605
+ p: SimpleMacdIndicator.WsSimpleMacdIndicatorParams12_26_9 | SimpleMacdIndicator.WsSimpleMacdIndicatorParams8_17_9 | SimpleMacdIndicator.WsSimpleMacdIndicatorParams5_35_5;
606
+ st: 'REALTIME';
607
+ /**
608
+ * Candle timeframe used to calculate an indicator
609
+ */
610
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
611
+ tms: number;
612
+ ty: 'indicator';
613
+ v: SimpleMacdIndicator.V;
614
+ }
615
+ export declare namespace SimpleMacdIndicator {
616
+ interface WsSimpleMacdIndicatorParams12_26_9 {
617
+ f: 12;
618
+ s: 26;
619
+ sgp: 9;
620
+ }
621
+ interface WsSimpleMacdIndicatorParams8_17_9 {
622
+ f: 8;
623
+ s: 17;
624
+ sgp: 9;
625
+ }
626
+ interface WsSimpleMacdIndicatorParams5_35_5 {
627
+ f: 5;
628
+ s: 35;
629
+ sgp: 5;
630
+ }
631
+ interface V {
632
+ hist: string;
633
+ macd: string;
634
+ macds: string;
635
+ }
636
+ }
637
+ export interface SimpleMacdIndicatorSignal {
638
+ cd: string;
639
+ cdttmu: string;
640
+ /**
641
+ * Empty condition parameters for a trigger without event parameters
642
+ */
643
+ ep: {
644
+ [key: string]: unknown;
645
+ };
646
+ ind: 'macd';
647
+ p: SimpleMacdIndicatorSignal.WsSimpleIndicatorSignalMacdParams12_26_9 | SimpleMacdIndicatorSignal.WsSimpleIndicatorSignalMacdParams8_17_9 | SimpleMacdIndicatorSignal.WsSimpleIndicatorSignalMacdParams5_35_5;
648
+ st: 'REALTIME';
649
+ /**
650
+ * Candle timeframe used to calculate an indicator
651
+ */
652
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
653
+ tms: number;
654
+ tr: 'golden_cross' | 'dead_cross' | 'zero_cross_above' | 'zero_cross_below';
655
+ ty: 'indicator_signal';
656
+ v: SimpleMacdIndicatorSignal.V;
657
+ }
658
+ export declare namespace SimpleMacdIndicatorSignal {
659
+ interface WsSimpleIndicatorSignalMacdParams12_26_9 {
660
+ f: 12;
661
+ s: 26;
662
+ sgp: 9;
663
+ }
664
+ interface WsSimpleIndicatorSignalMacdParams8_17_9 {
665
+ f: 8;
666
+ s: 17;
667
+ sgp: 9;
668
+ }
669
+ interface WsSimpleIndicatorSignalMacdParams5_35_5 {
670
+ f: 5;
671
+ s: 35;
672
+ sgp: 5;
673
+ }
674
+ interface V {
675
+ hist: string;
676
+ macd: string;
677
+ macds: string;
678
+ }
679
+ }
680
+ export interface SimpleMovingAverageIndicator {
681
+ cd: string;
682
+ cdttmu: string;
683
+ ind: 'moving_average';
684
+ p: SimpleMovingAverageIndicator.P;
685
+ st: 'REALTIME';
686
+ /**
687
+ * Candle timeframe used to calculate an indicator
688
+ */
689
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
690
+ tms: number;
691
+ ty: 'indicator';
692
+ v: SimpleMovingAverageIndicator.V;
693
+ }
694
+ export declare namespace SimpleMovingAverageIndicator {
695
+ interface P {
696
+ p: 3 | 5 | 7 | 10 | 15 | 20 | 25 | 30 | 50 | 60 | 90 | 99 | 100 | 120 | 200;
697
+ /**
698
+ * Moving average calculation type
699
+ */
700
+ t: 'SMA' | 'EMA';
701
+ }
702
+ interface V {
703
+ value: string;
704
+ }
705
+ }
706
+ export interface SimpleMovingAverageIndicatorSignal {
707
+ cd: string;
708
+ cdttmu: string;
709
+ /**
710
+ * Empty condition parameters for a trigger without event parameters
711
+ */
712
+ ep: {
713
+ [key: string]: unknown;
714
+ };
715
+ ind: 'moving_average';
716
+ p: SimpleMovingAverageIndicatorSignal.P;
717
+ st: 'REALTIME';
718
+ /**
719
+ * Candle timeframe used to calculate an indicator
720
+ */
721
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
722
+ tms: number;
723
+ tr: 'price_cross_above' | 'price_cross_below';
724
+ ty: 'indicator_signal';
725
+ v: SimpleMovingAverageIndicatorSignal.V;
726
+ }
727
+ export declare namespace SimpleMovingAverageIndicatorSignal {
728
+ interface P {
729
+ p: 5 | 10 | 20 | 30 | 60 | 90 | 120 | 200;
730
+ /**
731
+ * Moving average calculation type
732
+ */
733
+ t: 'SMA' | 'EMA';
734
+ }
735
+ interface V {
736
+ value: string;
737
+ }
738
+ }
739
+ export interface SimpleRsiIndicator {
740
+ cd: string;
741
+ cdttmu: string;
742
+ ind: 'rsi';
743
+ p: SimpleRsiIndicator.P;
744
+ st: 'REALTIME';
745
+ /**
746
+ * Candle timeframe used to calculate an indicator
747
+ */
748
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
749
+ tms: number;
750
+ ty: 'indicator';
751
+ v: SimpleRsiIndicator.V;
752
+ }
753
+ export declare namespace SimpleRsiIndicator {
754
+ interface P {
755
+ p: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 25;
756
+ }
757
+ interface V {
758
+ rsi: string;
759
+ }
760
+ }
761
+ export interface SimpleRsiOverboughtIndicatorSignal {
762
+ cd: string;
763
+ cdttmu: string;
764
+ ep: SimpleRsiOverboughtIndicatorSignal.Ep;
765
+ ind: 'rsi';
766
+ p: SimpleRsiOverboughtIndicatorSignal.P;
767
+ st: 'REALTIME';
768
+ /**
769
+ * Candle timeframe used to calculate an indicator
770
+ */
771
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
772
+ tms: number;
773
+ tr: 'overbought';
774
+ ty: 'indicator_signal';
775
+ v: SimpleRsiOverboughtIndicatorSignal.V;
776
+ }
777
+ export declare namespace SimpleRsiOverboughtIndicatorSignal {
778
+ interface Ep {
779
+ th: 70 | 80;
780
+ }
781
+ interface P {
782
+ p: 7 | 9 | 14 | 21 | 25;
783
+ }
784
+ interface V {
785
+ rsi: string;
786
+ }
787
+ }
788
+ export interface SimpleRsiOversoldIndicatorSignal {
789
+ cd: string;
790
+ cdttmu: string;
791
+ ep: SimpleRsiOversoldIndicatorSignal.Ep;
792
+ ind: 'rsi';
793
+ p: SimpleRsiOversoldIndicatorSignal.P;
794
+ st: 'REALTIME';
795
+ /**
796
+ * Candle timeframe used to calculate an indicator
797
+ */
798
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
799
+ tms: number;
800
+ tr: 'oversold';
801
+ ty: 'indicator_signal';
802
+ v: SimpleRsiOversoldIndicatorSignal.V;
803
+ }
804
+ export declare namespace SimpleRsiOversoldIndicatorSignal {
805
+ interface Ep {
806
+ th: 20 | 30;
807
+ }
808
+ interface P {
809
+ p: 7 | 9 | 14 | 21 | 25;
810
+ }
811
+ interface V {
812
+ rsi: string;
813
+ }
814
+ }
815
+ export interface SimpleVolumeIndicator {
816
+ cd: string;
817
+ cdttmu: string;
818
+ ind: 'volume';
819
+ p: SimpleVolumeIndicator.P;
820
+ st: 'REALTIME';
821
+ /**
822
+ * Candle timeframe used to calculate an indicator
823
+ */
824
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
825
+ tms: number;
826
+ ty: 'indicator';
827
+ v: SimpleVolumeIndicator.V;
828
+ }
829
+ export declare namespace SimpleVolumeIndicator {
830
+ interface P {
831
+ p: 5 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50;
832
+ }
833
+ interface V {
834
+ av: string;
835
+ rto: string;
836
+ vol: string;
837
+ }
838
+ }
839
+ export interface SimpleVolumeIndicatorSignal {
840
+ cd: string;
841
+ cdttmu: string;
842
+ ep: SimpleVolumeIndicatorSignal.Ep;
843
+ ind: 'volume';
844
+ p: SimpleVolumeIndicatorSignal.P;
845
+ st: 'REALTIME';
846
+ /**
847
+ * Candle timeframe used to calculate an indicator
848
+ */
849
+ tf: '5m' | '15m' | '60m' | '240m' | '1d';
850
+ tms: number;
851
+ tr: 'volume_spike';
852
+ ty: 'indicator_signal';
853
+ v: SimpleVolumeIndicatorSignal.V;
854
+ }
855
+ export declare namespace SimpleVolumeIndicatorSignal {
856
+ interface Ep {
857
+ mul: 2 | 3 | 5;
858
+ }
859
+ interface P {
860
+ p: 10 | 20 | 50;
861
+ }
862
+ interface V {
863
+ av: string;
864
+ rto: string;
865
+ vol: string;
866
+ }
867
+ }
868
+ export interface VolumeIndicator {
869
+ candle_date_time_utc: string;
870
+ code: string;
871
+ indicator: 'volume';
872
+ params: VolumeIndicator.Params;
873
+ stream_type: 'REALTIME';
874
+ /**
875
+ * Candle timeframe used to calculate an indicator
876
+ */
877
+ timeframe: IndicatorTimeframe;
878
+ timestamp: number;
879
+ type: 'indicator';
880
+ value: VolumeIndicator.Value;
881
+ }
882
+ export declare namespace VolumeIndicator {
883
+ interface Params {
884
+ period: 5 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50;
885
+ }
886
+ interface Value {
887
+ avg_volume: string;
888
+ ratio: string;
889
+ volume: string;
890
+ }
891
+ }
892
+ export interface VolumeIndicatorSignal {
893
+ candle_date_time_utc: string;
894
+ code: string;
895
+ event_params: VolumeIndicatorSignal.EventParams;
896
+ indicator: 'volume';
897
+ params: VolumeIndicatorSignal.Params;
898
+ stream_type: 'REALTIME';
899
+ /**
900
+ * Candle timeframe used to calculate an indicator
901
+ */
902
+ timeframe: IndicatorTimeframe;
903
+ timestamp: number;
904
+ trigger: 'volume_spike';
905
+ type: 'indicator_signal';
906
+ value: VolumeIndicatorSignal.Value;
907
+ }
908
+ export declare namespace VolumeIndicatorSignal {
909
+ interface EventParams {
910
+ multiplier: 2 | 3 | 5;
911
+ }
912
+ interface Params {
913
+ period: 10 | 20 | 50;
914
+ }
915
+ interface Value {
916
+ avg_volume: string;
917
+ ratio: string;
918
+ volume: string;
919
+ }
920
+ }
921
+ export type ConnectInfoClientEvent = Array<ConnectInfoClientEvent.WsTicketField | ConnectInfoClientEvent.WsIndicatorTypeField | ConnectInfoClientEvent.WsIndicatorFormatField | ConnectInfoClientEvent.WsIndicatorSignalTypeField>;
922
+ export declare namespace ConnectInfoClientEvent {
923
+ /**
924
+ * Ticket field that identifies the requester
925
+ */
926
+ interface WsTicketField {
927
+ /**
928
+ * A value that uniquely identifies the requester (UUID recommended)
929
+ */
930
+ ticket: string;
931
+ }
932
+ /**
933
+ * Indicator subscription data type object
934
+ */
935
+ interface WsIndicatorTypeField {
936
+ /**
937
+ * KRW market codes to subscribe to
938
+ */
939
+ codes: Array<string>;
940
+ indicators: Array<WsIndicatorTypeField.Volume | WsIndicatorTypeField.Rsi | WsIndicatorTypeField.MovingAverage | WsIndicatorTypeField.MaCrossover | WsIndicatorTypeField.BollingerBands | WsIndicatorTypeField.Macd>;
941
+ /**
942
+ * Candle timeframe used to calculate an indicator
943
+ */
944
+ timeframe: WsInfoAPI.IndicatorTimeframe;
945
+ type: 'indicator';
946
+ }
947
+ namespace WsIndicatorTypeField {
948
+ interface Volume {
949
+ params: Volume.Params;
950
+ type: 'volume';
951
+ }
952
+ namespace Volume {
953
+ interface Params {
954
+ period: 5 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50;
955
+ }
956
+ }
957
+ interface Rsi {
958
+ params: Rsi.Params;
959
+ type: 'rsi';
960
+ }
961
+ namespace Rsi {
962
+ interface Params {
963
+ period: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 25;
964
+ }
965
+ }
966
+ interface MovingAverage {
967
+ params: MovingAverage.Params;
968
+ type: 'moving_average';
969
+ }
970
+ namespace MovingAverage {
971
+ interface Params {
972
+ period: 3 | 5 | 7 | 10 | 15 | 20 | 25 | 30 | 50 | 60 | 90 | 99 | 100 | 120 | 200;
973
+ /**
974
+ * Moving average calculation type
975
+ */
976
+ type: 'SMA' | 'EMA';
977
+ }
978
+ }
979
+ interface MaCrossover {
980
+ params: MaCrossover.WsMaCrossoverIndicatorParams5_20 | MaCrossover.WsMaCrossoverIndicatorParams20_60 | MaCrossover.WsMaCrossoverIndicatorParams30_90 | MaCrossover.WsMaCrossoverIndicatorParams50_200;
981
+ type: 'ma_crossover';
982
+ }
983
+ namespace MaCrossover {
984
+ interface WsMaCrossoverIndicatorParams5_20 {
985
+ long_period: 20;
986
+ short_period: 5;
987
+ /**
988
+ * Moving average calculation type
989
+ */
990
+ type: 'SMA' | 'EMA';
991
+ }
992
+ interface WsMaCrossoverIndicatorParams20_60 {
993
+ long_period: 60;
994
+ short_period: 20;
995
+ /**
996
+ * Moving average calculation type
997
+ */
998
+ type: 'SMA' | 'EMA';
999
+ }
1000
+ interface WsMaCrossoverIndicatorParams30_90 {
1001
+ long_period: 90;
1002
+ short_period: 30;
1003
+ /**
1004
+ * Moving average calculation type
1005
+ */
1006
+ type: 'SMA' | 'EMA';
1007
+ }
1008
+ interface WsMaCrossoverIndicatorParams50_200 {
1009
+ long_period: 200;
1010
+ short_period: 50;
1011
+ /**
1012
+ * Moving average calculation type
1013
+ */
1014
+ type: 'SMA' | 'EMA';
1015
+ }
1016
+ }
1017
+ interface BollingerBands {
1018
+ params: BollingerBands.Params;
1019
+ type: 'bollinger_bands';
1020
+ }
1021
+ namespace BollingerBands {
1022
+ interface Params {
1023
+ multiplier: 1 | 1.5 | 2 | 2.5 | 3;
1024
+ period: 10 | 20 | 50;
1025
+ }
1026
+ }
1027
+ interface Macd {
1028
+ params: Macd.WsMacdIndicatorParams12_26_9 | Macd.WsMacdIndicatorParams8_17_9 | Macd.WsMacdIndicatorParams5_35_5;
1029
+ type: 'macd';
1030
+ }
1031
+ namespace Macd {
1032
+ interface WsMacdIndicatorParams12_26_9 {
1033
+ fast: 12;
1034
+ signal_period: 9;
1035
+ slow: 26;
1036
+ }
1037
+ interface WsMacdIndicatorParams8_17_9 {
1038
+ fast: 8;
1039
+ signal_period: 9;
1040
+ slow: 17;
1041
+ }
1042
+ interface WsMacdIndicatorParams5_35_5 {
1043
+ fast: 5;
1044
+ signal_period: 5;
1045
+ slow: 35;
1046
+ }
1047
+ }
1048
+ }
1049
+ /**
1050
+ * Response format specifier for indicator streams
1051
+ */
1052
+ interface WsIndicatorFormatField {
1053
+ /**
1054
+ * Response format selector
1055
+ */
1056
+ format: 'DEFAULT' | 'SIMPLE' | 'JSON_LIST' | 'SIMPLE_LIST';
1057
+ }
1058
+ /**
1059
+ * Indicator signal subscription data type object
1060
+ */
1061
+ interface WsIndicatorSignalTypeField {
1062
+ /**
1063
+ * KRW market codes to subscribe to
1064
+ */
1065
+ codes: Array<string>;
1066
+ indicators: Array<WsIndicatorSignalTypeField.Volume | WsInfoAPI.RsiOverboughtIndicatorSignalRequest | WsInfoAPI.RsiOversoldIndicatorSignalRequest | WsIndicatorSignalTypeField.MovingAverage | WsIndicatorSignalTypeField.MaCrossover | WsIndicatorSignalTypeField.BollingerBands | WsIndicatorSignalTypeField.Macd>;
1067
+ /**
1068
+ * Candle timeframe used to calculate an indicator
1069
+ */
1070
+ timeframe: WsInfoAPI.IndicatorTimeframe;
1071
+ type: 'indicator_signal';
1072
+ }
1073
+ namespace WsIndicatorSignalTypeField {
1074
+ interface Volume {
1075
+ event_params: Volume.EventParams;
1076
+ params: Volume.Params;
1077
+ trigger: 'volume_spike';
1078
+ type: 'volume';
1079
+ }
1080
+ namespace Volume {
1081
+ interface EventParams {
1082
+ multiplier: 2 | 3 | 5;
1083
+ }
1084
+ interface Params {
1085
+ period: 10 | 20 | 50;
1086
+ }
1087
+ }
1088
+ interface MovingAverage {
1089
+ params: MovingAverage.Params;
1090
+ trigger: 'price_cross_above' | 'price_cross_below';
1091
+ type: 'moving_average';
1092
+ }
1093
+ namespace MovingAverage {
1094
+ interface Params {
1095
+ period: 5 | 10 | 20 | 30 | 60 | 90 | 120 | 200;
1096
+ /**
1097
+ * Moving average calculation type
1098
+ */
1099
+ type: 'SMA' | 'EMA';
1100
+ }
1101
+ }
1102
+ interface MaCrossover {
1103
+ params: MaCrossover.WsIndicatorSignalMaCrossoverParams5_20 | MaCrossover.WsIndicatorSignalMaCrossoverParams20_60 | MaCrossover.WsIndicatorSignalMaCrossoverParams30_90 | MaCrossover.WsIndicatorSignalMaCrossoverParams50_200;
1104
+ trigger: 'golden_cross' | 'dead_cross';
1105
+ type: 'ma_crossover';
1106
+ }
1107
+ namespace MaCrossover {
1108
+ interface WsIndicatorSignalMaCrossoverParams5_20 {
1109
+ long_period: 20;
1110
+ short_period: 5;
1111
+ /**
1112
+ * Moving average calculation type
1113
+ */
1114
+ type: 'SMA' | 'EMA';
1115
+ }
1116
+ interface WsIndicatorSignalMaCrossoverParams20_60 {
1117
+ long_period: 60;
1118
+ short_period: 20;
1119
+ /**
1120
+ * Moving average calculation type
1121
+ */
1122
+ type: 'SMA' | 'EMA';
1123
+ }
1124
+ interface WsIndicatorSignalMaCrossoverParams30_90 {
1125
+ long_period: 90;
1126
+ short_period: 30;
1127
+ /**
1128
+ * Moving average calculation type
1129
+ */
1130
+ type: 'SMA' | 'EMA';
1131
+ }
1132
+ interface WsIndicatorSignalMaCrossoverParams50_200 {
1133
+ long_period: 200;
1134
+ short_period: 50;
1135
+ /**
1136
+ * Moving average calculation type
1137
+ */
1138
+ type: 'SMA' | 'EMA';
1139
+ }
1140
+ }
1141
+ interface BollingerBands {
1142
+ params: BollingerBands.Params;
1143
+ trigger: 'price_cross_above' | 'price_cross_below';
1144
+ type: 'bollinger_bands';
1145
+ }
1146
+ namespace BollingerBands {
1147
+ interface Params {
1148
+ multiplier: 1.5 | 2 | 2.5;
1149
+ period: 20;
1150
+ }
1151
+ }
1152
+ interface Macd {
1153
+ params: Macd.WsIndicatorSignalMacdParams12_26_9 | Macd.WsIndicatorSignalMacdParams8_17_9 | Macd.WsIndicatorSignalMacdParams5_35_5;
1154
+ trigger: 'golden_cross' | 'dead_cross' | 'zero_cross_above' | 'zero_cross_below';
1155
+ type: 'macd';
1156
+ }
1157
+ namespace Macd {
1158
+ interface WsIndicatorSignalMacdParams12_26_9 {
1159
+ fast: 12;
1160
+ signal_period: 9;
1161
+ slow: 26;
1162
+ }
1163
+ interface WsIndicatorSignalMacdParams8_17_9 {
1164
+ fast: 8;
1165
+ signal_period: 9;
1166
+ slow: 17;
1167
+ }
1168
+ interface WsIndicatorSignalMacdParams5_35_5 {
1169
+ fast: 5;
1170
+ signal_period: 5;
1171
+ slow: 35;
1172
+ }
1173
+ }
1174
+ }
1175
+ }
1176
+ export type ConnectInfoServerEvent = VolumeIndicator | RsiIndicator | MovingAverageIndicator | MaCrossoverIndicator | BollingerBandsIndicator | MacdIndicator | VolumeIndicatorSignal | RsiOverboughtIndicatorSignal | RsiOversoldIndicatorSignal | MovingAverageIndicatorSignal | MaCrossoverIndicatorSignal | BollingerBandsIndicatorSignal | MacdIndicatorSignal;
1177
+ export declare namespace WsInfo {
1178
+ export { type BollingerBandsIndicator as BollingerBandsIndicator, type BollingerBandsIndicatorSignal as BollingerBandsIndicatorSignal, type Indicator as Indicator, type IndicatorSignal as IndicatorSignal, type IndicatorTimeframe as IndicatorTimeframe, type IndicatorType as IndicatorType, type MaCrossoverIndicator as MaCrossoverIndicator, type MaCrossoverIndicatorSignal as MaCrossoverIndicatorSignal, type MacdIndicator as MacdIndicator, type MacdIndicatorSignal as MacdIndicatorSignal, type MovingAverageIndicator as MovingAverageIndicator, type MovingAverageIndicatorSignal as MovingAverageIndicatorSignal, type RsiIndicator as RsiIndicator, type RsiIndicatorSignal as RsiIndicatorSignal, type RsiOverboughtIndicatorSignal as RsiOverboughtIndicatorSignal, type RsiOverboughtIndicatorSignalRequest as RsiOverboughtIndicatorSignalRequest, type RsiOversoldIndicatorSignal as RsiOversoldIndicatorSignal, type RsiOversoldIndicatorSignalRequest as RsiOversoldIndicatorSignalRequest, type SimpleBollingerBandsIndicator as SimpleBollingerBandsIndicator, type SimpleBollingerBandsIndicatorSignal as SimpleBollingerBandsIndicatorSignal, type SimpleInfoServerEvent as SimpleInfoServerEvent, type SimpleMaCrossoverIndicator as SimpleMaCrossoverIndicator, type SimpleMaCrossoverIndicatorSignal as SimpleMaCrossoverIndicatorSignal, type SimpleMacdIndicator as SimpleMacdIndicator, type SimpleMacdIndicatorSignal as SimpleMacdIndicatorSignal, type SimpleMovingAverageIndicator as SimpleMovingAverageIndicator, type SimpleMovingAverageIndicatorSignal as SimpleMovingAverageIndicatorSignal, type SimpleRsiIndicator as SimpleRsiIndicator, type SimpleRsiOverboughtIndicatorSignal as SimpleRsiOverboughtIndicatorSignal, type SimpleRsiOversoldIndicatorSignal as SimpleRsiOversoldIndicatorSignal, type SimpleVolumeIndicator as SimpleVolumeIndicator, type SimpleVolumeIndicatorSignal as SimpleVolumeIndicatorSignal, type VolumeIndicator as VolumeIndicator, type VolumeIndicatorSignal as VolumeIndicatorSignal, type ConnectInfoClientEvent as ConnectInfoClientEvent, type ConnectInfoServerEvent as ConnectInfoServerEvent, };
1179
+ }
1180
+ //# sourceMappingURL=ws-info.d.ts.map