@invezgo/sdk 1.3.1 → 2.0.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.
Files changed (56) hide show
  1. package/README.md +318 -313
  2. package/dist/cache.d.ts +27 -0
  3. package/dist/cache.d.ts.map +1 -0
  4. package/dist/client.d.ts +15 -18
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/errors.d.ts +71 -0
  7. package/dist/errors.d.ts.map +1 -0
  8. package/dist/generated/resources.d.ts +3291 -0
  9. package/dist/generated/resources.d.ts.map +1 -0
  10. package/dist/generated/types.d.ts +3449 -0
  11. package/dist/generated/types.d.ts.map +1 -0
  12. package/dist/http.d.ts +66 -0
  13. package/dist/http.d.ts.map +1 -0
  14. package/dist/index.d.ts +9 -15
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +755 -1005
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +775 -0
  19. package/dist/index.mjs.map +1 -0
  20. package/package.json +66 -60
  21. package/dist/endpoints/ai.d.ts +0 -98
  22. package/dist/endpoints/ai.d.ts.map +0 -1
  23. package/dist/endpoints/alerts.d.ts +0 -49
  24. package/dist/endpoints/alerts.d.ts.map +0 -1
  25. package/dist/endpoints/analysis.d.ts +0 -369
  26. package/dist/endpoints/analysis.d.ts.map +0 -1
  27. package/dist/endpoints/health.d.ts +0 -24
  28. package/dist/endpoints/health.d.ts.map +0 -1
  29. package/dist/endpoints/journals.d.ts +0 -49
  30. package/dist/endpoints/journals.d.ts.map +0 -1
  31. package/dist/endpoints/membership.d.ts +0 -35
  32. package/dist/endpoints/membership.d.ts.map +0 -1
  33. package/dist/endpoints/portfolios.d.ts +0 -14
  34. package/dist/endpoints/portfolios.d.ts.map +0 -1
  35. package/dist/endpoints/posts.d.ts +0 -42
  36. package/dist/endpoints/posts.d.ts.map +0 -1
  37. package/dist/endpoints/profile.d.ts +0 -34
  38. package/dist/endpoints/profile.d.ts.map +0 -1
  39. package/dist/endpoints/recommendation.d.ts +0 -10
  40. package/dist/endpoints/recommendation.d.ts.map +0 -1
  41. package/dist/endpoints/screener.d.ts +0 -45
  42. package/dist/endpoints/screener.d.ts.map +0 -1
  43. package/dist/endpoints/search.d.ts +0 -18
  44. package/dist/endpoints/search.d.ts.map +0 -1
  45. package/dist/endpoints/trades.d.ts +0 -31
  46. package/dist/endpoints/trades.d.ts.map +0 -1
  47. package/dist/endpoints/usage.d.ts +0 -11
  48. package/dist/endpoints/usage.d.ts.map +0 -1
  49. package/dist/endpoints/watchlists.d.ts +0 -64
  50. package/dist/endpoints/watchlists.d.ts.map +0 -1
  51. package/dist/index.esm.js +0 -1054
  52. package/dist/index.esm.js.map +0 -1
  53. package/dist/invezgo.d.ts +0 -40
  54. package/dist/invezgo.d.ts.map +0 -1
  55. package/dist/types.d.ts +0 -574
  56. package/dist/types.d.ts.map +0 -1
@@ -0,0 +1,3449 @@
1
+ export interface ScreenRequest {
2
+ /** Formula untuk screening saham */
3
+ formula: string;
4
+ /** Kategori indeks saham yang ingin disaring (opsional, bisa multi seperti ["SYARIAH", "IDXENERGY"]) */
5
+ category?: string[] | null;
6
+ }
7
+ export interface SaveScreenerRequest {
8
+ name: string;
9
+ description?: string | null;
10
+ scope?: string[] | null;
11
+ formula: string;
12
+ /** Kategori indeks saham yang ingin disaring (opsional, bisa multi seperti ["SYARIAH", "IDXENERGY"]) */
13
+ category?: string[] | null;
14
+ }
15
+ export interface UpdateScreenerRequest {
16
+ name: string;
17
+ description?: string | null;
18
+ scope?: string[] | null;
19
+ formula: string;
20
+ /** Kategori indeks saham yang ingin disaring (opsional, bisa multi seperti ["SYARIAH", "IDXENERGY"]) */
21
+ category?: string[] | null;
22
+ }
23
+ export interface AddWatchlistRequest {
24
+ group: string;
25
+ code: string;
26
+ price: number;
27
+ note?: string | null;
28
+ scope: string[];
29
+ }
30
+ export interface WatchlistGroupRequest {
31
+ name: string;
32
+ }
33
+ export interface UpdateWatchlistRequest {
34
+ group: string;
35
+ price: number;
36
+ }
37
+ export interface NoteRequest {
38
+ note?: string | null;
39
+ }
40
+ export interface AddJournalRequest {
41
+ code: string;
42
+ broker: string;
43
+ date: string;
44
+ lot: number;
45
+ fee: number;
46
+ price: number;
47
+ status?: string | null;
48
+ scope: string[];
49
+ note?: string | null;
50
+ }
51
+ export interface NoteJournalRequest {
52
+ note?: string | null;
53
+ }
54
+ export interface AlertRequest {
55
+ name: string;
56
+ description?: string | null;
57
+ /** Kategori indeks saham yang ingin disaring (opsional, bisa multi seperti ["SYARIAH", "IDXENERGY"]) */
58
+ category?: string[] | null;
59
+ every: string;
60
+ send: string;
61
+ scope?: string[] | null;
62
+ formula: string;
63
+ }
64
+ export interface TestAlertRequest {
65
+ formula: string;
66
+ /** Kategori indeks saham yang ingin disaring (opsional, bisa multi seperti ["SYARIAH", "IDXENERGY"]) */
67
+ category?: string[] | null;
68
+ }
69
+ export interface UpdateAlertRequest {
70
+ name: string;
71
+ description?: string | null;
72
+ /** Kategori indeks saham yang ingin disaring (opsional, bisa multi seperti ["SYARIAH", "IDXENERGY"]) */
73
+ category?: string[] | null;
74
+ every: string;
75
+ send: string;
76
+ formula: string;
77
+ scope?: string[] | null;
78
+ }
79
+ export interface NoteTradeRequest {
80
+ note?: string | null;
81
+ }
82
+ export interface DeleteIdsRequest {
83
+ /** IDs to delete */
84
+ id: string[];
85
+ }
86
+ /** Listed company. */
87
+ export interface StockListItem {
88
+ /** Stock code (e.g. BBCA). */
89
+ code: string;
90
+ /** Company name without the PT prefix. */
91
+ name: string;
92
+ /** Stock sector; null when not yet available. */
93
+ sector: string | null;
94
+ /** Company icon image URL; null when not yet available. */
95
+ logo: string | null;
96
+ }
97
+ /** Broker. */
98
+ export interface BrokerListItem {
99
+ /** Two-letter broker code (e.g. AD, YP). */
100
+ code: string;
101
+ /** Full securities company name. */
102
+ name: string;
103
+ }
104
+ /** Index. */
105
+ export interface IndexListItem {
106
+ /** Index code (e.g. COMPOSITE, LQ45, IDXFINANCE). */
107
+ code: string;
108
+ /** Full index name. */
109
+ name: string;
110
+ /** Index category. */
111
+ category: "headline" | "sector" | "sharia" | "esg" | "factor" | "thematic" | "board" | "partnership" | "smc";
112
+ }
113
+ export interface UmaResponse {
114
+ /** Total number of pages for the given limit (0 when there is no data) */
115
+ totalPage: number;
116
+ /** Current page number (echo of the page query) */
117
+ page: number;
118
+ /** Next page number, null on the last page */
119
+ nextPage: number | null;
120
+ /** UMA announcements, newest date first then code ascending */
121
+ data: UmaData[];
122
+ }
123
+ /** One item of data */
124
+ export interface UmaData {
125
+ /** Stock code */
126
+ code: string;
127
+ /** UMA announcement date. WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00Z. */
128
+ date: string;
129
+ }
130
+ export interface SuspendResponse {
131
+ /** Total number of pages for the given limit (0 when there is no data) */
132
+ totalPage: number;
133
+ /** Current page number (echo of the page query) */
134
+ page: number;
135
+ /** Next page number, null on the last page */
136
+ nextPage: number | null;
137
+ /** Trading suspensions, newest start_date first then code ascending */
138
+ data: SuspendData[];
139
+ }
140
+ /** One item of data */
141
+ export interface SuspendData {
142
+ /** Stock code */
143
+ code: string;
144
+ /** Suspension start date. WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00Z. */
145
+ start_date: string;
146
+ /** Date the suspension was lifted (same format as start_date); null while still suspended. */
147
+ end_date: string | null;
148
+ /** true while the suspension is still in effect (end_date is null). */
149
+ active: boolean;
150
+ }
151
+ /** Notation group. */
152
+ export interface NotationItem {
153
+ /** Stock code. */
154
+ code: string;
155
+ /** Notation effective date. WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z. */
156
+ date: string;
157
+ /** Notations in effect on that date, ordered by notation code. */
158
+ list: NotationList[];
159
+ }
160
+ /** Notation. */
161
+ export interface NotationList {
162
+ /** Special notation code (e.g. A, B, E, X). */
163
+ notation: string;
164
+ /** Meaning of the notation. */
165
+ description: string | null;
166
+ }
167
+ /** Company profile (latest snapshot). Additional profile fields may appear. */
168
+ export interface InformationResponse {
169
+ /** Stock code. */
170
+ code: string;
171
+ /** Head office address. */
172
+ address: string | null;
173
+ /** Industry. */
174
+ industry: string | null;
175
+ /** Sub-industry. */
176
+ subsindustry: string | null;
177
+ /** Main business activity. */
178
+ activity: string | null;
179
+ /** Company name without the PT prefix. */
180
+ name: string;
181
+ /** Company tax ID (NPWP). */
182
+ npwp: string | null;
183
+ /** IDX listing board (e.g. Utama, Pengembangan). */
184
+ board: string | null;
185
+ /** Sector. */
186
+ sector: string | null;
187
+ /** Subsector. */
188
+ subsector: string | null;
189
+ /** Exchange listing date. WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z. */
190
+ listing_date: string | null;
191
+ /** Company website. */
192
+ website: string | null;
193
+ /** Company icon image URL. */
194
+ logo: string | null;
195
+ /** Categories/indexes that include this stock (e.g. SYARIAH, IDXENERGY). */
196
+ category: string[] | null;
197
+ /** Share registrar (BAE). */
198
+ administration: string | null;
199
+ /** Company profile description. */
200
+ description: string | null;
201
+ /** Percentage of shares offered at IPO (%). */
202
+ ipo_pct: number | null;
203
+ /** IPO offering price per share (Rupiah). */
204
+ ipo_price: number | null;
205
+ /** Number of shares offered at IPO; numeric string (64-bit integer). */
206
+ ipo_share: string | null;
207
+ /** IPO underwriters. */
208
+ ipo_underwriter: string[] | null;
209
+ /** Par value per share (Rupiah). */
210
+ nominal_price: number | null;
211
+ /** Board of commissioners, sorted by name ([] if none). */
212
+ commissioner: InformationCommissioner[];
213
+ /** Board of directors, sorted by name ([] if none). */
214
+ director: InformationDirector[];
215
+ /** Subsidiaries, sorted by name ([] if none). */
216
+ subsidiary: InformationSubsidiary[];
217
+ /** Special notations in effect on the latest notation date ([] if none). */
218
+ notation: InformationNotation[];
219
+ }
220
+ /** Board member. */
221
+ export interface InformationCommissioner {
222
+ /** Person name. */
223
+ name: string;
224
+ /** Position (e.g. President Director, Independent Commissioner). */
225
+ position: string | null;
226
+ }
227
+ /** Board member. */
228
+ export interface InformationDirector {
229
+ /** Person name. */
230
+ name: string;
231
+ /** Position (e.g. President Director, Independent Commissioner). */
232
+ position: string | null;
233
+ }
234
+ /** Subsidiary. */
235
+ export interface InformationSubsidiary {
236
+ /** Subsidiary name. */
237
+ name: string;
238
+ /** Company's ownership percentage (%). */
239
+ percentage: number | null;
240
+ }
241
+ /** Notation. */
242
+ export interface InformationNotation {
243
+ /** Special notation code. */
244
+ notation: string;
245
+ /** Meaning of the notation. */
246
+ description: string | null;
247
+ }
248
+ /** Top movers for the requested date. Both arrays are empty on non-trading days. */
249
+ export interface TopChangeResponse {
250
+ /** Stocks with change > 0, largest change first. */
251
+ gain: TopChangeGain[];
252
+ /** Stocks with change < 0, most negative first. */
253
+ loss: TopChangeLoss[];
254
+ }
255
+ /** Stock entry. */
256
+ export interface TopChangeGain {
257
+ /** Stock code. */
258
+ code: string;
259
+ /** Company name. */
260
+ name: string;
261
+ /** Closing price (Rupiah). */
262
+ price: number | null;
263
+ /** Daily price change (%). */
264
+ change: number;
265
+ /** Transaction value (Rupiah). */
266
+ value: number | null;
267
+ /** Transaction volume (shares). */
268
+ volume: number | null;
269
+ /** Company icon image URL. */
270
+ logo: string | null;
271
+ /** Sort value, equal to change (%). */
272
+ calculated_value: number;
273
+ /** Last 5 IDX trading days up to the requested date, ascending ([] if no data). */
274
+ graph: TopChangeGainGraph[];
275
+ }
276
+ /** Graph point. */
277
+ export interface TopChangeGainGraph {
278
+ /** Trading date (YYYY-MM-DD). */
279
+ date: string;
280
+ /** Daily price change (%); 0 when missing. */
281
+ value: number | null;
282
+ }
283
+ /** Stock entry. */
284
+ export interface TopChangeLoss {
285
+ /** Stock code. */
286
+ code: string;
287
+ /** Company name. */
288
+ name: string;
289
+ /** Closing price (Rupiah). */
290
+ price: number | null;
291
+ /** Daily price change (%). */
292
+ change: number;
293
+ /** Transaction value (Rupiah). */
294
+ value: number | null;
295
+ /** Transaction volume (shares). */
296
+ volume: number | null;
297
+ /** Company icon image URL. */
298
+ logo: string | null;
299
+ /** Sort value, equal to change (%). */
300
+ calculated_value: number;
301
+ /** Last 5 IDX trading days up to the requested date, ascending ([] if no data). */
302
+ graph: TopChangeLossGraph[];
303
+ }
304
+ /** Graph point. */
305
+ export interface TopChangeLossGraph {
306
+ /** Trading date (YYYY-MM-DD). */
307
+ date: string;
308
+ /** Daily price change (%); 0 when missing. */
309
+ value: number | null;
310
+ }
311
+ /** Top movers for the requested date. Both arrays are empty on non-trading days. */
312
+ export interface TopForeignResponse {
313
+ /** Stocks with net foreign > 0 (accumulation), largest calculated_value first. */
314
+ accum: TopForeignAccum[];
315
+ /** Stocks with net foreign < 0 (distribution), most negative calculated_value first. */
316
+ dist: TopForeignDist[];
317
+ }
318
+ /** Stock entry. */
319
+ export interface TopForeignAccum {
320
+ /** Stock code. */
321
+ code: string;
322
+ /** Company name. */
323
+ name: string;
324
+ /** Closing price (Rupiah). */
325
+ price: number | null;
326
+ /** Daily price change (%). */
327
+ change: number;
328
+ /** Transaction value (Rupiah). */
329
+ value: number | null;
330
+ /** Transaction volume (shares). */
331
+ volume: number | null;
332
+ /** Company icon image URL. */
333
+ logo: string | null;
334
+ /** Net foreign flow relative to transaction value (%); 0 when value is 0. */
335
+ calculated_value: number;
336
+ /** Last 5 IDX trading days up to the requested date, ascending ([] if no data). */
337
+ graph: TopForeignAccumGraph[];
338
+ }
339
+ /** Graph point. */
340
+ export interface TopForeignAccumGraph {
341
+ /** Trading date (YYYY-MM-DD). */
342
+ date: string;
343
+ /** Net foreign flow relative to that day's transaction value (%); 0 when missing. */
344
+ value: number | null;
345
+ }
346
+ /** Stock entry. */
347
+ export interface TopForeignDist {
348
+ /** Stock code. */
349
+ code: string;
350
+ /** Company name. */
351
+ name: string;
352
+ /** Closing price (Rupiah). */
353
+ price: number | null;
354
+ /** Daily price change (%). */
355
+ change: number;
356
+ /** Transaction value (Rupiah). */
357
+ value: number | null;
358
+ /** Transaction volume (shares). */
359
+ volume: number | null;
360
+ /** Company icon image URL. */
361
+ logo: string | null;
362
+ /** Net foreign flow relative to transaction value (%); 0 when value is 0. */
363
+ calculated_value: number;
364
+ /** Last 5 IDX trading days up to the requested date, ascending ([] if no data). */
365
+ graph: TopForeignDistGraph[];
366
+ }
367
+ /** Graph point. */
368
+ export interface TopForeignDistGraph {
369
+ /** Trading date (YYYY-MM-DD). */
370
+ date: string;
371
+ /** Net foreign flow relative to that day's transaction value (%); 0 when missing. */
372
+ value: number | null;
373
+ }
374
+ /** Top movers for the requested date. Both arrays are empty on non-trading days. */
375
+ export interface TopAccumulationResponse {
376
+ /** Stocks with bandar ratio > 0 (accumulation), largest calculated_value first. */
377
+ accum: TopAccumulationAccum[];
378
+ /** Stocks with bandar ratio < 0 (distribution), most negative calculated_value first. */
379
+ dist: TopAccumulationDist[];
380
+ }
381
+ /** Stock entry. */
382
+ export interface TopAccumulationAccum {
383
+ /** Stock code. */
384
+ code: string;
385
+ /** Company name. */
386
+ name: string;
387
+ /** Closing price (Rupiah). */
388
+ price: number | null;
389
+ /** Daily price change (%). */
390
+ change: number;
391
+ /** Transaction value (Rupiah). */
392
+ value: number | null;
393
+ /** Transaction volume (shares). */
394
+ volume: number | null;
395
+ /** Company icon image URL. */
396
+ logo: string | null;
397
+ /** Net bandar accumulation relative to transaction volume in lots (%); 0 when volume is 0. */
398
+ calculated_value: number;
399
+ /** Last 5 IDX trading days up to the requested date, ascending ([] if no data). */
400
+ graph: TopAccumulationAccumGraph[];
401
+ }
402
+ /** Graph point. */
403
+ export interface TopAccumulationAccumGraph {
404
+ /** Trading date (YYYY-MM-DD). */
405
+ date: string;
406
+ /** Net bandar accumulation relative to that day's volume in lots (%); 0 when missing. */
407
+ value: number | null;
408
+ }
409
+ /** Stock entry. */
410
+ export interface TopAccumulationDist {
411
+ /** Stock code. */
412
+ code: string;
413
+ /** Company name. */
414
+ name: string;
415
+ /** Closing price (Rupiah). */
416
+ price: number | null;
417
+ /** Daily price change (%). */
418
+ change: number;
419
+ /** Transaction value (Rupiah). */
420
+ value: number | null;
421
+ /** Transaction volume (shares). */
422
+ volume: number | null;
423
+ /** Company icon image URL. */
424
+ logo: string | null;
425
+ /** Net bandar accumulation relative to transaction volume in lots (%); 0 when volume is 0. */
426
+ calculated_value: number;
427
+ /** Last 5 IDX trading days up to the requested date, ascending ([] if no data). */
428
+ graph: TopAccumulationDistGraph[];
429
+ }
430
+ /** Graph point. */
431
+ export interface TopAccumulationDistGraph {
432
+ /** Trading date (YYYY-MM-DD). */
433
+ date: string;
434
+ /** Net bandar accumulation relative to that day's volume in lots (%); 0 when missing. */
435
+ value: number | null;
436
+ }
437
+ /** Top movers for the requested date. Both arrays are empty on non-trading days. */
438
+ export interface TopRitelResponse {
439
+ /** Stocks with net retail > 0 (accumulation), largest calculated_value first. */
440
+ accum: TopRitelAccum[];
441
+ /** Stocks with net retail < 0 (distribution), most negative calculated_value first. */
442
+ dist: TopRitelDist[];
443
+ }
444
+ /** Stock entry. */
445
+ export interface TopRitelAccum {
446
+ /** Stock code. */
447
+ code: string;
448
+ /** Company name. */
449
+ name: string;
450
+ /** Closing price (Rupiah). */
451
+ price: number | null;
452
+ /** Daily price change (%). */
453
+ change: number;
454
+ /** Transaction value (Rupiah). */
455
+ value: number | null;
456
+ /** Transaction volume (shares). */
457
+ volume: number | null;
458
+ /** Company icon image URL. */
459
+ logo: string | null;
460
+ /** Net retail flow relative to transaction volume in lots (%); 0 when volume is 0. */
461
+ calculated_value: number;
462
+ /** Last 5 IDX trading days up to the requested date, ascending ([] if no data). */
463
+ graph: TopRitelAccumGraph[];
464
+ }
465
+ /** Graph point. */
466
+ export interface TopRitelAccumGraph {
467
+ /** Trading date (YYYY-MM-DD). */
468
+ date: string;
469
+ /** Net retail flow relative to that day's volume in lots (%); 0 when missing. */
470
+ value: number | null;
471
+ }
472
+ /** Stock entry. */
473
+ export interface TopRitelDist {
474
+ /** Stock code. */
475
+ code: string;
476
+ /** Company name. */
477
+ name: string;
478
+ /** Closing price (Rupiah). */
479
+ price: number | null;
480
+ /** Daily price change (%). */
481
+ change: number;
482
+ /** Transaction value (Rupiah). */
483
+ value: number | null;
484
+ /** Transaction volume (shares). */
485
+ volume: number | null;
486
+ /** Company icon image URL. */
487
+ logo: string | null;
488
+ /** Net retail flow relative to transaction volume in lots (%); 0 when volume is 0. */
489
+ calculated_value: number;
490
+ /** Last 5 IDX trading days up to the requested date, ascending ([] if no data). */
491
+ graph: TopRitelDistGraph[];
492
+ }
493
+ /** Graph point. */
494
+ export interface TopRitelDistGraph {
495
+ /** Trading date (YYYY-MM-DD). */
496
+ date: string;
497
+ /** Net retail flow relative to that day's volume in lots (%); 0 when missing. */
498
+ value: number | null;
499
+ }
500
+ export interface StockRunningTradeResponse {
501
+ /** Total number of pages; null for today during trading hours (08:45-16:15 WIB), when data is fetched page by page */
502
+ totalPage: number | null;
503
+ /** Current page (1-based) */
504
+ page: number;
505
+ /** Next page number; null when there is no next page */
506
+ nextPage: number | null;
507
+ /** Trades on this page */
508
+ data: StockRunningTradeData[];
509
+ }
510
+ export interface StockRunningTradeData {
511
+ /** Exchange trade number as a JSON number that can exceed 2^53 (use a big-int-aware JSON parser) */
512
+ order_id: number | null;
513
+ /** Buy-side order number (number or numeric string); null when absent */
514
+ buy_order_id: number | string | null;
515
+ /** Sell-side order number (number or numeric string); null when absent */
516
+ sell_order_id: number | string | null;
517
+ /** Market board (RG, NG, TN); RG when not specified */
518
+ board: string;
519
+ /** Trade time, HH:mm:ss WIB */
520
+ time: string;
521
+ /** Trade price (Rupiah) */
522
+ price: number;
523
+ /** Trade volume (shares) */
524
+ volume: number;
525
+ /** Buyer broker code (2 characters); empty string when unknown */
526
+ buyer: string;
527
+ /** Seller broker code (2 characters); empty string when unknown */
528
+ seller: string;
529
+ /** Buyer investor type: D = domestic, F = foreign; empty string when unknown */
530
+ buyer_dom: string;
531
+ /** Seller investor type: D = domestic, F = foreign; empty string when unknown */
532
+ seller_dom: string;
533
+ /** Aggressor side of the trade */
534
+ type: "BUY" | "SELL" | "UNKNOWN";
535
+ /** Average price (Rupiah); equals price when unavailable */
536
+ avg_price: number;
537
+ }
538
+ export interface IntradayChartItem {
539
+ /** Candle minute, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T09:01:00.000Z */
540
+ date: string;
541
+ /** Opening price of the minute (Rupiah) */
542
+ open: number | null;
543
+ /** Highest price of the minute (Rupiah) */
544
+ high: number | null;
545
+ /** Lowest price of the minute (Rupiah) */
546
+ low: number | null;
547
+ /** Closing price of the minute (Rupiah) */
548
+ close: number | null;
549
+ /** Trading volume of the minute (shares) */
550
+ volume?: number | null;
551
+ /** Trade frequency of the minute (count); absent in overnight data 23:00-04:00 WIB */
552
+ freq?: number | null;
553
+ /** Trading value of the minute (Rupiah); absent in overnight data 23:00-04:00 WIB */
554
+ value?: number | null;
555
+ }
556
+ export interface OrderBookResponse {
557
+ /** Stock code; carries the market suffix when market is not RG (e.g. BBCANG) */
558
+ code: string;
559
+ /** Buy queue levels, ordered from level 1 (best bid) */
560
+ bid: Array<Record<string, number | null>>;
561
+ /** Sell queue levels, ordered from level 1 (best offer) */
562
+ offer: Array<Record<string, number | null>>;
563
+ }
564
+ export interface OrderQueueItem {
565
+ /** Order entry time, HH:mm:ss WIB; null when not available */
566
+ time: string | null;
567
+ /** Exchange order ID (string); null when not available */
568
+ order_id: string | null;
569
+ /** Original order volume (shares) */
570
+ order_volume: number | null;
571
+ /** Volume still queued / unfilled (shares) */
572
+ open_volume: number | null;
573
+ /** Filled volume = order_volume - open_volume (shares) */
574
+ done_volume: number;
575
+ /** Order value = price x order_volume (Rupiah) */
576
+ order_value: number;
577
+ /** Queued value = price x open_volume (Rupiah) */
578
+ open_value: number;
579
+ /** Filled value = price x done_volume (Rupiah) */
580
+ done_value: number;
581
+ }
582
+ export interface IntradayDataResponse {
583
+ /** Stock code (without market suffix) */
584
+ code: string;
585
+ /** Opening price (Rupiah) */
586
+ open: number | null;
587
+ /** Highest price (Rupiah) */
588
+ high: number | null;
589
+ /** Lowest price (Rupiah) */
590
+ low: number | null;
591
+ /** Last / closing price (Rupiah) */
592
+ close: number | null;
593
+ /** Average price (Rupiah); equals close for historical data */
594
+ avg: number | null;
595
+ /** Trading volume (shares) */
596
+ volume: number | null;
597
+ /** Trade frequency (count) */
598
+ freq: number | null;
599
+ /** Trading value (Rupiah) */
600
+ value: number | null;
601
+ /** Previous trading day's closing price (Rupiah) */
602
+ prev: number | null;
603
+ /** Best bid price (Rupiah) */
604
+ bid_price: number | null;
605
+ /** Queued volume at the best bid */
606
+ bid_lot: number | null;
607
+ /** Number of orders at the best bid */
608
+ bid_freq: number | null;
609
+ /** Best offer price (Rupiah) */
610
+ offer_price: number | null;
611
+ /** Queued volume at the best offer */
612
+ offer_lot: number | null;
613
+ /** Number of orders at the best offer */
614
+ offer_freq: number | null;
615
+ /** Indicative Equilibrium Price during pre-opening/pre-closing (Rupiah); 0 for historical data */
616
+ iep: number | null;
617
+ /** Indicative Equilibrium Volume during pre-opening/pre-closing; 0 for historical data */
618
+ iev: number | null;
619
+ }
620
+ /** Index snapshot. During trading hours a key is omitted when it is not available; outside trading hours every key is present. */
621
+ export interface IntradayIndexResponse {
622
+ /** Index code */
623
+ code: string;
624
+ /** Index opening value; may be a numeric string outside trading hours */
625
+ open: number | string | null;
626
+ /** Index highest value; may be a numeric string outside trading hours */
627
+ high: number | string | null;
628
+ /** Index lowest value; may be a numeric string outside trading hours */
629
+ low: number | string | null;
630
+ /** Index last / closing value; may be a numeric string outside trading hours */
631
+ close: number | string | null;
632
+ /** Trading volume (shares) */
633
+ volume: number | null;
634
+ /** Trade frequency (count) */
635
+ freq: number | null;
636
+ /** Trading value (Rupiah) */
637
+ value: number | null;
638
+ /** Index closing value on the previous trading day; may be a numeric string outside trading hours */
639
+ prev: number | string | null;
640
+ /** Number of advancing stocks */
641
+ positive: number | null;
642
+ /** Number of declining stocks */
643
+ negative: number | null;
644
+ /** Number of unchanged stocks */
645
+ neutral: number | null;
646
+ /** Number of untraded / suspended stocks */
647
+ suspend: number | null;
648
+ /** Market capitalization (Rupiah) */
649
+ market_cap: number | null;
650
+ /** Market value (Rupiah); equals value outside trading hours */
651
+ market_value: number | null;
652
+ }
653
+ export interface AdvanceChartItem {
654
+ /** Trading date, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
655
+ date: string;
656
+ /** Opening price (Rupiah) */
657
+ open?: number | null;
658
+ /** Highest price (Rupiah) */
659
+ high?: number | null;
660
+ /** Lowest price (Rupiah) */
661
+ low?: number | null;
662
+ /** Closing price (Rupiah); today's candle uses the realtime price during trading hours */
663
+ close?: number | null;
664
+ /** Trading volume (shares) */
665
+ volume?: number | null;
666
+ }
667
+ export interface IndexChartItem {
668
+ /** Trading date, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
669
+ date: string;
670
+ /** Index opening value */
671
+ open: number | null;
672
+ /** Index highest value */
673
+ high: number | null;
674
+ /** Index lowest value */
675
+ low: number | null;
676
+ /** Index closing value; today's candle uses the realtime value during trading hours */
677
+ close: number | null;
678
+ /** Trading volume (shares) */
679
+ volume: number | null;
680
+ }
681
+ export interface MultiTimeChartItem {
682
+ /** Candle start time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T09:01:00.000Z */
683
+ date: string;
684
+ /** Opening price/value of the candle */
685
+ open: number | null;
686
+ /** Highest price/value of the candle */
687
+ high: number | null;
688
+ /** Lowest price/value of the candle */
689
+ low: number | null;
690
+ /** Closing price/value of the candle */
691
+ close: number | null;
692
+ /** Candle trading volume (shares); absent when not available */
693
+ volume?: number | null;
694
+ }
695
+ export interface IndicatorChartItem {
696
+ /** Trading date, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
697
+ date: string;
698
+ /** Value of the requested indicator on that date; may be a numeric string for high-precision values, null when not available */
699
+ value: number | string | null;
700
+ }
701
+ export interface ShareholderDetailItem {
702
+ /** Stock code */
703
+ code: string;
704
+ /** Shareholder name */
705
+ name: string;
706
+ /** Ownership report date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
707
+ date: string;
708
+ /** Number of shares held (shares) (numeric string) */
709
+ val: string;
710
+ /** Ownership percentage of total shares (%) */
711
+ percent: number;
712
+ }
713
+ export interface ShareholderOneDetailItem {
714
+ /** Stock code */
715
+ code: string;
716
+ /** Shareholder name (ownership above 1%) */
717
+ name: string;
718
+ /** KSEI investor type code, e.g. CP, ID, IB, IS, PF, MF, SC, FD, OT */
719
+ type: string;
720
+ /** Investor status: LOCAL or FOREIGN */
721
+ status: string;
722
+ /** Shareholder nationality (empty string for non-individuals) */
723
+ nationality: string;
724
+ /** Shareholder domicile */
725
+ domicile: string;
726
+ /** Scripless shares held (shares) (numeric string) */
727
+ scripless: string;
728
+ /** Scrip (certificated) shares held (shares) (numeric string) */
729
+ scrip: string;
730
+ /** Total shares held, scripless + scrip (shares) (numeric string) */
731
+ total: string;
732
+ /** Ownership percentage of total shares (%) */
733
+ percentage: number;
734
+ }
735
+ export interface ShareholderHighItem {
736
+ /** Stock code */
737
+ code: string;
738
+ /** Latest high-concentration report date for the stock; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
739
+ date: string;
740
+ /** High ownership concentration percentage (%) */
741
+ percentage: number;
742
+ }
743
+ export interface ShareholderNumberItem {
744
+ /** Stock code */
745
+ code: string;
746
+ /** Data date (date-only value, time is always 00:00:00); WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
747
+ date: string;
748
+ /** Number of shareholders/investors (people) */
749
+ value: number;
750
+ /** Stock price from the latest KSEI record on or before the date (Rupiah); null when none (numeric string) */
751
+ price: string | null;
752
+ }
753
+ /** Bidirectional shareholder relation graph */
754
+ export interface ShareholderRelationResponse {
755
+ /** Graph nodes sorted by depth, type, then label */
756
+ nodes: Array<ShareholderRelationNodesStock | ShareholderRelationNodesEntity>;
757
+ /** Ownership edges stock -> shareholder, sorted by percentage descending */
758
+ edges: ShareholderRelationEdges[];
759
+ }
760
+ /**
761
+ * Stock node
762
+ *
763
+ * One variant of a discriminated union (switch on `type`).
764
+ */
765
+ export interface ShareholderRelationNodesStock {
766
+ /** Node ID: stock:<CODE> or entity:<NORMALIZED NAME> */
767
+ id: string;
768
+ /** Node type */
769
+ type: "stock";
770
+ /** Node classification: root for the starting node, stock for other stock nodes; for entities individual, corporate, institution, other or unknown */
771
+ kind: "root" | "stock" | "individual" | "corporate" | "institution" | "other" | "unknown";
772
+ /** Display label (stock code or cleaned entity name) */
773
+ label: string;
774
+ /** true when the node is the search starting point */
775
+ root: boolean;
776
+ /** Hop distance from the root node (0 = root) */
777
+ depth: number;
778
+ /** Largest ownership percentage among the node's relations (%); null when unknown */
779
+ percentage: number | null;
780
+ /** Preferred relation source for the node (priority subsidiary > ksei > ubo > idx); absent when the node has no relation */
781
+ source_type?: "subsidiary" | "ksei" | "ubo" | "idx";
782
+ /** Stock code */
783
+ code: string;
784
+ /** Company name; null when unavailable */
785
+ company_name: string | null;
786
+ /** Company icon image URL; null when unavailable */
787
+ logo: string | null;
788
+ }
789
+ /**
790
+ * Entity (shareholder) node
791
+ *
792
+ * One variant of a discriminated union (switch on `type`).
793
+ */
794
+ export interface ShareholderRelationNodesEntity {
795
+ /** Node ID: stock:<CODE> or entity:<NORMALIZED NAME> */
796
+ id: string;
797
+ /** Node type */
798
+ type: "entity";
799
+ /** Node classification: root for the starting node, stock for other stock nodes; for entities individual, corporate, institution, other or unknown */
800
+ kind: "root" | "stock" | "individual" | "corporate" | "institution" | "other" | "unknown";
801
+ /** Display label (stock code or cleaned entity name) */
802
+ label: string;
803
+ /** true when the node is the search starting point */
804
+ root: boolean;
805
+ /** Hop distance from the root node (0 = root) */
806
+ depth: number;
807
+ /** Largest ownership percentage among the node's relations (%); null when unknown */
808
+ percentage: number | null;
809
+ /** Preferred relation source for the node (priority subsidiary > ksei > ubo > idx); absent when the node has no relation */
810
+ source_type?: "subsidiary" | "ksei" | "ubo" | "idx";
811
+ /** Shareholder/entity name */
812
+ name: string;
813
+ /** KSEI investor type code (e.g. CP, ID, IB); null when unavailable */
814
+ entity_type: string | null;
815
+ /** Investor status (e.g. LOCAL, FOREIGN); null when unavailable */
816
+ entity_status: string | null;
817
+ /** Nationality; null when unavailable */
818
+ nationality: string | null;
819
+ /** Domicile; null when unavailable */
820
+ domicile: string | null;
821
+ }
822
+ export interface ShareholderRelationEdges {
823
+ /** Edge ID: <source>|<target> */
824
+ id: string;
825
+ /** Stock node ID (stock:<CODE>) */
826
+ source: string;
827
+ /** Shareholder node ID (entity:<NORMALIZED NAME>) */
828
+ target: string;
829
+ /** Code of the stock that is held */
830
+ code: string;
831
+ /** Shareholder name */
832
+ name: string;
833
+ /** Shareholder name uppercased with whitespace collapsed */
834
+ normalized_name: string;
835
+ /** Ownership percentage (%); null when unknown */
836
+ percentage: number | null;
837
+ /** Visualization weight: the percentage, or 0.5 when the percentage is null */
838
+ weight: number;
839
+ /** Relation data source */
840
+ source_type: "subsidiary" | "ksei" | "ubo" | "idx";
841
+ }
842
+ export interface ShareholderItem {
843
+ /** Shareholder name (treasury, total and public/masyarakat rows are excluded) */
844
+ name: string;
845
+ /** Ownership percentage on the latest report date (%) */
846
+ percentage: number;
847
+ /** Roles as curly-brace text, e.g. {PENGENDALI}, {DIREKSI,KOMISARIS}, or {} when none; null when not recorded */
848
+ badge: string | null;
849
+ }
850
+ export interface ShareholderKSEIItem {
851
+ /** Stock code */
852
+ code: string;
853
+ /** KSEI monthly data date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
854
+ date: string;
855
+ /** Stock price on the data date (Rupiah) (numeric string) */
856
+ price: string;
857
+ /** Shares held by foreign Insurance (IS) investors (shares) (numeric string) */
858
+ foreign_is: string;
859
+ /** Shares held by foreign Corporate (CP) investors (shares) (numeric string) */
860
+ foreign_cp: string;
861
+ /** Shares held by foreign Pension Fund (PF) investors (shares) (numeric string) */
862
+ foreign_pf: string;
863
+ /** Shares held by foreign Financial Institution (IB) investors (shares) (numeric string) */
864
+ foreign_ib: string;
865
+ /** Shares held by foreign Individual (ID) investors (shares) (numeric string) */
866
+ foreign_id: string;
867
+ /** Shares held by foreign Mutual Fund (MF) investors (shares) (numeric string) */
868
+ foreign_mf: string;
869
+ /** Shares held by foreign Securities (SC) investors (shares) (numeric string) */
870
+ foreign_sc: string;
871
+ /** Shares held by foreign Foundation (FD) investors (shares) (numeric string) */
872
+ foreign_fd: string;
873
+ /** Shares held by foreign Other (OT) investors (shares) (numeric string) */
874
+ foreign_ot: string;
875
+ /** Shares held by local Insurance (IS) investors (shares) (numeric string) */
876
+ local_is: string;
877
+ /** Shares held by local Corporate (CP) investors (shares) (numeric string) */
878
+ local_cp: string;
879
+ /** Shares held by local Pension Fund (PF) investors (shares) (numeric string) */
880
+ local_pf: string;
881
+ /** Shares held by local Financial Institution (IB) investors (shares) (numeric string) */
882
+ local_ib: string;
883
+ /** Shares held by local Individual (ID) investors (shares) (numeric string) */
884
+ local_id: string;
885
+ /** Shares held by local Mutual Fund (MF) investors (shares) (numeric string) */
886
+ local_mf: string;
887
+ /** Shares held by local Securities (SC) investors (shares) (numeric string) */
888
+ local_sc: string;
889
+ /** Shares held by local Foundation (FD) investors (shares) (numeric string) */
890
+ local_fd: string;
891
+ /** Shares held by local Other (OT) investors (shares) (numeric string) */
892
+ local_ot: string;
893
+ }
894
+ export interface ShareholderClassificationItem {
895
+ /** Stock code */
896
+ code: string;
897
+ /** Data date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
898
+ date: string;
899
+ /** Shares held by Bank investors (shares) (numeric string) */
900
+ bk: string;
901
+ /** Shares held by Government investors (shares) (numeric string) */
902
+ gv: string;
903
+ /** Shares held by Private Equity investors (shares) (numeric string) */
904
+ pe: string;
905
+ /** Shares held by Trustee Bank investors (shares) (numeric string) */
906
+ tb: string;
907
+ /** Shares held by Venture Capital investors (shares) (numeric string) */
908
+ vc: string;
909
+ /** Shares held by Private Bank investors (shares) (numeric string) */
910
+ pb: string;
911
+ /** Shares held by Exchange Traded Fund (ETF) investors (shares) (numeric string) */
912
+ ef: string;
913
+ /** Shares held by Investment Manager investors (shares) (numeric string) */
914
+ im: string;
915
+ /** Shares held by Investment Advisor investors (shares) (numeric string) */
916
+ ia: string;
917
+ /** Shares held by Brokerage Firm investors (shares) (numeric string) */
918
+ br: string;
919
+ /** Shares held by Hedge Fund investors (shares) (numeric string) */
920
+ hf: string;
921
+ /** Shares held by Sovereign Wealth Fund investors (shares) (numeric string) */
922
+ sw: string;
923
+ /** Shares held by Capital Market Supporting Institution investors (shares) (numeric string) */
924
+ cm: string;
925
+ /** Shares held by Commanditaire Vennootschap (CV) investors (shares) (numeric string) */
926
+ cv: string;
927
+ /** Shares held by Firm investors (shares) (numeric string) */
928
+ fm: string;
929
+ /** Shares held by Mutual Fund Selling Agent investors (shares) (numeric string) */
930
+ sa: string;
931
+ /** Shares held by Peer to Peer Lending investors (shares) (numeric string) */
932
+ pp: string;
933
+ /** Shares held by Permanent Establishment investors (shares) (numeric string) */
934
+ ps: string;
935
+ /** Shares held by Sole Proprietorship investors (shares) (numeric string) */
936
+ sp: string;
937
+ /** Shares held by Corporate investors (shares) (numeric string) */
938
+ cr: string;
939
+ /** Shares held by Association / Social Organization investors (shares) (numeric string) */
940
+ as: string;
941
+ /** Shares held by State-Owned Enterprise (BUMN) investors (shares) (numeric string) */
942
+ so: string;
943
+ /** Shares held by Central Bank investors (shares) (numeric string) */
944
+ cb: string;
945
+ /** Shares held by State-Owned Company investors (shares) (numeric string) */
946
+ oc: string;
947
+ /** Shares held by Diocese investors (shares) (numeric string) */
948
+ dc: string;
949
+ /** Shares held by Conference investors (shares) (numeric string) */
950
+ cn: string;
951
+ /** Shares held by Congregation investors (shares) (numeric string) */
952
+ cg: string;
953
+ /** Shares held by Cooperative investors (shares) (numeric string) */
954
+ cp: string;
955
+ /** Shares held by International Organization investors (shares) (numeric string) */
956
+ io: string;
957
+ /** Shares held by Political Party investors (shares) (numeric string) */
958
+ pl: string;
959
+ /** Shares held by Partnership investors (shares) (numeric string) */
960
+ pt: string;
961
+ /** Shares held by Educational Institution investors (shares) (numeric string) */
962
+ ed: string;
963
+ /** Shares held by Mutual Fund investors (shares) (numeric string) */
964
+ mf: string;
965
+ /** Shares held by Securities Company investors (shares) (numeric string) */
966
+ sc: string;
967
+ /** Shares held by Pension Fund investors (shares) (numeric string) */
968
+ pf: string;
969
+ /** Shares held by Financial Institution investors (shares) (numeric string) */
970
+ ib: string;
971
+ /** Shares held by Insurance investors (shares) (numeric string) */
972
+ is: string;
973
+ /** Shares held by Foundation investors (shares) (numeric string) */
974
+ fd: string;
975
+ /** Shares held by Individual investors (shares) (numeric string) */
976
+ in: string;
977
+ /** Total shares across all classifications (shares) (numeric string) */
978
+ total: string;
979
+ }
980
+ /** Latest classification record (no date field); the body is JSON null when the stock has no data */
981
+ export interface ShareholderClassifyTableResponse {
982
+ /** Stock code */
983
+ code: string;
984
+ /** Shares held by Bank investors (shares) (numeric string) */
985
+ bk: string;
986
+ /** Shares held by Government investors (shares) (numeric string) */
987
+ gv: string;
988
+ /** Shares held by Private Equity investors (shares) (numeric string) */
989
+ pe: string;
990
+ /** Shares held by Trustee Bank investors (shares) (numeric string) */
991
+ tb: string;
992
+ /** Shares held by Venture Capital investors (shares) (numeric string) */
993
+ vc: string;
994
+ /** Shares held by Private Bank investors (shares) (numeric string) */
995
+ pb: string;
996
+ /** Shares held by Exchange Traded Fund (ETF) investors (shares) (numeric string) */
997
+ ef: string;
998
+ /** Shares held by Investment Manager investors (shares) (numeric string) */
999
+ im: string;
1000
+ /** Shares held by Investment Advisor investors (shares) (numeric string) */
1001
+ ia: string;
1002
+ /** Shares held by Brokerage Firm investors (shares) (numeric string) */
1003
+ br: string;
1004
+ /** Shares held by Hedge Fund investors (shares) (numeric string) */
1005
+ hf: string;
1006
+ /** Shares held by Sovereign Wealth Fund investors (shares) (numeric string) */
1007
+ sw: string;
1008
+ /** Shares held by Capital Market Supporting Institution investors (shares) (numeric string) */
1009
+ cm: string;
1010
+ /** Shares held by Commanditaire Vennootschap (CV) investors (shares) (numeric string) */
1011
+ cv: string;
1012
+ /** Shares held by Firm investors (shares) (numeric string) */
1013
+ fm: string;
1014
+ /** Shares held by Mutual Fund Selling Agent investors (shares) (numeric string) */
1015
+ sa: string;
1016
+ /** Shares held by Peer to Peer Lending investors (shares) (numeric string) */
1017
+ pp: string;
1018
+ /** Shares held by Permanent Establishment investors (shares) (numeric string) */
1019
+ ps: string;
1020
+ /** Shares held by Sole Proprietorship investors (shares) (numeric string) */
1021
+ sp: string;
1022
+ /** Shares held by Corporate investors (shares) (numeric string) */
1023
+ cr: string;
1024
+ /** Shares held by Association / Social Organization investors (shares) (numeric string) */
1025
+ as: string;
1026
+ /** Shares held by State-Owned Enterprise (BUMN) investors (shares) (numeric string) */
1027
+ so: string;
1028
+ /** Shares held by Central Bank investors (shares) (numeric string) */
1029
+ cb: string;
1030
+ /** Shares held by State-Owned Company investors (shares) (numeric string) */
1031
+ oc: string;
1032
+ /** Shares held by Diocese investors (shares) (numeric string) */
1033
+ dc: string;
1034
+ /** Shares held by Conference investors (shares) (numeric string) */
1035
+ cn: string;
1036
+ /** Shares held by Congregation investors (shares) (numeric string) */
1037
+ cg: string;
1038
+ /** Shares held by Cooperative investors (shares) (numeric string) */
1039
+ cp: string;
1040
+ /** Shares held by International Organization investors (shares) (numeric string) */
1041
+ io: string;
1042
+ /** Shares held by Political Party investors (shares) (numeric string) */
1043
+ pl: string;
1044
+ /** Shares held by Partnership investors (shares) (numeric string) */
1045
+ pt: string;
1046
+ /** Shares held by Educational Institution investors (shares) (numeric string) */
1047
+ ed: string;
1048
+ /** Shares held by Mutual Fund investors (shares) (numeric string) */
1049
+ mf: string;
1050
+ /** Shares held by Securities Company investors (shares) (numeric string) */
1051
+ sc: string;
1052
+ /** Shares held by Pension Fund investors (shares) (numeric string) */
1053
+ pf: string;
1054
+ /** Shares held by Financial Institution investors (shares) (numeric string) */
1055
+ ib: string;
1056
+ /** Shares held by Insurance investors (shares) (numeric string) */
1057
+ is: string;
1058
+ /** Shares held by Foundation investors (shares) (numeric string) */
1059
+ fd: string;
1060
+ /** Shares held by Individual investors (shares) (numeric string) */
1061
+ in: string;
1062
+ /** Total shares across all classifications (shares) (numeric string) */
1063
+ total: string;
1064
+ }
1065
+ export interface SummaryStockItem {
1066
+ /** Broker code (2 letters) */
1067
+ code: string;
1068
+ /** Total buy frequency over the period (numeric string) */
1069
+ buy_freq: string;
1070
+ /** Total buy volume in shares (numeric string) */
1071
+ buy_volume: string;
1072
+ /** Total buy value in Rupiah (numeric string) */
1073
+ buy_value: string;
1074
+ /** Total sell frequency over the period (numeric string) */
1075
+ sell_freq: string;
1076
+ /** Total sell volume in shares (numeric string) */
1077
+ sell_volume: string;
1078
+ /** Total sell value in Rupiah (numeric string) */
1079
+ sell_value: string;
1080
+ /** Average buy price in Rupiah = buy_value / buy_volume (decimal numeric string); null when buy_volume is 0 */
1081
+ buy_avg: string | null;
1082
+ /** Average sell price in Rupiah = sell_value / sell_volume (decimal numeric string); null when sell_volume is 0 */
1083
+ sell_avg: string | null;
1084
+ /** Net value in Rupiah = buy_value - sell_value; positive = net buy (numeric string) */
1085
+ net_value: string;
1086
+ /** Net volume in shares = buy_volume - sell_volume (numeric string) */
1087
+ net_volume: string;
1088
+ /** Net frequency = buy_freq - sell_freq (numeric string) */
1089
+ net_freq: string;
1090
+ /** Full broker name (the broker code itself when unknown) */
1091
+ name: string;
1092
+ }
1093
+ export interface SummaryBrokerItem {
1094
+ /** Stock code */
1095
+ code: string;
1096
+ /** Total buy frequency over the period (numeric string) */
1097
+ buy_freq: string;
1098
+ /** Total buy volume in shares (numeric string) */
1099
+ buy_volume: string;
1100
+ /** Total buy value in Rupiah (numeric string) */
1101
+ buy_value: string;
1102
+ /** Total sell frequency over the period (numeric string) */
1103
+ sell_freq: string;
1104
+ /** Total sell volume in shares (numeric string) */
1105
+ sell_volume: string;
1106
+ /** Total sell value in Rupiah (numeric string) */
1107
+ sell_value: string;
1108
+ /** Average buy price in Rupiah = buy_value / buy_volume (decimal numeric string); null when buy_volume is 0 */
1109
+ buy_avg: string | null;
1110
+ /** Average sell price in Rupiah = sell_value / sell_volume (decimal numeric string); null when sell_volume is 0 */
1111
+ sell_avg: string | null;
1112
+ /** Net value in Rupiah = buy_value - sell_value; positive = net buy (numeric string) */
1113
+ net_value: string;
1114
+ /** Net volume in shares = buy_volume - sell_volume (numeric string) */
1115
+ net_volume: string;
1116
+ /** Net frequency = buy_freq - sell_freq (numeric string) */
1117
+ net_freq: string;
1118
+ }
1119
+ export interface SectorStalkerResponse {
1120
+ /** Price series; empty when no data is available */
1121
+ index: SectorStalkerIndex[];
1122
+ }
1123
+ export interface SectorStalkerIndex {
1124
+ /** Index code (base = COMPOSITE: the 11 IDX-IC sector indices then COMPOSITE) or stock code (other base: first item is the base index, then member stocks sorted by latest change, highest first) */
1125
+ index: string;
1126
+ /** Daily close-price series, ascending by date (during trading hours the last point is today's realtime price) */
1127
+ data: SectorStalkerIndexData[];
1128
+ }
1129
+ export interface SectorStalkerIndexData {
1130
+ /** Trading date */
1131
+ date: string;
1132
+ /** Close price normalized to 100 at the first date of the series (2 decimals); null only if the first close is 0 */
1133
+ value: number | null;
1134
+ }
1135
+ export interface SectorRotationResponse {
1136
+ /** Benchmark index code (the base parameter, default COMPOSITE; ISSI when base = SYARIAH) */
1137
+ benchmark: "COMPOSITE" | "ISSI" | "IDXENERGY" | "IDXBASIC" | "IDXINDUST" | "IDXNONCYC" | "IDXCYCLIC" | "IDXHEALTH" | "IDXFINANCE" | "IDXPROPERT" | "IDXTECHNO" | "IDXINFRA" | "IDXTRANS";
1138
+ /** Date of the first item's last trail point; equals the to parameter when data is empty */
1139
+ lastDate: string;
1140
+ /** Sector indices (base = COMPOSITE) or member stocks of base (other base, at most limit, default 20) */
1141
+ data: SectorRotationData[];
1142
+ }
1143
+ export interface SectorRotationData {
1144
+ /** Sector index code (base = COMPOSITE) or member stock code (other base) */
1145
+ code: string;
1146
+ /** Sector name (e.g. Energy, Financials) or company name (the stock code when the name is empty) */
1147
+ name: string;
1148
+ /** Latest movement points (at most tail points), ascending by date */
1149
+ trail: SectorRotationDataTrail[];
1150
+ /** Quadrant of the last trail point: leading (x>=100, y>=100), weakening (x>=100, y<100), lagging (x<100, y<100), improving (x<100, y>=100) */
1151
+ quadrant: "leading" | "weakening" | "lagging" | "improving";
1152
+ }
1153
+ export interface SectorRotationDataTrail {
1154
+ /** Point date (daily or ISO-week close depending on interval) */
1155
+ date: string;
1156
+ /** RS-Ratio: relative strength vs the benchmark normalized around 100 (60-140, 2 decimals) */
1157
+ x: number;
1158
+ /** RS-Momentum: rate of change of RS-Ratio normalized around 100 (60-140, 2 decimals) */
1159
+ y: number;
1160
+ }
1161
+ export interface BrokerStalkerResponse {
1162
+ /** Tracked broker codes, sorted and comma-joined (e.g. AG,AK) */
1163
+ brokers: string;
1164
+ /** Stock code (uppercase) */
1165
+ stock: string;
1166
+ /** Period summary */
1167
+ summary: BrokerStalkerSummary;
1168
+ /** Daily rows (only days with broker transactions), ascending by date */
1169
+ calendar: BrokerStalkerCalendar[];
1170
+ }
1171
+ /** Period summary */
1172
+ export interface BrokerStalkerSummary {
1173
+ /** Number of days with a non-zero net value */
1174
+ active: number;
1175
+ /** Accumulated net value over the period in Rupiah */
1176
+ total: number;
1177
+ /** Average net value per active day in Rupiah (total / active; 0 when there are no active days) */
1178
+ avg: number;
1179
+ /** Day with the highest net buy */
1180
+ peak: BrokerStalkerSummaryPeak;
1181
+ }
1182
+ /** Day with the highest net buy */
1183
+ export interface BrokerStalkerSummaryPeak {
1184
+ /** Date of the highest positive net value; null when no day has a positive net value */
1185
+ date: string | null;
1186
+ /** Highest positive net value in Rupiah (0 when none) */
1187
+ value: number;
1188
+ }
1189
+ export interface BrokerStalkerCalendar {
1190
+ /** Trading date */
1191
+ date: string;
1192
+ /** Daily net value in Rupiah (positive = net buy) */
1193
+ value: number;
1194
+ /** Buy value in Rupiah */
1195
+ buy_value: number;
1196
+ /** Sell value in Rupiah */
1197
+ sell_value: number;
1198
+ /** Net volume in shares */
1199
+ volume: number;
1200
+ /** Buy volume in shares */
1201
+ buy_volume: number;
1202
+ /** Sell volume in shares */
1203
+ sell_volume: number;
1204
+ /** Buy dominance in % = buy_value / (buy_value + sell_value) x 100 (1 decimal) */
1205
+ buy_dom: number;
1206
+ /** Average buy price in Rupiah (2 decimals; 0 when there is no buy) */
1207
+ avg_buy: number;
1208
+ /** Average sell price in Rupiah (2 decimals; 0 when there is no sell) */
1209
+ avg_sell: number;
1210
+ /** Average net price in Rupiah = |net value| / |net volume| (2 decimals; 0 when net volume is 0) */
1211
+ avg_net: number;
1212
+ }
1213
+ export interface BrokerStalkerListResponse {
1214
+ /** Broker activity summary */
1215
+ summary: BrokerStalkerListSummary;
1216
+ /** Stocks sorted by net value, highest first */
1217
+ list: BrokerStalkerListList[];
1218
+ }
1219
+ /** Broker activity summary */
1220
+ export interface BrokerStalkerListSummary {
1221
+ /** Number of stocks traded by the broker(s) */
1222
+ stocks: number;
1223
+ /** Total net value across all stocks in Rupiah */
1224
+ total_net: number;
1225
+ /** Total net volume across all stocks in shares */
1226
+ total_volume: number;
1227
+ /** Stock code with the highest net value; null when there is no data */
1228
+ top: string | null;
1229
+ /** Top stock's net value as an absolute % of total_net (1 decimal) */
1230
+ concentration: number;
1231
+ /** Overall buy dominance in % = total buy / (total buy + total sell) x 100 (1 decimal) */
1232
+ buy_dom: number;
1233
+ }
1234
+ export interface BrokerStalkerListList {
1235
+ /** Stock code */
1236
+ code: string;
1237
+ /** Net value in Rupiah (positive = net buy) */
1238
+ value: number;
1239
+ /** Net volume in shares */
1240
+ volume: number;
1241
+ /** Number of daily broker rows for this stock (active days per broker) */
1242
+ transaction: number;
1243
+ /** Buy dominance in % (1 decimal) */
1244
+ buy_dom: number;
1245
+ }
1246
+ export interface SummaryStockChartItem {
1247
+ /** Category: D Buy (domestic buy), D Sell (domestic sell), F Buy (foreign buy), F Sell (foreign sell) */
1248
+ label: "D Buy" | "D Sell" | "F Buy" | "F Sell";
1249
+ /** Period total for the chosen scope (volume = shares, value = Rupiah, freq = frequency); 0 when there is no data */
1250
+ value: number;
1251
+ /** Fixed chart color per category (CSS rgb), e.g. rgb(34 197 94) */
1252
+ fill: "rgb(34 197 94)" | "rgb(22 163 74)" | "rgb(168 85 247)" | "rgb(147 51 234)";
1253
+ }
1254
+ export interface SummaryBrokerChartItem {
1255
+ /** Category: D Buy (domestic buy), D Sell (domestic sell), F Buy (foreign buy), F Sell (foreign sell) */
1256
+ label: "D Buy" | "D Sell" | "F Buy" | "F Sell";
1257
+ /** Period total for the chosen scope (volume = shares, value = Rupiah, freq = frequency); 0 when there is no data */
1258
+ value: number;
1259
+ /** Fixed chart color per category (CSS rgb), e.g. rgb(34 197 94) */
1260
+ fill: "rgb(34 197 94)" | "rgb(22 163 74)" | "rgb(168 85 247)" | "rgb(147 51 234)";
1261
+ }
1262
+ export interface InventoryStockChartResponse {
1263
+ /** Daily stock prices over the period, ascending by date */
1264
+ price: InventoryStockChartPrice[];
1265
+ /** Brokers: top limit (default 20) by largest absolute net, or the brokers in filter */
1266
+ broker: InventoryStockChartBroker[];
1267
+ }
1268
+ export interface InventoryStockChartPrice {
1269
+ /** Stock code */
1270
+ code: string;
1271
+ /** Trading date */
1272
+ date: string;
1273
+ /** Open price in Rupiah */
1274
+ open: number;
1275
+ /** High price in Rupiah */
1276
+ high: number;
1277
+ /** Low price in Rupiah */
1278
+ low: number;
1279
+ /** Close price in Rupiah */
1280
+ close: number;
1281
+ /** Daily trading volume in shares */
1282
+ volume: number;
1283
+ }
1284
+ export interface InventoryStockChartBroker {
1285
+ /** Broker code (2 letters) */
1286
+ broker: string;
1287
+ /** Full broker name (the broker code itself when unknown) */
1288
+ name: string;
1289
+ /** Cumulative inventory per price date (same dates as price) */
1290
+ data: InventoryStockChartBrokerData[];
1291
+ }
1292
+ export interface InventoryStockChartBrokerData {
1293
+ /** Date */
1294
+ date: string;
1295
+ /** Cumulative net (buy - sell) since the start of the period for the scope (val = Rupiah, vol = shares, freq = frequency); carries the previous value on days without transactions, 0 before the first transaction */
1296
+ value: number;
1297
+ }
1298
+ export interface InventoryBrokerChartItem {
1299
+ /** Stock code */
1300
+ code: string;
1301
+ /** Cumulative inventory of the broker(s) on this stock per date; all stocks share the same date list */
1302
+ data: InventoryBrokerChartData[];
1303
+ }
1304
+ export interface InventoryBrokerChartData {
1305
+ /** Date */
1306
+ date: string;
1307
+ /** Cumulative net (buy - sell) since the start of the period for the scope (val = Rupiah, vol = shares, freq = frequency); carries the previous value on days without transactions, 0 before the first transaction */
1308
+ value: number;
1309
+ }
1310
+ export interface MomentumChartItem {
1311
+ /** Interval start time (HH:MM), rounded down to `range` minutes; ascending order */
1312
+ time: string;
1313
+ /** Total traded in the interval: shares if scope=volume, Rupiah if scope=value */
1314
+ value: number;
1315
+ /** Cumulative HAKA (buy at offer) total from the start of the day up to this interval, same unit as value */
1316
+ buy: number;
1317
+ /** Cumulative HAKI (sell at bid) total from the start of the day up to this interval, same unit as value */
1318
+ sell: number;
1319
+ }
1320
+ /** Intraday price candles plus cumulative broker inventory lines */
1321
+ export interface IntradayInventoryChartResponse {
1322
+ /** Candlesticks per `range`-minute interval (intervals without trades skipped); empty when no trade matches market/buyer/seller */
1323
+ price: IntradayInventoryChartPrice[];
1324
+ /** Top `total` net buyers followed by top `total` net sellers (restricted to `filter` when given); empty when no trade matches */
1325
+ broker: IntradayInventoryChartBroker[];
1326
+ }
1327
+ export interface IntradayInventoryChartPrice {
1328
+ /** Interval start time (HH:MM), counted from the first trade time */
1329
+ x: string;
1330
+ /** Open price in the interval (Rupiah) */
1331
+ o: number;
1332
+ /** High price in the interval (Rupiah) */
1333
+ h: number;
1334
+ /** Low price in the interval (Rupiah) */
1335
+ l: number;
1336
+ /** Close price in the interval (Rupiah) */
1337
+ c: number;
1338
+ /** Total traded in the interval: lots if type=volume, Rupiah if type=value */
1339
+ v: number;
1340
+ }
1341
+ export interface IntradayInventoryChartBroker {
1342
+ /** Broker code (2 characters) */
1343
+ code: string;
1344
+ /** Broker name (the code itself when unknown) */
1345
+ name: string;
1346
+ /** Cumulative broker inventory per interval */
1347
+ data: IntradayInventoryChartBrokerData[];
1348
+ }
1349
+ export interface IntradayInventoryChartBrokerData {
1350
+ /** Interval start time (HH:MM), same as price[].x */
1351
+ x: string;
1352
+ /** Cumulative net buy minus sell up to this interval: lots if type=volume, Rupiah if type=value (negative = distribution) */
1353
+ y: number;
1354
+ }
1355
+ /** Broker crossing flows for a sankey diagram */
1356
+ export interface SankeyChartResponse {
1357
+ /** Distinct broker nodes referenced by links; empty when no trade matches */
1358
+ nodes: SankeyChartNodes[];
1359
+ /** Up to 20 largest buyer-to-seller flows, sorted by value descending */
1360
+ links: SankeyChartLinks[];
1361
+ }
1362
+ export interface SankeyChartNodes {
1363
+ /** Broker node label: buyers as " XX ", sellers as " XX " (two trailing spaces) so one broker can appear on both sides */
1364
+ name: string;
1365
+ }
1366
+ export interface SankeyChartLinks {
1367
+ /** Buyer broker node (matches nodes[].name) */
1368
+ source: string;
1369
+ /** Seller broker node (matches nodes[].name) */
1370
+ target: string;
1371
+ /** Total traded between the two brokers: shares if type=volume, Rupiah if type=value */
1372
+ value: number;
1373
+ }
1374
+ export interface PriceTableItem {
1375
+ /** Trade price level (Rupiah) */
1376
+ price: number;
1377
+ /** Total HAKA (buy at offer) volume at this price (shares) */
1378
+ buy_volume: number;
1379
+ /** Total HAKI (sell at bid) volume at this price (shares) */
1380
+ sell_volume: number;
1381
+ /** Number of HAKA trades at this price */
1382
+ buy_freq: number;
1383
+ /** Number of HAKI trades at this price */
1384
+ sell_freq: number;
1385
+ }
1386
+ export interface TimeTableItem {
1387
+ /** Interval start time (HH:MM), rounded down to `range` minutes */
1388
+ time: string;
1389
+ /** Total HAKA (buy at offer) volume in the interval (lots; may be fractional for odd lots) */
1390
+ buy_lot: number;
1391
+ /** Total HAKI (sell at bid) volume in the interval (lots; may be fractional for odd lots) */
1392
+ sell_lot: number;
1393
+ /** buy_lot share of buy_lot + sell_lot (%), 0 when both are 0 */
1394
+ buy_percentage: number;
1395
+ /** sell_lot share of buy_lot + sell_lot (%), 0 when both are 0 */
1396
+ sell_percentage: number;
1397
+ }
1398
+ export interface PriceDiaryItem {
1399
+ /** Trading date, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1400
+ date: string;
1401
+ /** Closing price (Rupiah) */
1402
+ price: number | null;
1403
+ /** Trading value (Rupiah), numeric string */
1404
+ value: string | null;
1405
+ /** Trading volume (shares), numeric string */
1406
+ volume: string | null;
1407
+ /** Daily price change (%) */
1408
+ change: number | null;
1409
+ }
1410
+ export interface PriceSeasonalityItem {
1411
+ /** Month (YYYY-MM) */
1412
+ month: string;
1413
+ /** Closing price on the first trading day of the month (Rupiah, numeric string) */
1414
+ start_price: string | null;
1415
+ /** Closing price on the last trading day of the month (Rupiah, numeric string) */
1416
+ end_price: string | null;
1417
+ /** Change from start_price to end_price (%, decimal numeric string); null when start_price is null */
1418
+ percentage_change: string | null;
1419
+ }
1420
+ export interface ShareholderAboveResponse {
1421
+ /** Total number of pages for the given `limit` (0 when there is no data) */
1422
+ totalPage: number;
1423
+ /** Current page number */
1424
+ page: number;
1425
+ /** Next page number; null on the last page */
1426
+ nextPage: number | null;
1427
+ /** Ownership changes above 5% within the last 2 years, newest first; empty array when nothing matches */
1428
+ data: ShareholderAboveData[];
1429
+ }
1430
+ export interface ShareholderAboveData {
1431
+ /** Report date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1432
+ date: string;
1433
+ /** Stock code */
1434
+ code: string;
1435
+ /** Shareholder name */
1436
+ name: string;
1437
+ /** Broker/custodian code where the shares are held (2 letters, or INSTITUSI) */
1438
+ format_securities: string;
1439
+ /** Shares held before the change (shares) (numeric string) */
1440
+ prev_val: string;
1441
+ /** Ownership percentage before the change (%) */
1442
+ prev_pct: number;
1443
+ /** Shares held after the change (shares) (numeric string) */
1444
+ next_val: string;
1445
+ /** Ownership percentage after the change (%) */
1446
+ next_pct: number;
1447
+ /** Share difference next_val - prev_val (shares; negative = decreased) (numeric string) */
1448
+ change: string;
1449
+ /** Investor status: LOCAL or FOREIGN */
1450
+ nationality: string;
1451
+ }
1452
+ export interface ShareholderAboveChartItem {
1453
+ /** Report date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1454
+ date: string;
1455
+ /** Shares held by the shareholder (`name`) at the broker (`broker`) after the change (shares) (numeric string) */
1456
+ share: string;
1457
+ }
1458
+ export interface ShareholderOneResponse {
1459
+ /** Total number of pages for the given `limit` (0 when there is no data) */
1460
+ totalPage: number;
1461
+ /** Current page number */
1462
+ page: number;
1463
+ /** Next page number; null on the last page */
1464
+ nextPage: number | null;
1465
+ /** Ownership changes above 1% within the last 2 years, newest first; empty array when nothing matches */
1466
+ data: ShareholderOneData[];
1467
+ }
1468
+ export interface ShareholderOneData {
1469
+ /** Report date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1470
+ date: string;
1471
+ /** Stock code */
1472
+ code: string;
1473
+ /** Shareholder name */
1474
+ name: string;
1475
+ /** KSEI investor type code, e.g. CP, ID */
1476
+ type: string;
1477
+ /** Investor status: LOCAL or FOREIGN */
1478
+ status: string;
1479
+ /** Shareholder nationality (empty string for non-individuals) */
1480
+ nationality: string;
1481
+ /** Shareholder domicile */
1482
+ domicile: string;
1483
+ /** Scripless shares before the change (shares) (numeric string) */
1484
+ prev_scripless: string;
1485
+ /** Scripless shares after the change (shares) (numeric string) */
1486
+ next_scripless: string;
1487
+ /** Scrip (certificated) shares before the change (shares) (numeric string) */
1488
+ prev_scrip: string;
1489
+ /** Scrip (certificated) shares after the change (shares) (numeric string) */
1490
+ next_scrip: string;
1491
+ /** Total shares before the change (shares) (numeric string) */
1492
+ prev_total: string;
1493
+ /** Total shares after the change (shares) (numeric string) */
1494
+ next_total: string;
1495
+ /** Ownership percentage before the change (%) */
1496
+ prev_pct: number;
1497
+ /** Ownership percentage after the change (%) */
1498
+ next_pct: number;
1499
+ }
1500
+ export interface ShareholderOneChartItem {
1501
+ /** Report date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1502
+ date: string;
1503
+ /** Scrip (certificated) shares after the change (shares) (numeric string) */
1504
+ scrip: string;
1505
+ /** Scripless shares after the change (shares) (numeric string) */
1506
+ scripless: string;
1507
+ /** Total shares held by the shareholder (`name`) after the change (shares) (numeric string) */
1508
+ total: string;
1509
+ }
1510
+ export interface InsiderResponse {
1511
+ /** Total number of pages for the given `limit` (0 when there is no data) */
1512
+ totalPage: number;
1513
+ /** Current page number */
1514
+ page: number;
1515
+ /** Next page number; null on the last page */
1516
+ nextPage: number | null;
1517
+ /** Insider ownership changes within the last 2 years, newest first; empty array when nothing matches */
1518
+ data: InsiderData[];
1519
+ }
1520
+ export interface InsiderData {
1521
+ /** Report date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1522
+ date: string;
1523
+ /** Stock code */
1524
+ code: string;
1525
+ /** Insider name (director, commissioner, controlling shareholder) */
1526
+ name: string;
1527
+ /** Ownership percentage before the transaction (%) */
1528
+ prev_percent: number;
1529
+ /** Shares held before the transaction (shares) (numeric string) */
1530
+ prev_val: string;
1531
+ /** Ownership percentage after the transaction (%) */
1532
+ next_percent: number;
1533
+ /** Shares held after the transaction (shares) (numeric string) */
1534
+ next_val: string;
1535
+ /** Change in ownership percentage (percentage points) */
1536
+ change: number;
1537
+ /** Insider roles as curly-brace text, e.g. {PENGENDALI,DIREKSI}; null when not recorded */
1538
+ badge: string | null;
1539
+ /** Insider nationality */
1540
+ nationality: string;
1541
+ /** Transaction purpose, e.g. Investasi */
1542
+ purpose: string;
1543
+ /** Number of related transactions in `subrow` (numeric string) */
1544
+ child: string;
1545
+ /** Related transaction details; empty array when none */
1546
+ subrow: InsiderDataSubrow[];
1547
+ }
1548
+ export interface InsiderDataSubrow {
1549
+ /** Transaction date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1550
+ date: string;
1551
+ /** Transaction price per share (Rupiah) */
1552
+ price: number;
1553
+ /** Transaction type, e.g. Buy or Sell */
1554
+ status: string;
1555
+ /** Number of shares transacted (shares) */
1556
+ value: number;
1557
+ }
1558
+ export interface InsiderChartItem {
1559
+ /** Transaction date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1560
+ date: string;
1561
+ /** Cumulative estimated holding of the insider (`name`): initial shares plus the running sum of transaction values up to that date (shares); null when the insider's initial holding is unknown (numeric string) */
1562
+ share: string | null;
1563
+ }
1564
+ /** Financial statement table: period columns and account rows */
1565
+ export interface FinancialStatementResponse {
1566
+ /** Hierarchical statement accounts (BS/IS/CF per `statement`) ordered by display_order; accounts whose values are all 0 are omitted; null when no account has a value */
1567
+ rows: FinancialStatementRows[] | null;
1568
+ /** Report periods, latest first, at most `limit` (default 8); null when the company has no report for the selection */
1569
+ columns: FinancialStatementColumns[] | null;
1570
+ }
1571
+ export interface FinancialStatementRows {
1572
+ /** Account ID (32-character string); pass as `account` to financial-statement-chart */
1573
+ id: string;
1574
+ /** Financial statement account name */
1575
+ name: string;
1576
+ /** Depth level of the account in the hierarchy */
1577
+ level: number;
1578
+ /** Account value per period, same order as columns */
1579
+ values: FinancialStatementRowsValues[];
1580
+ /** Parent account ID; null for top-level accounts */
1581
+ parent_id: string | null;
1582
+ /** true for heading/grouping accounts, false for value accounts */
1583
+ is_abstract: boolean;
1584
+ /** Display order of the account */
1585
+ display_order: number;
1586
+ }
1587
+ export interface FinancialStatementRowsValues {
1588
+ /** Period label, same as columns[].label */
1589
+ col: string;
1590
+ /** Fiscal year */
1591
+ year: number;
1592
+ /** Account value for the period including rolled-up sub-accounts (Rupiah); 0 when not reported */
1593
+ amount: number;
1594
+ /** Period code */
1595
+ period: "FY" | "Q1" | "Q2" | "Q3" | "Q4";
1596
+ }
1597
+ export interface FinancialStatementColumns {
1598
+ /** Period label, e.g. "Q2 2025" or "FY 2024" */
1599
+ label: string;
1600
+ /** Fiscal year */
1601
+ year: number;
1602
+ /** Period code */
1603
+ period: "FY" | "Q1" | "Q2" | "Q3" | "Q4";
1604
+ }
1605
+ /** Single-account time series from the financial statement */
1606
+ export interface FinancialStatementChartResponse {
1607
+ /** Account name; null when `account` is not found in the statement */
1608
+ name: string | null;
1609
+ /** Data points per period, latest first, at most `limit` (default 8); null when the company has no report for the selection */
1610
+ points: FinancialStatementChartPoints[] | null;
1611
+ /** Charted account ID (echoes `account`); null when not found */
1612
+ account_id: string | null;
1613
+ }
1614
+ export interface FinancialStatementChartPoints {
1615
+ /** Report period end date (YYYY-MM-DD) */
1616
+ date: string;
1617
+ /** Period label, e.g. "Q2 2025" or "FY 2024" */
1618
+ label: string;
1619
+ /** Account value for the period including rolled-up sub-accounts (Rupiah); 0 when not reported or account not found */
1620
+ amount: number;
1621
+ }
1622
+ /** Key statistics table: period columns and statistic rows */
1623
+ export interface KeystatResponse {
1624
+ /** Key statistics ordered by name (A-Z); statistics whose values are all 0 are omitted; null when none has a value */
1625
+ rows: KeystatRows[] | null;
1626
+ /** Report periods, latest first, at most `limit` (default 8); null when the company has no data for the selection */
1627
+ columns: KeystatColumns[] | null;
1628
+ }
1629
+ export interface KeystatRows {
1630
+ /** Unique statistic ID (32-character hex string) */
1631
+ id: string;
1632
+ /** Key statistic name; pass as `name` to keystat-chart */
1633
+ name: string;
1634
+ /** Statistic value per period, same order as columns */
1635
+ values: KeystatRowsValues[];
1636
+ }
1637
+ export interface KeystatRowsValues {
1638
+ /** Period label, same as columns[].label */
1639
+ col: string;
1640
+ /** Fiscal year */
1641
+ year: number;
1642
+ /** Statistic value for the period (unit depends on the statistic, e.g. ratio or %); 0 when not reported */
1643
+ amount: number;
1644
+ /** Period code */
1645
+ period: "FY" | "Q1" | "Q2" | "Q3" | "Q4";
1646
+ }
1647
+ export interface KeystatColumns {
1648
+ /** Period label, e.g. "Q2 2025" or "FY 2024" */
1649
+ label: string;
1650
+ /** Fiscal year */
1651
+ year: number;
1652
+ /** Period code */
1653
+ period: "FY" | "Q1" | "Q2" | "Q3" | "Q4";
1654
+ }
1655
+ /** Single key-statistic time series */
1656
+ export interface KeystatChartResponse {
1657
+ /** Key statistic name (echoes `name`); null when there are no periods */
1658
+ name: string | null;
1659
+ /** Data points per period, latest first, at most `limit` (max 8 quarterly, 3 for FY); null when there are no periods */
1660
+ points: KeystatChartPoints[] | null;
1661
+ }
1662
+ export interface KeystatChartPoints {
1663
+ /** Report period end date (YYYY-MM-DD) */
1664
+ date: string;
1665
+ /** Period label, e.g. "Q2 2025" or "FY 2024" */
1666
+ label: string;
1667
+ /** Statistic value for the period (unit depends on the statistic); 0 when not reported or name unknown */
1668
+ amount: number;
1669
+ }
1670
+ /** Paginated corporate-action calendar, newest event date first. */
1671
+ export interface CalendarResponse {
1672
+ /** Total number of pages for the current filter (0 when no data). */
1673
+ totalPage: number;
1674
+ /** Current page number. */
1675
+ page: number;
1676
+ /** Next page number; null on the last page. */
1677
+ nextPage: number | null;
1678
+ /** Corporate actions on this page ([] when none). */
1679
+ data: CalendarData[];
1680
+ }
1681
+ /** Corporate action. */
1682
+ export interface CalendarData {
1683
+ /** Stock or instrument code (e.g. BBCA, INET-W). */
1684
+ code: string;
1685
+ /** Corporate action type. */
1686
+ type: "IPO" | "PUBLIC_EXPOSE" | "REVERSE" | "RIGHT" | "RUPS_RESULT" | "RUPS_SCHEDULE" | "SPLIT" | "WARRANT" | "BONUS" | "CONVERTION" | "DIVIDEND";
1687
+ /** Type-specific details as published by the exchange (keys vary per type, e.g. DistDate, ExDate, TradingPeriodStart; values are strings). */
1688
+ payload: Record<string, unknown> | null;
1689
+ }
1690
+ export interface BatchOrderBookItem {
1691
+ /** Stock code; may carry the market suffix when market is not RG (e.g. BBCANG); empty string when not available */
1692
+ code: string;
1693
+ /** Buy queue levels, ordered from level 1 (best bid) */
1694
+ bid: Array<Record<string, number | null>>;
1695
+ /** Sell queue levels, ordered from level 1 (best offer) */
1696
+ offer: Array<Record<string, number | null>>;
1697
+ }
1698
+ export interface BatchIntradayDataItem {
1699
+ /** Stock code (carries the market suffix when market is not RG) */
1700
+ code: string;
1701
+ /** Opening price (Rupiah) */
1702
+ open: number | null;
1703
+ /** Highest price (Rupiah) */
1704
+ high: number | null;
1705
+ /** Lowest price (Rupiah) */
1706
+ low: number | null;
1707
+ /** Last / closing price (Rupiah) */
1708
+ close: number | null;
1709
+ /** Average price (Rupiah); null when read from daily data */
1710
+ avg: number | null;
1711
+ /** Trading volume (shares) */
1712
+ volume: number | null;
1713
+ /** Trade frequency (count) */
1714
+ freq: number | null;
1715
+ /** Trading value (Rupiah) */
1716
+ value: number | null;
1717
+ /** Previous trading day's closing price (Rupiah); null when read from daily data */
1718
+ prev: number | null;
1719
+ /** Best bid price (Rupiah); null when read from daily data */
1720
+ bid_price: number | null;
1721
+ /** Queued volume at the best bid; null when read from daily data */
1722
+ bid_lot: number | null;
1723
+ /** Number of orders at the best bid; null when read from daily data */
1724
+ bid_freq: number | null;
1725
+ /** Best offer price (Rupiah); null when read from daily data */
1726
+ offer_price: number | null;
1727
+ /** Queued volume at the best offer; null when read from daily data */
1728
+ offer_lot: number | null;
1729
+ /** Number of orders at the best offer; null when read from daily data */
1730
+ offer_freq: number | null;
1731
+ /** Indicative Equilibrium Price during pre-opening/pre-closing (Rupiah); null when read from daily data */
1732
+ iep: number | null;
1733
+ /** Indicative Equilibrium Volume during pre-opening/pre-closing; null when read from daily data */
1734
+ iev: number | null;
1735
+ }
1736
+ export interface BatchIntradayIndexItem {
1737
+ /** Index code */
1738
+ code: string;
1739
+ /** Index opening value */
1740
+ open: number | null;
1741
+ /** Index highest value */
1742
+ high: number | null;
1743
+ /** Index lowest value */
1744
+ low: number | null;
1745
+ /** Index last / closing value */
1746
+ close: number | null;
1747
+ /** Trading volume (shares) */
1748
+ volume: number | null;
1749
+ /** Trade frequency (count) */
1750
+ freq: number | null;
1751
+ /** Trading value (Rupiah) */
1752
+ value: number | null;
1753
+ /** Index closing value on the previous trading day; null when read from daily data */
1754
+ prev: number | null;
1755
+ /** Number of advancing stocks; 0 when read from daily data */
1756
+ positive: number | null;
1757
+ /** Number of declining stocks; 0 when read from daily data */
1758
+ negative: number | null;
1759
+ /** Number of unchanged stocks; 0 when read from daily data */
1760
+ neutral: number | null;
1761
+ /** Number of untraded / suspended stocks; 0 when read from daily data */
1762
+ suspend: number | null;
1763
+ /** Market capitalization (Rupiah) */
1764
+ market_cap: number | null;
1765
+ /** Market value (Rupiah); equals value when read from daily data */
1766
+ market_value: number | null;
1767
+ }
1768
+ /** Multi-index search result. */
1769
+ export interface SearchResponse {
1770
+ /** One result per index, in order user_lists then stock_lists. */
1771
+ results: SearchResults[];
1772
+ }
1773
+ /** Per-index result. */
1774
+ export interface SearchResults {
1775
+ /** Search index name. */
1776
+ indexUid: "user_lists" | "stock_lists";
1777
+ /** Matches (max 5 for user_lists, max 10 for stock_lists). */
1778
+ hits: SearchResultsHits[];
1779
+ /** Searched keyword. */
1780
+ query: string;
1781
+ /** Search processing time (milliseconds). */
1782
+ processingTimeMs: number;
1783
+ /** Result limit for this index (5 or 10). */
1784
+ limit: number;
1785
+ /** Result offset (always 0). */
1786
+ offset: number;
1787
+ /** Estimated total number of matches. */
1788
+ estimatedTotalHits: number;
1789
+ /** Unique search request ID (UUID). */
1790
+ requestUid?: string;
1791
+ }
1792
+ /** Search hit. user_lists hits carry username/name/image; stock_lists hits carry code/name/logo. */
1793
+ export interface SearchResultsHits {
1794
+ /** Username (user_lists only). */
1795
+ username: string;
1796
+ /** User display name or company name. */
1797
+ name: string;
1798
+ /** Profile picture URL (user_lists only); null if none. */
1799
+ image: string | null;
1800
+ /** Stock code (stock_lists only). */
1801
+ code: string;
1802
+ /** Company icon image URL (stock_lists only). */
1803
+ logo: string | null;
1804
+ }
1805
+ /** Paginated stock search result. */
1806
+ export interface SearchStockResponse {
1807
+ /** Matches on this page (max 20). */
1808
+ hits?: SearchStockHits[];
1809
+ /** Searched keyword. */
1810
+ query?: string;
1811
+ /** Search processing time (milliseconds). */
1812
+ processingTimeMs?: number;
1813
+ /** Results per page (always 20). */
1814
+ hitsPerPage?: number;
1815
+ /** Current page number (from cursor, default 1). */
1816
+ page?: number;
1817
+ /** Total number of pages. */
1818
+ totalPages?: number;
1819
+ /** Total number of matches. */
1820
+ totalHits?: number;
1821
+ }
1822
+ /** Stock hit. */
1823
+ export interface SearchStockHits {
1824
+ /** Stock code. */
1825
+ code: string;
1826
+ /** Company name. */
1827
+ name: string;
1828
+ /** Company icon image URL. */
1829
+ logo?: string | null;
1830
+ }
1831
+ /** Paginated user search result. */
1832
+ export interface SearchUserResponse {
1833
+ /** Matches on this page (max 20). */
1834
+ hits?: SearchUserHits[];
1835
+ /** Searched keyword. */
1836
+ query?: string;
1837
+ /** Search processing time (milliseconds). */
1838
+ processingTimeMs?: number;
1839
+ /** Results per page (always 20). */
1840
+ hitsPerPage?: number;
1841
+ /** Current page number (from cursor, default 1). */
1842
+ page?: number;
1843
+ /** Total number of pages. */
1844
+ totalPages?: number;
1845
+ /** Total number of matches. */
1846
+ totalHits?: number;
1847
+ }
1848
+ /** User hit. */
1849
+ export interface SearchUserHits {
1850
+ /** Username. */
1851
+ username: string;
1852
+ /** Display name. */
1853
+ name: string | null;
1854
+ /** Profile picture URL; null if none. */
1855
+ image?: string | null;
1856
+ }
1857
+ export interface ScreenerScreenItem {
1858
+ /** Stock code */
1859
+ code: string;
1860
+ /** Formula match status, always true */
1861
+ matched: boolean;
1862
+ /** Additional dynamic keys. */
1863
+ [key: string]: boolean | number | null | string;
1864
+ }
1865
+ export interface ScreenerListItem {
1866
+ /** Group name: Private (own presets), Public (scope includes public), Membership (shared with your plan) */
1867
+ name: "Private" | "Public" | "Membership";
1868
+ /** Presets in this group */
1869
+ groups: ScreenerListGroups[];
1870
+ }
1871
+ export interface ScreenerListGroups {
1872
+ /** Preset ID (present only in the Private group) */
1873
+ id?: string;
1874
+ /** Preset name */
1875
+ name: string;
1876
+ /** Preset description (null if empty) */
1877
+ description: string | null;
1878
+ /** Visibility list, e.g. ["public"] or plan names */
1879
+ scope: string[] | null;
1880
+ /** Preset formula */
1881
+ formula: string;
1882
+ /** Index categories the stock universe is filtered to; null or empty = all stocks */
1883
+ category: string[] | null;
1884
+ /** Display name of the preset creator */
1885
+ profile_name: string | null;
1886
+ /** Profile picture URL of the preset creator (null if none) */
1887
+ profile_image: string | null;
1888
+ }
1889
+ export interface ScreenerSaveResponse {
1890
+ /** Success message, e.g. "New preset {name} added successfully" */
1891
+ message: string;
1892
+ }
1893
+ export interface ScreenerUpdateResponse {
1894
+ /** Success message, e.g. "Preset {name} updated successfully" */
1895
+ message: string;
1896
+ }
1897
+ export interface ScreenerDeleteResponse {
1898
+ /** Success message, e.g. "Preset {name} deleted successfully" */
1899
+ message: string;
1900
+ }
1901
+ export interface ApiUsageResponse {
1902
+ /** Requests counted in the current quota window */
1903
+ usage: number;
1904
+ /** Requests left in the window (never below 0; in-flight requests are deducted) */
1905
+ remaining: number;
1906
+ /** Monthly request quota of the plan */
1907
+ limit: number;
1908
+ /** true when the quota is used up */
1909
+ isBlocked: boolean;
1910
+ /** Quota window reset time; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1911
+ expire: string;
1912
+ /** Active plan name in upper case, e.g. ADVANCE */
1913
+ role: string;
1914
+ }
1915
+ export interface UsageLogsItem {
1916
+ /** Log ID (UUID) */
1917
+ id: string;
1918
+ /** Request time, ISO 8601 with a time-zone offset, e.g. 2026-07-30T22:57:26.606+07:00 */
1919
+ date: string;
1920
+ /** HTTP method */
1921
+ method: string;
1922
+ /** Called endpoint URL */
1923
+ url: string;
1924
+ /** Client User-Agent */
1925
+ access: string;
1926
+ /** HTTP status code of the response */
1927
+ status: number;
1928
+ /** Response time in milliseconds */
1929
+ response_time: number | null;
1930
+ }
1931
+ export interface WatchlistsListItem {
1932
+ /** Watchlist item ID (used by PUT/PATCH /watchlists/{id} and DELETE /watchlists) */
1933
+ id: string;
1934
+ /** Stock code */
1935
+ code: string;
1936
+ /** User note (null if none) */
1937
+ note: string | null;
1938
+ /** Reference price saved by the user (Rupiah) */
1939
+ price: number;
1940
+ /** Company name */
1941
+ name: string;
1942
+ /** Last price (Rupiah): realtime during 08:40-18:30 WIB when available, otherwise latest close; null if no price data */
1943
+ last: number | null;
1944
+ /** Change of last price vs the reference price (%); null if no price data */
1945
+ change: number | null;
1946
+ /** Watchlist group ID the item belongs to */
1947
+ group_id: string;
1948
+ }
1949
+ export interface WatchlistsAddResponse {
1950
+ /** Confirmation message, e.g. "BBCA added to watchlist" */
1951
+ message: string;
1952
+ }
1953
+ export interface WatchlistsDeleteResponse {
1954
+ /** Confirmation message with the number of IDs sent, e.g. "2 watchlist deleted" */
1955
+ message: string;
1956
+ }
1957
+ export interface WatchlistsListGroupsItem {
1958
+ /** Watchlist group ID */
1959
+ value: string;
1960
+ /** Group name */
1961
+ label: string;
1962
+ }
1963
+ export interface WatchlistsAddGroupResponse {
1964
+ /** Confirmation message, "Group added" */
1965
+ message: string;
1966
+ }
1967
+ export interface WatchlistsUpdateGroupResponse {
1968
+ /** Confirmation message, e.g. "Group updated" */
1969
+ message: string;
1970
+ }
1971
+ export interface WatchlistsDeleteGroupResponse {
1972
+ /** Confirmation message, e.g. "Group deleted" */
1973
+ message: string;
1974
+ }
1975
+ export interface WatchlistsUpdateResponse {
1976
+ /** Confirmation message, "Note watchlist updated" */
1977
+ message: string;
1978
+ }
1979
+ export interface WatchlistsUpdateNoteResponse {
1980
+ /** Confirmation message, "Note watchlist updated" */
1981
+ message: string;
1982
+ }
1983
+ export interface JournalsAddResponse {
1984
+ /** Confirmation message (localized via Accept-Language) */
1985
+ message: string;
1986
+ }
1987
+ export interface JournalsListItem {
1988
+ /** Journal transaction ID (use it with DELETE /journals) */
1989
+ id: string;
1990
+ /** Stock code */
1991
+ code: string;
1992
+ /** Two-letter broker code */
1993
+ broker: string;
1994
+ /** Transaction date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
1995
+ date: string;
1996
+ /** Quantity in lots (1 lot = 100 shares) */
1997
+ lot: number;
1998
+ /** Transaction price per share (Rupiah) */
1999
+ price: number;
2000
+ /** Numeric string: transaction value in Rupiah incl. fee (BUY: lot x 100 x price + fee; SELL: minus fee), rounded */
2001
+ value: string;
2002
+ /** Transaction type: BUY or SELL (DIVIDEND rows, if any, are also listed) */
2003
+ status: string;
2004
+ /** User note */
2005
+ note: string | null;
2006
+ }
2007
+ export interface JournalsDeleteResponse {
2008
+ /** Confirmation message (localized via Accept-Language) */
2009
+ message: string;
2010
+ }
2011
+ export interface JournalsSummaryResponse {
2012
+ /** Stock codes ordered by number of transactions, most frequent first */
2013
+ top_code: string[];
2014
+ /** Number of transactions in the period */
2015
+ total_transaction: number;
2016
+ /** Number of BUY transactions */
2017
+ total_buy: number;
2018
+ /** Number of SELL transactions */
2019
+ total_sell: number;
2020
+ /** Number of DIVIDEND transactions */
2021
+ total_dividend: number;
2022
+ /** Sum of the value of all transactions (Rupiah, BUY and SELL added together) */
2023
+ total_value: number;
2024
+ /** Share of BUY transactions (%) */
2025
+ percentage_buy: number;
2026
+ /** Share of SELL transactions (%) */
2027
+ percentage_sell: number;
2028
+ /** Share of DIVIDEND transactions (%) */
2029
+ percentage_dividend: number;
2030
+ /** Average value per transaction (Rupiah) */
2031
+ average_value: number;
2032
+ /** Per-stock transaction counts, ordered by total descending */
2033
+ transactions: JournalsSummaryTransactions[];
2034
+ }
2035
+ export interface JournalsSummaryTransactions {
2036
+ /** Stock code */
2037
+ code: string;
2038
+ /** Number of BUY transactions */
2039
+ buy: number;
2040
+ /** Number of SELL transactions */
2041
+ sell: number;
2042
+ /** Number of DIVIDEND transactions */
2043
+ dividend: number;
2044
+ /** Total transactions for this code */
2045
+ total: number;
2046
+ }
2047
+ export interface PortfoliosListItem {
2048
+ /** Stock code */
2049
+ code: string;
2050
+ /** Company name */
2051
+ name: string | null;
2052
+ /** Stock sector */
2053
+ sector: string | null;
2054
+ /** Stock subsector */
2055
+ subsector: string | null;
2056
+ /** Total held lots across brokers (1 lot = 100 shares) */
2057
+ lot: number;
2058
+ /** Weighted average buy price per share incl. buy fee (Rupiah) */
2059
+ price: number;
2060
+ /** Latest closing price (Rupiah); null if no price yet */
2061
+ last: number | null;
2062
+ /** Cost basis = lot x 100 x average price (Rupiah) */
2063
+ value: number;
2064
+ /** Change of last price vs average price (%); null if no last price */
2065
+ change: number | null;
2066
+ /** Unrealized profit/loss = lot x 100 x (last - price) (Rupiah); null if no last price */
2067
+ net: number | null;
2068
+ /** Per-broker breakdown of the position */
2069
+ subrow: PortfoliosListSubrow[];
2070
+ /** Number of broker rows in subrow */
2071
+ child: number;
2072
+ }
2073
+ export interface PortfoliosListSubrow {
2074
+ /** Two-letter broker code */
2075
+ broker: string;
2076
+ /** Held lots at this broker */
2077
+ lot: number;
2078
+ /** Average buy price per share at this broker incl. buy fee (Rupiah) */
2079
+ price: number;
2080
+ }
2081
+ export interface PortfoliosSummaryResponse {
2082
+ /** Total cost basis (Rupiah) */
2083
+ total_value: number;
2084
+ /** Total market value = cost basis + unrealized (Rupiah) */
2085
+ market_value: number;
2086
+ /** Total unrealized profit/loss (Rupiah) */
2087
+ unrealized: number;
2088
+ /** Allocation per stock, in portfolio list order */
2089
+ shares: PortfoliosSummaryShares[];
2090
+ /** Allocation per sector (stocks without a sector are left out) */
2091
+ sector: PortfoliosSummarySector[];
2092
+ /** Allocation per subsector (stocks without a subsector are left out) */
2093
+ subsector: PortfoliosSummarySubsector[];
2094
+ }
2095
+ export interface PortfoliosSummaryShares {
2096
+ /** Stock code */
2097
+ name: string;
2098
+ /** Cost basis of this group (Rupiah) */
2099
+ total_value: number;
2100
+ /** Share of the total portfolio cost basis (%) */
2101
+ share: number;
2102
+ }
2103
+ export interface PortfoliosSummarySector {
2104
+ /** Sector name */
2105
+ name: string;
2106
+ /** Cost basis of this group (Rupiah) */
2107
+ total_value: number;
2108
+ /** Share of the total portfolio cost basis (%) */
2109
+ share: number;
2110
+ }
2111
+ export interface PortfoliosSummarySubsector {
2112
+ /** Subsector name */
2113
+ name: string;
2114
+ /** Cost basis of this group (Rupiah) */
2115
+ total_value: number;
2116
+ /** Share of the total portfolio cost basis (%) */
2117
+ share: number;
2118
+ }
2119
+ export interface AlertsCreateResponse {
2120
+ /** Success message, e.g. "New Live Alert {name} added successfully" */
2121
+ message: string;
2122
+ }
2123
+ export interface AlertsListItem {
2124
+ /** Group name: Private (own alerts), Public (scope includes public), Membership (shared with your plan) */
2125
+ name: "Private" | "Public" | "Membership";
2126
+ /** Alerts in this group */
2127
+ groups: AlertsListGroups[];
2128
+ }
2129
+ export interface AlertsListGroups {
2130
+ /** Alert ID (present only in the Private group) */
2131
+ id?: string;
2132
+ /** Alert name */
2133
+ name: string;
2134
+ /** Alert description (null if empty) */
2135
+ description: string | null;
2136
+ /** Evaluation interval */
2137
+ every: "FOURTY_FIVE_SECONDS" | "ONE_MINUTE" | "FIVE_MINUTES" | "TEN_MINUTES" | "THIRTY_MINUTES" | "ONE_HOUR" | "END_SESSION" | "END_OF_DAY";
2138
+ /** When the notification is sent: IN (stock enters the condition), OUT (stock leaves it), IN_OUT (both) */
2139
+ send_on: "IN" | "OUT" | "IN_OUT";
2140
+ /** Visibility list, e.g. ["public"] or plan names */
2141
+ scope: string[] | null;
2142
+ /** Alert formula */
2143
+ formula: string;
2144
+ /** Index categories the stock universe is filtered to; null or empty = all stocks */
2145
+ category: string[] | null;
2146
+ /** Display name of the alert creator */
2147
+ profile_name: string | null;
2148
+ /** Profile picture URL of the alert creator (null if none) */
2149
+ profile_image: string | null;
2150
+ }
2151
+ export interface AlertsTestResponse {
2152
+ /** true if the formula is valid and evaluated without errors; false on error or high-risk pattern */
2153
+ success: boolean;
2154
+ /** Tested formula after automatic normalization (e.g. division guards) */
2155
+ formula: string;
2156
+ /** Number of active stocks evaluated (after the category filter) */
2157
+ total_stocks: number;
2158
+ /** Number of stocks matching the formula */
2159
+ matched_count: number;
2160
+ /** Codes of matching stocks (max 100) */
2161
+ matched_stocks: string[];
2162
+ /** Error message (present only on failure); when success is false it holds the joined warnings or the error */
2163
+ error?: string;
2164
+ /** Evaluation results of the first 5 stocks (absent when validation fails before evaluation) */
2165
+ sample_results?: AlertsTestSampleResults[];
2166
+ /** Formula warnings (absent when empty) */
2167
+ warnings?: AlertsTestWarnings[];
2168
+ /** Applied index category filter (present only when sent) */
2169
+ category_filter?: string[];
2170
+ /** Number of stocks passing the category filter */
2171
+ category_filtered_count?: number;
2172
+ /** Same as error; present only when success is false */
2173
+ message?: string;
2174
+ }
2175
+ export interface AlertsTestSampleResults {
2176
+ /** Stock code */
2177
+ code: string;
2178
+ /** Whether the stock matches the formula */
2179
+ matched: boolean;
2180
+ /** Evaluation error (present only on failure) */
2181
+ error?: string;
2182
+ /** Formula after functions were resolved for this stock */
2183
+ processed_formula?: string;
2184
+ }
2185
+ export interface AlertsTestWarnings {
2186
+ /** Warning level */
2187
+ level: "info" | "warning" | "error";
2188
+ /** Warning message */
2189
+ message: string;
2190
+ /** Formula fragment that triggered the warning */
2191
+ pattern: string;
2192
+ /** Suggested fix (optional) */
2193
+ suggestion?: string;
2194
+ }
2195
+ export interface AlertsUpdateResponse {
2196
+ /** Success message, e.g. "Live Alert {name} updated successfully" */
2197
+ message: string;
2198
+ }
2199
+ export interface AlertsDeleteResponse {
2200
+ /** Success message, e.g. "Live Alert {name} deleted successfully" */
2201
+ message: string;
2202
+ }
2203
+ export interface PostsListResponse {
2204
+ /** Total number of pages for the given limit (0 when there is no data) */
2205
+ totalPage: number;
2206
+ /** Current page number (echo of the page query) */
2207
+ page: number;
2208
+ /** Next page number, null on the last page */
2209
+ nextPage: number | null;
2210
+ /** Posts, newest first */
2211
+ data: PostsListData[];
2212
+ }
2213
+ /** One item of data */
2214
+ export interface PostsListData {
2215
+ /** Post ID (25-character identifier) */
2216
+ id: string;
2217
+ /** Author username */
2218
+ username: string;
2219
+ /** Post content (HTML) */
2220
+ content: string;
2221
+ /** Last update time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2222
+ updated_at: string;
2223
+ /** Creation time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2224
+ created_at: string;
2225
+ /** Post visibility setting */
2226
+ visibility: string | null;
2227
+ /** Author profile image URL, null if not set */
2228
+ image: string | null;
2229
+ /** Author display name, null if not set */
2230
+ name: string | null;
2231
+ /** Whether the author is a verified account */
2232
+ verified: boolean | null;
2233
+ /** Number of likes */
2234
+ like: number | null;
2235
+ /** Number of favorites (bookmarks) */
2236
+ favorite: number | null;
2237
+ /** Number of comments */
2238
+ comment: number | null;
2239
+ /** Whether the caller has liked this post */
2240
+ is_like: boolean;
2241
+ /** Whether the caller has favorited this post */
2242
+ is_favorite: boolean;
2243
+ }
2244
+ export interface PostsListByCategoryResponse {
2245
+ /** Total number of pages for the given limit (0 when there is no data) */
2246
+ totalPage: number;
2247
+ /** Current page number (echo of the page query) */
2248
+ page: number;
2249
+ /** Next page number, null on the last page */
2250
+ nextPage: number | null;
2251
+ /** Posts of the category, newest first */
2252
+ data: PostsListByCategoryData[];
2253
+ }
2254
+ /** One item of data */
2255
+ export interface PostsListByCategoryData {
2256
+ /** Post ID (25-character identifier) */
2257
+ id: string;
2258
+ /** Author username */
2259
+ username: string;
2260
+ /** Post content (HTML) */
2261
+ content: string;
2262
+ /** Last update time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2263
+ updated_at: string;
2264
+ /** Creation time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2265
+ created_at: string;
2266
+ /** Post visibility setting */
2267
+ visibility: string | null;
2268
+ /** Author profile image URL, null if not set */
2269
+ image: string | null;
2270
+ /** Author display name, null if not set */
2271
+ name: string | null;
2272
+ /** Whether the author is a verified account */
2273
+ verified: boolean | null;
2274
+ /** Number of likes */
2275
+ like: number | null;
2276
+ /** Number of favorites (bookmarks) */
2277
+ favorite: number | null;
2278
+ /** Number of comments */
2279
+ comment: number | null;
2280
+ /** Whether the caller has liked this post */
2281
+ is_like: boolean;
2282
+ /** Whether the caller has favorited this post */
2283
+ is_favorite: boolean;
2284
+ }
2285
+ export interface PostsListByStockResponse {
2286
+ /** Total number of pages for the given limit (0 when there is no data) */
2287
+ totalPage: number;
2288
+ /** Current page number (echo of the page query) */
2289
+ page: number;
2290
+ /** Next page number, null on the last page */
2291
+ nextPage: number | null;
2292
+ /** Posts mentioning the stock, newest first */
2293
+ data: PostsListByStockData[];
2294
+ }
2295
+ /** One item of data */
2296
+ export interface PostsListByStockData {
2297
+ /** Post ID (25-character identifier) */
2298
+ id: string;
2299
+ /** Author username */
2300
+ username: string;
2301
+ /** Post content (HTML) */
2302
+ content: string;
2303
+ /** Last update time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2304
+ updated_at: string;
2305
+ /** Creation time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2306
+ created_at: string;
2307
+ /** Post visibility setting */
2308
+ visibility: string | null;
2309
+ /** Author profile image URL, null if not set */
2310
+ image: string | null;
2311
+ /** Author display name, null if not set */
2312
+ name: string | null;
2313
+ /** Whether the author is a verified account */
2314
+ verified: boolean | null;
2315
+ /** Number of likes */
2316
+ like: number;
2317
+ /** Number of favorites (bookmarks) */
2318
+ favorite: number;
2319
+ /** Number of comments */
2320
+ comment: number;
2321
+ /** Whether the caller has liked this post */
2322
+ is_like: boolean;
2323
+ /** Whether the caller has favorited this post */
2324
+ is_favorite: boolean;
2325
+ }
2326
+ export interface PostsListByStockCategoryResponse {
2327
+ /** Total number of pages for the given limit (0 when there is no data) */
2328
+ totalPage: number;
2329
+ /** Current page number (echo of the page query) */
2330
+ page: number;
2331
+ /** Next page number, null on the last page */
2332
+ nextPage: number | null;
2333
+ /** Posts mentioning the stock in the category, newest first */
2334
+ data: PostsListByStockCategoryData[];
2335
+ }
2336
+ /** One item of data */
2337
+ export interface PostsListByStockCategoryData {
2338
+ /** Post ID (25-character identifier) */
2339
+ id: string;
2340
+ /** Author username */
2341
+ username: string;
2342
+ /** Post content (HTML) */
2343
+ content: string;
2344
+ /** Last update time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2345
+ updated_at: string;
2346
+ /** Creation time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2347
+ created_at: string;
2348
+ /** Post visibility setting */
2349
+ visibility: string | null;
2350
+ /** Author profile image URL, null if not set */
2351
+ image: string | null;
2352
+ /** Author display name, null if not set */
2353
+ name: string | null;
2354
+ /** Whether the author is a verified account */
2355
+ verified: boolean | null;
2356
+ /** Number of likes */
2357
+ like: number | null;
2358
+ /** Number of favorites (bookmarks) */
2359
+ favorite: number | null;
2360
+ /** Number of comments */
2361
+ comment: number | null;
2362
+ /** Whether the caller has liked this post */
2363
+ is_like: boolean;
2364
+ /** Whether the caller has favorited this post */
2365
+ is_favorite: boolean;
2366
+ }
2367
+ /** Single post */
2368
+ export interface PostDetailResponse {
2369
+ /** Post ID (25-character identifier) */
2370
+ id: string;
2371
+ /** Author username */
2372
+ username: string;
2373
+ /** Post content (HTML) */
2374
+ content: string;
2375
+ /** Last update time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2376
+ updated_at: string;
2377
+ /** Creation time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2378
+ created_at: string;
2379
+ /** Post visibility setting */
2380
+ visibility: string | null;
2381
+ /** Author profile image URL, null if not set */
2382
+ image: string | null;
2383
+ /** Author display name, null if not set */
2384
+ name: string | null;
2385
+ /** Whether the author is a verified account */
2386
+ verified: boolean | null;
2387
+ /** Number of likes */
2388
+ like: number;
2389
+ /** Number of favorites (bookmarks) */
2390
+ favorite: number;
2391
+ /** Number of comments */
2392
+ comment: number;
2393
+ /** Whether the caller has liked this post */
2394
+ is_like: boolean;
2395
+ /** Whether the caller has favorited this post */
2396
+ is_favorite: boolean;
2397
+ }
2398
+ export interface PostsCommentsResponse {
2399
+ /** Total number of pages for the given limit (0 when there is no data) */
2400
+ totalPage: number;
2401
+ /** Current page number (echo of the page query) */
2402
+ page: number;
2403
+ /** Next page number, null on the last page */
2404
+ nextPage: number | null;
2405
+ /** Comments, oldest update first */
2406
+ data: PostsCommentsData[];
2407
+ }
2408
+ /** One item of data */
2409
+ export interface PostsCommentsData {
2410
+ /** Comment ID */
2411
+ id: string;
2412
+ /** Commenter username */
2413
+ username: string;
2414
+ /** ID of the post this comment belongs to */
2415
+ post_id: string;
2416
+ /** Comment content (HTML) */
2417
+ content: string;
2418
+ /** Last update time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2419
+ updated_at: string;
2420
+ /** Creation time, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2421
+ created_at: string;
2422
+ /** Author profile image URL, null if not set */
2423
+ image: string | null;
2424
+ /** Author display name, null if not set */
2425
+ name: string | null;
2426
+ /** Whether the author is a verified account */
2427
+ verified: boolean | null;
2428
+ /** Number of likes on the comment (numeric string) */
2429
+ like: string;
2430
+ /** Number of favorites on the comment (numeric string) */
2431
+ favorite: string;
2432
+ /** Whether the caller has liked this comment */
2433
+ is_like: boolean;
2434
+ /** Whether the caller has favorited this comment */
2435
+ is_favorite: boolean;
2436
+ }
2437
+ export interface PostsLikesResponse {
2438
+ /** Total number of pages for the given limit (0 when there is no data) */
2439
+ totalPage: number;
2440
+ /** Current page number (echo of the page query) */
2441
+ page: number;
2442
+ /** Next page number, null on the last page */
2443
+ nextPage: number | null;
2444
+ /** Liked items, most recent first */
2445
+ data: PostsLikesData[];
2446
+ }
2447
+ /** One item of data */
2448
+ export interface PostsLikesData {
2449
+ /** ID of the liked/favorited post or comment */
2450
+ id: string;
2451
+ /** Post or comment content (HTML) */
2452
+ content: string;
2453
+ /** Last update time of the post/comment, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2454
+ updated_at: string;
2455
+ /** Creation time of the post/comment, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2456
+ created_at: string;
2457
+ /** Author profile image URL, null if not set */
2458
+ image: string | null;
2459
+ /** Author display name, null if not set */
2460
+ name: string | null;
2461
+ /** Author username of the post/comment */
2462
+ username: string;
2463
+ /** Whether the author is a verified account */
2464
+ verified: boolean | null;
2465
+ /** Number of likes (numeric string; always "1" in the like list) */
2466
+ like: string;
2467
+ /** Number of favorites (numeric string) */
2468
+ favorite: string;
2469
+ /** Number of comments on the post, or replies for a comment (numeric string) */
2470
+ comment: string;
2471
+ /** Whether the caller has liked this item */
2472
+ is_like: boolean;
2473
+ /** Whether the caller has favorited this item */
2474
+ is_favorite: boolean;
2475
+ /** For a comment: ID of the post it belongs to; null for a post */
2476
+ parent_id: string | null;
2477
+ /** Time the caller liked the item, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2478
+ like_created_at: string;
2479
+ }
2480
+ export interface PostsFavoritesResponse {
2481
+ /** Total number of pages for the given limit (0 when there is no data) */
2482
+ totalPage: number;
2483
+ /** Current page number (echo of the page query) */
2484
+ page: number;
2485
+ /** Next page number, null on the last page */
2486
+ nextPage: number | null;
2487
+ /** Favorited items, most recent first */
2488
+ data: PostsFavoritesData[];
2489
+ }
2490
+ /** One item of data */
2491
+ export interface PostsFavoritesData {
2492
+ /** ID of the liked/favorited post or comment */
2493
+ id: string;
2494
+ /** Post or comment content (HTML) */
2495
+ content: string;
2496
+ /** Last update time of the post/comment, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2497
+ updated_at: string;
2498
+ /** Creation time of the post/comment, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2499
+ created_at: string;
2500
+ /** Author profile image URL, null if not set */
2501
+ image: string | null;
2502
+ /** Author display name, null if not set */
2503
+ name: string | null;
2504
+ /** Author username of the post/comment */
2505
+ username: string;
2506
+ /** Whether the author is a verified account */
2507
+ verified: boolean | null;
2508
+ /** Number of likes (numeric string) */
2509
+ like: string;
2510
+ /** Number of favorites (numeric string; always "1" in the favorite list) */
2511
+ favorite: string;
2512
+ /** Number of comments on the post, or replies for a comment (numeric string) */
2513
+ comment: string;
2514
+ /** Whether the caller has liked this item */
2515
+ is_like: boolean;
2516
+ /** Whether the caller has favorited this item */
2517
+ is_favorite: boolean;
2518
+ /** For a comment: ID of the post it belongs to; null for a post */
2519
+ parent_id: string | null;
2520
+ /** Time the caller favorited the item, WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2521
+ favorite_created_at: string;
2522
+ }
2523
+ /** Vote summary of the post's stock prediction. When the post has no stock prediction the response is HTTP 200 with an empty body. */
2524
+ export interface PostsVotersResponse {
2525
+ /** Whether the caller has already voted on this post's stock pick */
2526
+ liked: boolean;
2527
+ /** Number of agree votes, null if no vote has been counted yet */
2528
+ agree: number | null;
2529
+ /** Number of disagree votes, null if no vote has been counted yet */
2530
+ disagree: number | null;
2531
+ }
2532
+ export interface TradesListItem {
2533
+ /** Realized trade ID (use it with PATCH /trades/{id} and DELETE /trades) */
2534
+ id: string;
2535
+ /** Stock code */
2536
+ code: string;
2537
+ /** Two-letter broker code */
2538
+ broker: string;
2539
+ /** Sell date; WIB wall-clock DateTime with a literal Z suffix (not UTC), e.g. 2026-10-16T00:00:00.000Z */
2540
+ date: string;
2541
+ /** Sold lots (1 lot = 100 shares) */
2542
+ lot: number;
2543
+ /** Average buy price per share incl. buy fee at the time of the sale (Rupiah) */
2544
+ buy_price: number;
2545
+ /** Sell price per share (Rupiah) */
2546
+ sell_price: number;
2547
+ /** lot x 100 x buy_price, rounded (Rupiah) */
2548
+ buy_value: number;
2549
+ /** lot x 100 x sell_price, before sell fee (Rupiah) */
2550
+ sell_value: number;
2551
+ /** Realized profit/loss = sell_value - sell fee - buy_value, rounded (Rupiah) */
2552
+ net: number;
2553
+ /** (sell_price - buy_price) / buy_price x 100, 4 decimals (%) */
2554
+ percent: number;
2555
+ /** PROFIT, LOSS or BEP (by net) */
2556
+ status: "PROFIT" | "LOSS" | "BEP";
2557
+ /** User note */
2558
+ note: string | null;
2559
+ }
2560
+ export interface TradesDeleteResponse {
2561
+ /** Confirmation message with the number of IDs sent, e.g. "2 trade deleted" */
2562
+ message: string;
2563
+ }
2564
+ export interface TradesSummaryResponse {
2565
+ /** Stock codes ordered by number of realized trades, most frequent first */
2566
+ top_code: string[];
2567
+ /** Number of realized trades in the period */
2568
+ total_transaction: number;
2569
+ /** Number of PROFIT trades */
2570
+ total_profit: number;
2571
+ /** Number of LOSS trades */
2572
+ total_loss: number;
2573
+ /** Number of BEP (break-even) trades */
2574
+ total_bep: number;
2575
+ /** Sum of buy_value (Rupiah) */
2576
+ total_buy_value: number;
2577
+ /** Sum of sell_value (Rupiah) */
2578
+ total_sell_value: number;
2579
+ /** Sum of net realized profit/loss (Rupiah) */
2580
+ total_net: number;
2581
+ /** PROFIT trades / all trades (%) */
2582
+ win_rate: number;
2583
+ /** LOSS trades / all trades (%) */
2584
+ loss_rate: number;
2585
+ /** BEP trades / all trades (%) */
2586
+ bep_rate: number;
2587
+ /** Trade with the largest net profit */
2588
+ top_win_value: TradesSummaryTopWinValue;
2589
+ /** Trade with the largest net loss (most negative net) */
2590
+ top_loss_value: TradesSummaryTopLossValue;
2591
+ /** Trade with the best percent among PROFIT trades */
2592
+ top_win_percent: TradesSummaryTopWinPercent;
2593
+ /** Trade with the worst percent among LOSS trades */
2594
+ top_loss_percent: TradesSummaryTopLossPercent;
2595
+ }
2596
+ /** Trade with the largest net profit */
2597
+ export interface TradesSummaryTopWinValue {
2598
+ /** Stock code (empty string when there is no such trade) */
2599
+ code: string;
2600
+ /** Largest net profit (Rupiah); 0 when there is no such trade */
2601
+ value: number;
2602
+ }
2603
+ /** Trade with the largest net loss (most negative net) */
2604
+ export interface TradesSummaryTopLossValue {
2605
+ /** Stock code (empty string when there is no such trade) */
2606
+ code: string;
2607
+ /** Largest net loss (most negative net) (Rupiah); 0 when there is no such trade */
2608
+ value: number;
2609
+ }
2610
+ /** Trade with the best percent among PROFIT trades */
2611
+ export interface TradesSummaryTopWinPercent {
2612
+ /** Stock code (empty string when there is no such trade) */
2613
+ code: string;
2614
+ /** Best percent among PROFIT trades (%); 0 when there is no such trade */
2615
+ value: number;
2616
+ }
2617
+ /** Trade with the worst percent among LOSS trades */
2618
+ export interface TradesSummaryTopLossPercent {
2619
+ /** Stock code (empty string when there is no such trade) */
2620
+ code: string;
2621
+ /** Worst percent among LOSS trades (%); 0 when there is no such trade */
2622
+ value: number;
2623
+ }
2624
+ export interface TradesSummaryChartItem {
2625
+ /** Trading day (YYYY-MM-DD, WIB) */
2626
+ date: string;
2627
+ /** Realized net profit/loss on that day, 2 decimals (Rupiah) */
2628
+ net: number | null;
2629
+ /** Running total of net from the start of the period, 2 decimals (Rupiah) */
2630
+ cumulative_net: number | null;
2631
+ /** Closing level of the comparison index on that day, 2 decimals; null if no index data */
2632
+ close: number | null;
2633
+ }
2634
+ export interface TradesUpdateNoteResponse {
2635
+ /** Confirmation message, e.g. "Trade note updated" */
2636
+ message: string;
2637
+ }
2638
+ export interface NewsResponse {
2639
+ /** Total number of pages for the given limit (0 when there is no data) */
2640
+ totalPage: number;
2641
+ /** Current page number (echo of the page query) */
2642
+ page: number;
2643
+ /** Next page number, null on the last page */
2644
+ nextPage: number | null;
2645
+ /** News items, newest first */
2646
+ data: NewsData[];
2647
+ }
2648
+ /** One item of data */
2649
+ export interface NewsData {
2650
+ /** News headline */
2651
+ title: string;
2652
+ /** Publication time, WIB wall-clock in YYYY-MM-DDTHH:MM:SS format (no Z, no fraction), e.g. 2026-09-29T08:00:00 */
2653
+ date: string;
2654
+ /** News body as plain text (HTML converted; paragraphs separated by a blank line) */
2655
+ content: string;
2656
+ }
2657
+ export interface DisclosureResponse {
2658
+ /** Total number of pages for the given limit (0 when there is no data) */
2659
+ totalPage: number;
2660
+ /** Current page number (echo of the page query) */
2661
+ page: number;
2662
+ /** Next page number, null on the last page */
2663
+ nextPage: number | null;
2664
+ /** Disclosures, newest first */
2665
+ data: DisclosureData[];
2666
+ }
2667
+ /** One item of data */
2668
+ export interface DisclosureData {
2669
+ /** Disclosure title */
2670
+ title: string;
2671
+ /** Issuer stock code (empty string if not tagged) */
2672
+ code: string;
2673
+ /** Publication time, WIB wall-clock in YYYY-MM-DDTHH:MM:SS format (no Z, no fraction), e.g. 2026-09-29T08:00:00 */
2674
+ date: string;
2675
+ /** Disclosure type, e.g. public_expose (empty string if not tagged) */
2676
+ type: string;
2677
+ /** Attachment files */
2678
+ list: DisclosureDataList[];
2679
+ }
2680
+ /** One attachment file */
2681
+ export interface DisclosureDataList {
2682
+ /** Attachment file URL on IDX */
2683
+ url: string;
2684
+ /** Attachment file name */
2685
+ name: string;
2686
+ }
2687
+ /** Response of `GET /analysis/list/stock`. */
2688
+ export type StockListResponse = StockListItem[];
2689
+ /** Response of `GET /analysis/list/broker`. */
2690
+ export type BrokerListResponse = BrokerListItem[];
2691
+ /** Response of `GET /analysis/list/index`. */
2692
+ export type IndexListResponse = IndexListItem[];
2693
+ /** Response of `GET /analysis/notation`. */
2694
+ export type NotationResponse = NotationItem[];
2695
+ /** Response of `GET /analysis/intraday/{code}`. */
2696
+ export type IntradayChartResponse = IntradayChartItem[];
2697
+ /** Response of `GET /analysis/queue/{code}`. */
2698
+ export type OrderQueueResponse = OrderQueueItem[];
2699
+ /** Response of `GET /analysis/chart/stock/{code}`. */
2700
+ export type AdvanceChartResponse = AdvanceChartItem[];
2701
+ /** Response of `GET /analysis/chart/index/{code}`. */
2702
+ export type IndexChartResponse = IndexChartItem[];
2703
+ /** Response of `GET /analysis/chart/multi-time/{code}`. */
2704
+ export type MultiTimeChartResponse = MultiTimeChartItem[];
2705
+ /** Response of `GET /analysis/chart/stock/{indicator}/{code}`. */
2706
+ export type IndicatorChartResponse = IndicatorChartItem[];
2707
+ /** Response of `GET /analysis/shareholder-detail`. */
2708
+ export type ShareholderDetailResponse = ShareholderDetailItem[];
2709
+ /** Response of `GET /analysis/shareholder-detail-one`. */
2710
+ export type ShareholderOneDetailResponse = ShareholderOneDetailItem[];
2711
+ /** Response of `GET /analysis/shareholder/high`. */
2712
+ export type ShareholderHighResponse = ShareholderHighItem[];
2713
+ /** Response of `GET /analysis/shareholder/number/{code}`. */
2714
+ export type ShareholderNumberResponse = ShareholderNumberItem[];
2715
+ /** Response of `GET /analysis/shareholder/{code}`. */
2716
+ export type ShareholderResponse = ShareholderItem[];
2717
+ /** Response of `GET /analysis/shareholder/ksei/{code}`. */
2718
+ export type ShareholderKSEIResponse = ShareholderKSEIItem[];
2719
+ /** Response of `GET /analysis/shareholder/classification/{code}`. */
2720
+ export type ShareholderClassificationResponse = ShareholderClassificationItem[];
2721
+ /** Response of `GET /analysis/summary/stock/{code}`. */
2722
+ export type SummaryStockResponse = SummaryStockItem[];
2723
+ /** Response of `GET /analysis/summary/broker/{code}`. */
2724
+ export type SummaryBrokerResponse = SummaryBrokerItem[];
2725
+ /** Response of `GET /analysis/summary-chart/stock/{code}`. */
2726
+ export type SummaryStockChartResponse = SummaryStockChartItem[];
2727
+ /** Response of `GET /analysis/summary-chart/broker/{code}`. */
2728
+ export type SummaryBrokerChartResponse = SummaryBrokerChartItem[];
2729
+ /** Response of `GET /analysis/inventory-chart/broker/{code}`. */
2730
+ export type InventoryBrokerChartResponse = InventoryBrokerChartItem[];
2731
+ /** Response of `GET /analysis/momentum-chart/{code}`. */
2732
+ export type MomentumChartResponse = MomentumChartItem[];
2733
+ /** Response of `GET /analysis/price-table/{code}`. */
2734
+ export type PriceTableResponse = PriceTableItem[];
2735
+ /** Response of `GET /analysis/time-table/{code}`. */
2736
+ export type TimeTableResponse = TimeTableItem[];
2737
+ /** Response of `GET /analysis/price-diary/{code}`. */
2738
+ export type PriceDiaryResponse = PriceDiaryItem[];
2739
+ /** Response of `GET /analysis/price-seasonality/{code}`. */
2740
+ export type PriceSeasonalityResponse = PriceSeasonalityItem[];
2741
+ /** Response of `GET /analysis/shareholder-above-chart/{code}`. */
2742
+ export type ShareholderAboveChartResponse = ShareholderAboveChartItem[];
2743
+ /** Response of `GET /analysis/shareholder-one-chart/{code}`. */
2744
+ export type ShareholderOneChartResponse = ShareholderOneChartItem[];
2745
+ /** Response of `GET /analysis/insider-chart/{code}`. */
2746
+ export type InsiderChartResponse = InsiderChartItem[];
2747
+ /** Response of `GET /batch/order-book/{code}`. */
2748
+ export type BatchOrderBookResponse = BatchOrderBookItem[];
2749
+ /** Response of `GET /batch/intraday-data/{code}`. */
2750
+ export type BatchIntradayDataResponse = BatchIntradayDataItem[];
2751
+ /** Response of `GET /batch/intraday-index/{code}`. */
2752
+ export type BatchIntradayIndexResponse = BatchIntradayIndexItem[];
2753
+ /** Response of `POST /screener/screen`. */
2754
+ export type ScreenerScreenResponse = ScreenerScreenItem[];
2755
+ /** Response of `GET /screener`. */
2756
+ export type ScreenerListResponse = ScreenerListItem[];
2757
+ /** Response of `GET /usage/logs`. */
2758
+ export type UsageLogsResponse = UsageLogsItem[];
2759
+ /** Response of `GET /watchlists`. */
2760
+ export type WatchlistsListResponse = WatchlistsListItem[];
2761
+ /** Response of `GET /watchlists/group`. */
2762
+ export type WatchlistsListGroupsResponse = WatchlistsListGroupsItem[];
2763
+ /** Response of `GET /journals`. */
2764
+ export type JournalsListResponse = JournalsListItem[];
2765
+ /** Response of `GET /portfolios`. */
2766
+ export type PortfoliosListResponse = PortfoliosListItem[];
2767
+ /** Response of `GET /alerts`. */
2768
+ export type AlertsListResponse = AlertsListItem[];
2769
+ /** Response of `GET /trades`. */
2770
+ export type TradesListResponse = TradesListItem[];
2771
+ /** Response of `GET /trades/summary-chart`. */
2772
+ export type TradesSummaryChartResponse = TradesSummaryChartItem[];
2773
+ /** Query parameters for `GET /analysis/uma`. */
2774
+ export interface UmaParams {
2775
+ /** Nomor halaman, dimulai dari 1. Default: `1`. Min: `1`. Example: `1`. */
2776
+ page?: number;
2777
+ /** Jumlah data per halaman, 1-100. Default: `20`. Min: `1`. Max: `100`. Example: `20`. */
2778
+ limit?: number;
2779
+ /** Filter kode saham, mis. `BBCA` (opsional). Example: `BBCA`. */
2780
+ code?: string;
2781
+ }
2782
+ /** Query parameters for `GET /analysis/suspend`. */
2783
+ export interface SuspendParams {
2784
+ /** Nomor halaman, dimulai dari 1. Default: `1`. Min: `1`. Example: `1`. */
2785
+ page?: number;
2786
+ /** Jumlah data per halaman, 1-100. Default: `20`. Min: `1`. Max: `100`. Example: `20`. */
2787
+ limit?: number;
2788
+ /** Filter kode saham, mis. `BBCA` (opsional). Example: `BBCA`. */
2789
+ code?: string;
2790
+ /** `true`: hanya suspensi yang masih berlaku (end_date null); `false`: hanya yang sudah dicabut; kosongkan untuk semua (opsional). Example: `True`. */
2791
+ active?: boolean;
2792
+ }
2793
+ /** Query parameters for `GET /analysis/top/change`. */
2794
+ export interface TopChangeParams {
2795
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
2796
+ date: string;
2797
+ /** Kolom yang difilter: `change` = perubahan harga (%), `value` = nilai transaksi, `volume` = volume, `ratio` = rasio. Filter aktif hanya jika `filter_column`, `filter_operator`, dan `filter_value` dikirim bersamaan. Example: `change`. */
2798
+ filter_column?: "change" | "value" | "volume" | "ratio";
2799
+ /** Operator pembanding untuk filter. Contoh: `filter_column=change&filter_operator=>&filter_value=5` menampilkan saham yang naik lebih dari 5%. Example: `>`. */
2800
+ filter_operator?: "<" | ">" | "=" | ">=" | "<=" | "!=";
2801
+ /** Nilai pembanding untuk filter. Mendukung bilangan desimal dan negatif, mis. `5` atau `-2.5`. Example: `5`. */
2802
+ filter_value?: number;
2803
+ }
2804
+ /** Query parameters for `GET /analysis/top/foreign`. */
2805
+ export interface TopForeignParams {
2806
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
2807
+ date: string;
2808
+ /** Kolom yang difilter: `change` = perubahan harga (%), `value` = nilai transaksi, `volume` = volume, `ratio` = rasio. Filter aktif hanya jika `filter_column`, `filter_operator`, dan `filter_value` dikirim bersamaan. Example: `change`. */
2809
+ filter_column?: "change" | "value" | "volume" | "ratio";
2810
+ /** Operator pembanding untuk filter. Contoh: `filter_column=change&filter_operator=>&filter_value=5` menampilkan saham yang naik lebih dari 5%. Example: `>`. */
2811
+ filter_operator?: "<" | ">" | "=" | ">=" | "<=" | "!=";
2812
+ /** Nilai pembanding untuk filter. Mendukung bilangan desimal dan negatif, mis. `5` atau `-2.5`. Example: `5`. */
2813
+ filter_value?: number;
2814
+ }
2815
+ /** Query parameters for `GET /analysis/top/accumulation`. */
2816
+ export interface TopAccumulationParams {
2817
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
2818
+ date: string;
2819
+ /** Kolom yang difilter: `change` = perubahan harga (%), `value` = nilai transaksi, `volume` = volume, `ratio` = rasio. Filter aktif hanya jika `filter_column`, `filter_operator`, dan `filter_value` dikirim bersamaan. Example: `change`. */
2820
+ filter_column?: "change" | "value" | "volume" | "ratio";
2821
+ /** Operator pembanding untuk filter. Contoh: `filter_column=change&filter_operator=>&filter_value=5` menampilkan saham yang naik lebih dari 5%. Example: `>`. */
2822
+ filter_operator?: "<" | ">" | "=" | ">=" | "<=" | "!=";
2823
+ /** Nilai pembanding untuk filter. Mendukung bilangan desimal dan negatif, mis. `5` atau `-2.5`. Example: `5`. */
2824
+ filter_value?: number;
2825
+ }
2826
+ /** Query parameters for `GET /analysis/top/ritel`. */
2827
+ export interface TopRitelParams {
2828
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
2829
+ date: string;
2830
+ /** Kolom yang difilter: `change` = perubahan harga (%), `value` = nilai transaksi, `volume` = volume, `ratio` = rasio. Filter aktif hanya jika `filter_column`, `filter_operator`, dan `filter_value` dikirim bersamaan. Example: `change`. */
2831
+ filter_column?: "change" | "value" | "volume" | "ratio";
2832
+ /** Operator pembanding untuk filter. Contoh: `filter_column=change&filter_operator=>&filter_value=5` menampilkan saham yang naik lebih dari 5%. Example: `>`. */
2833
+ filter_operator?: "<" | ">" | "=" | ">=" | "<=" | "!=";
2834
+ /** Nilai pembanding untuk filter. Mendukung bilangan desimal dan negatif, mis. `5` atau `-2.5`. Example: `5`. */
2835
+ filter_value?: number;
2836
+ }
2837
+ /** Query parameters for `GET /analysis/running-trade/{code}`. */
2838
+ export interface StockRunningTradeParams {
2839
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2026-03-25`. */
2840
+ date: string;
2841
+ /** Nomor halaman, dimulai dari 1. Default: `1`. Min: `1`. Example: `1`. */
2842
+ page?: number;
2843
+ /** Jumlah transaksi per halaman. Default: `50`. Min: `1`. Max: `1000`. Example: `50`. */
2844
+ limit?: number;
2845
+ /** Sisi transaksi: `BUY` = match di harga offer (inisiatif beli), `SELL` = match di harga bid (inisiatif jual), `ALL` = seluruh transaksi. Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Default: `ALL`. Example: `ALL`. */
2846
+ type?: "ALL" | "BUY" | "SELL";
2847
+ /** Kolom pengurutan: `TIME` = waktu transaksi, `PRICE` = harga, `VOLUME` = volume. Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Default: `TIME`. Example: `TIME`. */
2848
+ orderby?: "TIME" | "PRICE" | "VOLUME";
2849
+ /** Volume minimal transaksi yang ditampilkan, dalam lembar (1 lot = 100 lembar). Berguna untuk menyaring transaksi besar. Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Min: `0`. Example: `100`. */
2850
+ minimum?: number;
2851
+ /** Volume maksimal transaksi yang ditampilkan, dalam lembar (1 lot = 100 lembar). Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Min: `0`. Example: `10000`. */
2852
+ maximum?: number;
2853
+ /** Jenis pasar: `ALL` = seluruh pasar, `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Default: `ALL`. Example: `RG`. */
2854
+ market?: "ALL" | "RG" | "NG" | "TN";
2855
+ /** Harga terendah transaksi yang ditampilkan (Rupiah). Menampilkan transaksi dengan harga >= `pricefrom`. Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Min: `1`. Example: `9000`. */
2856
+ pricefrom?: number;
2857
+ /** Harga tertinggi transaksi yang ditampilkan (Rupiah). Menampilkan transaksi dengan harga <= `priceto`. Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Min: `1`. Example: `9500`. */
2858
+ priceto?: number;
2859
+ /** Jam awal transaksi dalam WIB, format `HH:mm` atau `HH:mm:ss`. Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Example: `09:00:00`. */
2860
+ timefrom?: string;
2861
+ /** Jam akhir transaksi dalam WIB, format `HH:mm` atau `HH:mm:ss`. Tanpa detik, dihitung hingga detik ke-59. Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Example: `16:00:00`. */
2862
+ timeto?: string;
2863
+ /** Arah pengurutan: `ASC` = menaik (terlama lebih dulu), `DESC` = menurun (terbaru lebih dulu). Diabaikan saat jam bursa (tanggal hari ini, 08:45–16:15 WIB pada hari bursa); hanya berlaku pada pengambilan data sehari penuh. Default: `ASC`. Example: `DESC`. */
2864
+ sort?: "ASC" | "DESC";
2865
+ }
2866
+ /** Query parameters for `GET /analysis/intraday/{code}`. */
2867
+ export interface IntradayChartParams {
2868
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
2869
+ market: "RG" | "NG" | "TN";
2870
+ }
2871
+ /** Query parameters for `GET /analysis/order-book/{code}`. */
2872
+ export interface OrderBookParams {
2873
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
2874
+ market: "RG" | "NG" | "TN";
2875
+ /** Tanggal order book historis (`YYYY-MM-DD`), tersedia mulai `2026-03-25`. Wajib dikirim bersama `time`; kosongkan keduanya untuk data realtime. Format: `YYYY-MM-DD`. Example: `2026-03-25`. */
2876
+ date?: string;
2877
+ /** Jam snapshot order book dalam WIB, format `HH:mm` pada jam perdagangan (09:00–15:59). Wajib dikirim bersama `date`. Example: `09:30`. */
2878
+ time?: string;
2879
+ }
2880
+ /** Query parameters for `GET /analysis/queue/{code}`. */
2881
+ export interface OrderQueueParams {
2882
+ /** Level harga order book (Rupiah) yang ingin dilihat detail antreannya. Harus sesuai fraksi harga saham. Min: `1`. Example: `9250`. */
2883
+ price: number;
2884
+ /** Sisi antrean: `BUY` = antrean beli (bid), `SELL` = antrean jual (offer). Example: `BUY`. */
2885
+ side: "BUY" | "SELL" | "B" | "S" | "buy" | "sell";
2886
+ /** Nomor halaman, dimulai dari 0. Default: `0`. Min: `0`. Example: `0`. */
2887
+ page?: number;
2888
+ /** Jumlah order per halaman. Default: `50`. Min: `1`. Max: `50`. Example: `50`. */
2889
+ limit?: number;
2890
+ }
2891
+ /** Query parameters for `GET /analysis/intraday-data/{code}`. */
2892
+ export interface IntradayDataParams {
2893
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
2894
+ market: "RG" | "NG" | "TN";
2895
+ /** Tanggal data historis (`YYYY-MM-DD`). Kosongkan untuk data realtime hari ini. Format: `YYYY-MM-DD`. Example: `2025-02-10`. */
2896
+ date?: string;
2897
+ }
2898
+ /** Query parameters for `GET /analysis/chart/stock/{code}`. */
2899
+ export interface AdvanceChartParams {
2900
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Opsional; default 1 tahun sebelum hari ini (WIB). Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
2901
+ from?: string;
2902
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Opsional; default hari ini (WIB). Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
2903
+ to?: string;
2904
+ }
2905
+ /** Query parameters for `GET /analysis/chart/index/{code}`. */
2906
+ export interface IndexChartParams {
2907
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
2908
+ from: string;
2909
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
2910
+ to: string;
2911
+ }
2912
+ /** Query parameters for `GET /analysis/chart/multi-time/{code}`. */
2913
+ export interface MultiTimeChartParams {
2914
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`. Batas data historis mengikuti `timeframe`. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
2915
+ from: string;
2916
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
2917
+ to: string;
2918
+ /** Timeframe candle: `1`, `5`, `15`, `30`, `60` = menit; `D` = harian, `W` = mingguan, `M` = bulanan. Batas data historis: `1` = 3 bulan, `5` = 6 bulan, `15` = 12 bulan, lainnya 24 bulan. Opsional, default `D`; harus huruf kapital. Default: `D`. Example: `D`. */
2919
+ timeframe?: "1" | "5" | "15" | "30" | "60" | "D" | "W" | "M";
2920
+ }
2921
+ /** Query parameters for `GET /analysis/chart/stock/{indicator}/{code}`. */
2922
+ export interface IndicatorChartParams {
2923
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
2924
+ from: string;
2925
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
2926
+ to: string;
2927
+ }
2928
+ /** Query parameters for `GET /analysis/shareholder-detail`. */
2929
+ export interface ShareholderDetailParams {
2930
+ /** Kode saham yang ingin dilihat daftar pemegang sahamnya, mis. `BBCA`. Wajib diisi jika `name` kosong. Example: `BBCA`. */
2931
+ code?: string;
2932
+ /** Nama pemegang saham untuk melihat seluruh saham yang dimilikinya. Wajib diisi jika `code` kosong. Example: `ADARO STRATEGIC INVESTMENTS`. */
2933
+ name?: string;
2934
+ }
2935
+ /** Query parameters for `GET /analysis/shareholder-detail-one`. */
2936
+ export interface ShareholderOneDetailParams {
2937
+ /** Kode saham yang ingin dilihat daftar pemegang sahamnya, mis. `BBCA`. Wajib diisi jika `name` kosong. Example: `BBCA`. */
2938
+ code?: string;
2939
+ /** Nama pemegang saham untuk melihat seluruh saham yang dimilikinya. Wajib diisi jika `code` kosong. Example: `ADARO STRATEGIC INVESTMENTS`. */
2940
+ name?: string;
2941
+ }
2942
+ /** Query parameters for `GET /analysis/shareholder/relation`. */
2943
+ export interface ShareholderRelationParams {
2944
+ /** Kode saham sebagai titik awal graf relasi kepemilikan. Wajib diisi jika `name` kosong. Example: `BBCA`. */
2945
+ code?: string;
2946
+ /** Nama pemegang saham sebagai titik awal graf relasi kepemilikan. Wajib diisi jika `code` kosong. Example: `UBS AG`. */
2947
+ name?: string;
2948
+ /** Kedalaman penelusuran relasi (jumlah lompatan). `1` = relasi langsung, `2` = termasuk relasi tingkat kedua, dan seterusnya. Default: `3`. Min: `1`. Max: `4`. Example: `3`. */
2949
+ depth?: number;
2950
+ /** Jumlah node maksimal (saham dan pemegang saham) dalam graf. Nilai lebih besar menghasilkan graf yang lebih lengkap dengan waktu proses lebih lama. Default: `120`. Min: `10`. Max: `300`. Example: `120`. */
2951
+ max_nodes?: number;
2952
+ /** Jumlah relasi maksimal yang diambil dari setiap node. Default: `25`. Min: `1`. Max: `50`. Example: `25`. */
2953
+ neighbors?: number;
2954
+ /** Persentase kepemilikan minimal yang ditampilkan. Mendukung desimal, mis. `5` untuk pemegang saham minimal 5%. Default: `1`. Min: `0`. Max: `100`. Example: `1`. */
2955
+ min_percentage?: number;
2956
+ }
2957
+ /** Query parameters for `GET /analysis/shareholder/ksei/{code}`. */
2958
+ export interface ShareholderKSEIParams {
2959
+ /** Jumlah bulan terakhir yang ditampilkan, mis. `6` untuk 6 bulan terakhir. Akun TRIAL dibatasi maksimal 12 bulan. Min: `1`. Max: `36`. Example: `6`. */
2960
+ range: number;
2961
+ }
2962
+ /** Query parameters for `GET /analysis/shareholder/classification/{code}`. */
2963
+ export interface ShareholderClassificationParams {
2964
+ /** Jumlah bulan terakhir yang ditampilkan, mis. `6` untuk 6 bulan terakhir. Akun TRIAL dibatasi maksimal 12 bulan. Min: `1`. Max: `36`. Example: `6`. */
2965
+ range: number;
2966
+ }
2967
+ /** Query parameters for `GET /analysis/summary/stock/{code}`. */
2968
+ export interface SummaryStockParams {
2969
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
2970
+ from: string;
2971
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
2972
+ to: string;
2973
+ /** Jenis investor yang dihitung: `all` = seluruh investor, `f` = investor asing, `d` = investor domestik. Example: `all`. */
2974
+ investor: "all" | "f" | "d";
2975
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
2976
+ market: "RG" | "NG" | "TN";
2977
+ }
2978
+ /** Query parameters for `GET /analysis/summary/broker/{code}`. */
2979
+ export interface SummaryBrokerParams {
2980
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
2981
+ from: string;
2982
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
2983
+ to: string;
2984
+ /** Jenis investor yang dihitung: `all` = seluruh investor, `f` = investor asing, `d` = investor domestik. Example: `all`. */
2985
+ investor: "all" | "f" | "d";
2986
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
2987
+ market: "RG" | "NG" | "TN";
2988
+ }
2989
+ /** Query parameters for `GET /analysis/stalker/sector`. */
2990
+ export interface SectorStalkerParams {
2991
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
2992
+ from: string;
2993
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
2994
+ to: string;
2995
+ /** Indeks acuan. `COMPOSITE` (IHSG) menampilkan rotasi antar sektor, sedangkan `SYARIAH` (saham syariah, dibandingkan dengan indeks ISSI) atau indeks sektoral IDX-IC (`IDXENERGY`, `IDXFINANCE`, dst.) menampilkan rotasi saham anggota kategori tersebut. `ISSI` diterima sebagai alias `SYARIAH`. Wajib huruf kapital. Default: `COMPOSITE`. Example: `COMPOSITE`. */
2996
+ base?: "COMPOSITE" | "SYARIAH" | "IDXENERGY" | "IDXBASIC" | "IDXINDUST" | "IDXNONCYC" | "IDXCYCLIC" | "IDXHEALTH" | "IDXFINANCE" | "IDXPROPERT" | "IDXTECHNO" | "IDXINFRA" | "IDXTRANS";
2997
+ /** Jumlah saham maksimal yang ditampilkan. Hanya berlaku jika `base` bukan `COMPOSITE`. Min: `1`. Max: `100`. Example: `10`. */
2998
+ limit?: number;
2999
+ /** Pencarian saham berdasarkan sebagian kode atau nama, mis. `BB` atau `BANK`. Hanya berlaku jika `base` bukan `COMPOSITE`. Example: `BBCA`. */
3000
+ filter?: string;
3001
+ /** Kolom yang difilter: `change` = perubahan harga (%), `value` = nilai transaksi, `volume` = volume, `foreign` = net asing, `freq` = frekuensi, `bdm` = aliran dana bandar, `ritel` = aliran dana ritel, `ratio` = rasio, `open`/`high`/`low`/`close` = harga OHLC. Filter aktif hanya jika `filter_column`, `filter_operator`, dan `filter_value` dikirim bersamaan. Example: `change`. */
3002
+ filter_column?: "change" | "value" | "volume" | "foreign" | "freq" | "bdm" | "ritel" | "ratio" | "open" | "high" | "low" | "close";
3003
+ /** Operator pembanding untuk filter. Contoh: `filter_column=change&filter_operator=>&filter_value=5` menampilkan saham yang naik lebih dari 5%. Example: `>`. */
3004
+ filter_operator?: "<" | ">" | "=" | ">=" | "<=" | "!=";
3005
+ /** Nilai pembanding untuk filter. Mendukung bilangan desimal dan negatif, mis. `5` atau `-2.5`. Example: `5`. */
3006
+ filter_value?: number;
3007
+ }
3008
+ /** Query parameters for `GET /analysis/sector/rotation`. */
3009
+ export interface SectorRotationParams {
3010
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3011
+ from: string;
3012
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
3013
+ to: string;
3014
+ /** Indeks acuan. `COMPOSITE` (IHSG) menampilkan rotasi antar sektor, sedangkan `SYARIAH` (saham syariah, dibandingkan dengan indeks ISSI) atau indeks sektoral IDX-IC (`IDXENERGY`, `IDXFINANCE`, dst.) menampilkan rotasi saham anggota kategori tersebut. `ISSI` diterima sebagai alias `SYARIAH`. Wajib huruf kapital. Default: `COMPOSITE`. Example: `COMPOSITE`. */
3015
+ base?: "COMPOSITE" | "SYARIAH" | "IDXENERGY" | "IDXBASIC" | "IDXINDUST" | "IDXNONCYC" | "IDXCYCLIC" | "IDXHEALTH" | "IDXFINANCE" | "IDXPROPERT" | "IDXTECHNO" | "IDXINFRA" | "IDXTRANS";
3016
+ /** Periode smoothing untuk menghitung RS-Ratio dan RS-Momentum. Nilai kecil lebih responsif, nilai besar lebih halus. Default: `10`. Min: `5`. Max: `50`. Example: `10`. */
3017
+ length?: number;
3018
+ /** Interval data pada Relative Rotation Graph (RRG): `daily` = harian, `weekly` = mingguan. Default: `weekly`. Example: `weekly`. */
3019
+ interval?: "daily" | "weekly";
3020
+ /** Jumlah titik jejak (tail) per sektor atau saham untuk menunjukkan arah pergerakan. Default: `5`. Min: `1`. Max: `52`. Example: `5`. */
3021
+ tail?: number;
3022
+ /** Jumlah saham maksimal yang ditampilkan. Hanya berlaku jika `base` bukan `COMPOSITE`. Min: `1`. Max: `50`. Example: `20`. */
3023
+ limit?: number;
3024
+ /** Pencarian saham berdasarkan sebagian kode atau nama, mis. `BB` atau `BANK`. Hanya berlaku jika `base` bukan `COMPOSITE`. Example: `BBCA`. */
3025
+ filter?: string;
3026
+ /** Kolom yang difilter: `change` = perubahan harga (%), `value` = nilai transaksi, `volume` = volume, `foreign` = net asing, `freq` = frekuensi, `bdm` = aliran dana bandar, `ritel` = aliran dana ritel, `ratio` = rasio, `open`/`high`/`low`/`close` = harga OHLC. Filter aktif hanya jika `filter_column`, `filter_operator`, dan `filter_value` dikirim bersamaan. Example: `change`. */
3027
+ filter_column?: "change" | "value" | "volume" | "foreign" | "freq" | "bdm" | "ritel" | "ratio" | "open" | "high" | "low" | "close";
3028
+ /** Operator pembanding untuk filter. Contoh: `filter_column=change&filter_operator=>&filter_value=5` menampilkan saham yang naik lebih dari 5%. Example: `>`. */
3029
+ filter_operator?: "<" | ">" | "=" | ">=" | "<=" | "!=";
3030
+ /** Nilai pembanding untuk filter. Mendukung bilangan desimal dan negatif, mis. `5` atau `-2.5`. Example: `5`. */
3031
+ filter_value?: number;
3032
+ }
3033
+ /** Query parameters for `GET /analysis/stalker/broker/{broker}/{stock}`. */
3034
+ export interface BrokerStalkerParams {
3035
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3036
+ from: string;
3037
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
3038
+ to: string;
3039
+ /** Jenis investor yang dihitung: `all` = seluruh investor, `f` = investor asing, `d` = investor domestik. Example: `all`. */
3040
+ investor: "all" | "f" | "d";
3041
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
3042
+ market: "RG" | "NG" | "TN";
3043
+ }
3044
+ /** Query parameters for `GET /analysis/stalker/list/{code}`. */
3045
+ export interface BrokerStalkerListParams {
3046
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3047
+ from: string;
3048
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
3049
+ to: string;
3050
+ /** Jenis investor yang dihitung: `all` = seluruh investor, `f` = investor asing, `d` = investor domestik. Example: `all`. */
3051
+ investor: "all" | "f" | "d";
3052
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
3053
+ market: "RG" | "NG" | "TN";
3054
+ }
3055
+ /** Query parameters for `GET /analysis/summary-chart/stock/{code}`. */
3056
+ export interface SummaryStockChartParams {
3057
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3058
+ from: string;
3059
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
3060
+ to: string;
3061
+ /** Metrik yang dihitung: `volume` = jumlah lembar saham, `value` = nilai transaksi (Rupiah), `freq` = frekuensi transaksi. Example: `value`. */
3062
+ scope: "volume" | "value" | "freq";
3063
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
3064
+ market: "RG" | "NG" | "TN";
3065
+ }
3066
+ /** Query parameters for `GET /analysis/summary-chart/broker/{code}`. */
3067
+ export interface SummaryBrokerChartParams {
3068
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3069
+ from: string;
3070
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
3071
+ to: string;
3072
+ /** Metrik yang dihitung: `volume` = jumlah lembar saham, `value` = nilai transaksi (Rupiah), `freq` = frekuensi transaksi. Example: `value`. */
3073
+ scope: "volume" | "value" | "freq";
3074
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
3075
+ market: "RG" | "NG" | "TN";
3076
+ }
3077
+ /** Query parameters for `GET /analysis/inventory-chart/stock/{code}`. */
3078
+ export interface InventoryStockChartParams {
3079
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3080
+ from: string;
3081
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
3082
+ to: string;
3083
+ /** Metrik inventori: `vol` = volume (lembar saham), `val` = nilai transaksi (Rupiah), `freq` = frekuensi transaksi. Example: `val`. */
3084
+ scope: "vol" | "val" | "freq";
3085
+ /** Jenis investor yang dihitung: `all` = seluruh investor, `f` = investor asing, `d` = investor domestik. Example: `all`. */
3086
+ investor: "all" | "f" | "d";
3087
+ /** Jumlah broker teratas yang ditampilkan. Default: `20`. Min: `1`. Max: `50`. Example: `20`. */
3088
+ limit?: number;
3089
+ /** Jenis pasar: `ALL` = seluruh pasar, `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Example: `RG`. */
3090
+ market: "ALL" | "RG" | "NG" | "TN";
3091
+ /** Kode broker yang ingin ditampilkan, dipisahkan koma, mis. `AK,BK`. Kosongkan untuk menampilkan broker teratas. Example: ``. */
3092
+ filter?: string;
3093
+ /** Saat ini tidak digunakan pada endpoint ini. Example: `>`. */
3094
+ filter_operator?: "<" | ">" | "=" | ">=" | "<=" | "!=";
3095
+ /** Saat ini tidak digunakan pada endpoint ini. Example: `0`. */
3096
+ filter_value?: number;
3097
+ }
3098
+ /** Query parameters for `GET /analysis/inventory-chart/broker/{code}`. */
3099
+ export interface InventoryBrokerChartParams {
3100
+ /** Tanggal awal periode (`YYYY-MM-DD`). Harus lebih kecil atau sama dengan `to`, dengan rentang maksimal 730 hari. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3101
+ from: string;
3102
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2024-12-31`. */
3103
+ to: string;
3104
+ /** Metrik inventori: `vol` = volume (lembar saham), `val` = nilai transaksi (Rupiah), `freq` = frekuensi transaksi. Example: `val`. */
3105
+ scope: "vol" | "val" | "freq";
3106
+ /** Jenis investor yang dihitung: `all` = seluruh investor, `f` = investor asing, `d` = investor domestik. Example: `all`. */
3107
+ investor: "all" | "f" | "d";
3108
+ /** Jumlah saham teratas yang ditampilkan. Default: `20`. Min: `1`. Max: `50`. Example: `20`. */
3109
+ limit?: number;
3110
+ /** Jenis pasar: `ALL` = seluruh pasar, `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Example: `RG`. */
3111
+ market: "ALL" | "RG" | "NG" | "TN";
3112
+ /** Kode saham yang ingin ditampilkan, dipisahkan koma, mis. `BBCA,BBRI`. Kosongkan untuk menampilkan saham teratas. Example: ``. */
3113
+ filter?: string;
3114
+ /** Operator pembanding untuk memfilter nilai `scope`. Digunakan bersama `filter_value`. Example: `>`. */
3115
+ filter_operator?: "<" | ">" | "=" | ">=" | "<=" | "!=";
3116
+ /** Nilai pembanding untuk `filter_operator`. Contoh: `>` dengan nilai `0` menampilkan saham yang terakumulasi (net beli). Example: `0`. */
3117
+ filter_value?: number;
3118
+ }
3119
+ /** Query parameters for `GET /analysis/momentum-chart/{code}`. */
3120
+ export interface MomentumChartParams {
3121
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3122
+ date: string;
3123
+ /** Interval waktu dalam menit, mis. `5` untuk per 5 menit atau `60` untuk per jam. Min: `1`. Max: `365`. Example: `60`. */
3124
+ range: number;
3125
+ /** Basis perhitungan: `value` = nilai transaksi (Rupiah), `volume` = jumlah lembar saham. Example: `value`. */
3126
+ scope: "value" | "volume";
3127
+ }
3128
+ /** Query parameters for `GET /analysis/intraday-inventory-chart/{code}`. */
3129
+ export interface IntradayInventoryChartParams {
3130
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3131
+ date: string;
3132
+ /** Interval waktu dalam menit, mis. `5` untuk per 5 menit atau `60` untuk per jam. Min: `1`. Max: `365`. Example: `60`. */
3133
+ range: number;
3134
+ /** Basis perhitungan: `value` = nilai transaksi (Rupiah), `volume` = jumlah lembar saham. Example: `value`. */
3135
+ type: "value" | "volume";
3136
+ /** Jumlah broker teratas yang ditampilkan. Min: `1`. Max: `100`. Example: `10`. */
3137
+ total: number;
3138
+ /** Jenis investor di sisi pembeli: `ALL` = seluruh investor, `F` = asing, `D` = domestik. Example: `ALL`. */
3139
+ buyer: "ALL" | "F" | "D";
3140
+ /** Jenis investor di sisi penjual: `ALL` = seluruh investor, `F` = asing, `D` = domestik. Example: `ALL`. */
3141
+ seller: "ALL" | "F" | "D";
3142
+ /** Kode broker yang ingin ditampilkan, dipisahkan koma, mis. `AK,BK`. Kosongkan untuk menampilkan broker teratas. Example: ``. */
3143
+ filter?: string;
3144
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
3145
+ market: "RG" | "NG" | "TN";
3146
+ }
3147
+ /** Query parameters for `GET /analysis/sankey-chart/{code}`. */
3148
+ export interface SankeyChartParams {
3149
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3150
+ date: string;
3151
+ /** Basis perhitungan: `value` = nilai transaksi (Rupiah), `volume` = jumlah lembar saham. Example: `value`. */
3152
+ type: "value" | "volume";
3153
+ /** Jenis investor di sisi pembeli: `ALL` = seluruh investor, `F` = asing, `D` = domestik. Example: `ALL`. */
3154
+ buyer: "ALL" | "F" | "D";
3155
+ /** Jenis investor di sisi penjual: `ALL` = seluruh investor, `F` = asing, `D` = domestik. Example: `ALL`. */
3156
+ seller: "ALL" | "F" | "D";
3157
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Example: `RG`. */
3158
+ market: "RG" | "NG" | "TN";
3159
+ }
3160
+ /** Query parameters for `GET /analysis/price-table/{code}`. */
3161
+ export interface PriceTableParams {
3162
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3163
+ date: string;
3164
+ }
3165
+ /** Query parameters for `GET /analysis/time-table/{code}`. */
3166
+ export interface TimeTableParams {
3167
+ /** Tanggal data (`YYYY-MM-DD`). Gunakan hari bursa; tanggal libur bursa dapat menghasilkan data kosong. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3168
+ date: string;
3169
+ /** Interval waktu dalam menit, mis. `5` untuk per 5 menit atau `60` untuk per jam. Min: `1`. Max: `365`. Example: `60`. */
3170
+ range: number;
3171
+ }
3172
+ /** Query parameters for `GET /analysis/price-seasonality/{code}`. */
3173
+ export interface PriceSeasonalityParams {
3174
+ /** Jumlah tahun data historis untuk menghitung pola musiman harga bulanan, mis. `3` untuk 3 tahun terakhir. Nilai efektif maksimal 20. Min: `1`. Max: `120`. Example: `3`. */
3175
+ range: number;
3176
+ }
3177
+ /** Query parameters for `GET /analysis/shareholder-above`. */
3178
+ export interface ShareholderAboveParams {
3179
+ /** Filter berdasarkan kode saham. Dapat berisi beberapa kode yang dipisahkan koma, mis. `BBCA,BBRI,BMRI`. Example: `BBCA`. */
3180
+ code?: string;
3181
+ /** Filter berdasarkan broker/kustodian tempat saham disimpan (kode 2 huruf). Dapat berisi beberapa kode yang dipisahkan koma. Example: `AK,BK`. */
3182
+ broker?: string;
3183
+ /** Nama atau sebagian nama pemegang saham yang dicari. Kosongkan untuk menampilkan seluruh pemegang saham. Example: ``. */
3184
+ name?: string;
3185
+ /** Tanggal awal periode laporan (`YYYY-MM-DD`). Opsional; filter tanggal hanya berlaku bila `from` dan `to` sama-sama diisi. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3186
+ from?: string;
3187
+ /** Tanggal akhir periode laporan (`YYYY-MM-DD`). Opsional; filter tanggal hanya berlaku bila `from` dan `to` sama-sama diisi. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3188
+ to?: string;
3189
+ /** Nomor halaman, dimulai dari 1. Default: `1`. Min: `1`. Example: `1`. */
3190
+ page?: number;
3191
+ /** Jumlah transaksi per halaman. Default: `20`. Min: `1`. Max: `50`. Example: `20`. */
3192
+ limit?: number;
3193
+ }
3194
+ /** Query parameters for `GET /analysis/shareholder-above-chart/{code}`. */
3195
+ export interface ShareholderAboveChartParams {
3196
+ /** Filter berdasarkan broker/kustodian (kode 2 huruf). Gunakan `INSTITUSI` untuk menampilkan kepemilikan institusi. Example: `AG`. */
3197
+ broker?: string;
3198
+ /** Nama pemegang saham dengan kepemilikan di atas 5% yang ingin ditampilkan. Example: ``. */
3199
+ name?: string;
3200
+ /** Tanggal data kepemilikan (`YYYY-MM-DD`). Wajib diisi. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3201
+ date: string;
3202
+ }
3203
+ /** Query parameters for `GET /analysis/shareholder-one`. */
3204
+ export interface ShareholderOneParams {
3205
+ /** Filter berdasarkan kode saham. Dapat berisi beberapa kode yang dipisahkan koma, mis. `BBCA,BBRI,BMRI`. Example: `BBCA`. */
3206
+ code?: string;
3207
+ /** Nama atau sebagian nama pemegang saham yang dicari. Kosongkan untuk menampilkan seluruh pemegang saham. Example: ``. */
3208
+ name?: string;
3209
+ /** Tanggal awal periode laporan (`YYYY-MM-DD`). Opsional; filter tanggal hanya berlaku bila `from` dan `to` sama-sama diisi. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3210
+ from?: string;
3211
+ /** Tanggal akhir periode laporan (`YYYY-MM-DD`). Opsional; filter tanggal hanya berlaku bila `from` dan `to` sama-sama diisi. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3212
+ to?: string;
3213
+ /** Nomor halaman, dimulai dari 1. Default: `1`. Min: `1`. Example: `1`. */
3214
+ page?: number;
3215
+ /** Jumlah transaksi per halaman. Default: `20`. Min: `1`. Max: `50`. Example: `20`. */
3216
+ limit?: number;
3217
+ }
3218
+ /** Query parameters for `GET /analysis/shareholder-one-chart/{code}`. */
3219
+ export interface ShareholderOneChartParams {
3220
+ /** Nama pemegang saham dengan kepemilikan 1%–5% yang ingin ditampilkan. Example: ``. */
3221
+ name?: string;
3222
+ /** Tanggal data kepemilikan (`YYYY-MM-DD`). Wajib diisi. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3223
+ date: string;
3224
+ }
3225
+ /** Query parameters for `GET /analysis/shareholder-insider`. */
3226
+ export interface InsiderParams {
3227
+ /** Filter berdasarkan kode saham. Dapat berisi beberapa kode yang dipisahkan koma, mis. `BBCA,BBRI,BMRI`. Example: `BBCA`. */
3228
+ code?: string;
3229
+ /** Nama atau sebagian nama pemegang saham yang dicari. Kosongkan untuk menampilkan seluruh pemegang saham. Example: ``. */
3230
+ name?: string;
3231
+ /** Tanggal awal periode laporan (`YYYY-MM-DD`). Opsional; filter tanggal hanya berlaku bila `from` dan `to` sama-sama diisi. Format: `YYYY-MM-DD`. Example: `2024-12-01`. */
3232
+ from?: string;
3233
+ /** Tanggal akhir periode laporan (`YYYY-MM-DD`). Opsional; filter tanggal hanya berlaku bila `from` dan `to` sama-sama diisi. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3234
+ to?: string;
3235
+ /** Nomor halaman, dimulai dari 1. Default: `1`. Min: `1`. Example: `1`. */
3236
+ page?: number;
3237
+ /** Jumlah transaksi per halaman. Default: `20`. Min: `1`. Max: `50`. Example: `20`. */
3238
+ limit?: number;
3239
+ }
3240
+ /** Query parameters for `GET /analysis/insider-chart/{code}`. */
3241
+ export interface InsiderChartParams {
3242
+ /** Nama insider (direksi, komisaris, atau pemegang saham pengendali) yang ingin ditampilkan. Example: ``. */
3243
+ name?: string;
3244
+ /** Tanggal laporan transaksi insider di BEI (`YYYY-MM-DD`). Wajib diisi. Format: `YYYY-MM-DD`. Example: `2024-12-30`. */
3245
+ date: string;
3246
+ }
3247
+ /** Query parameters for `GET /analysis/financial-statement/{code}`. */
3248
+ export interface FinancialStatementParams {
3249
+ /** Jenis laporan keuangan: `BS` = neraca (balance sheet), `IS` = laba rugi (income statement), `CF` = arus kas (cash flow). Example: `IS`. */
3250
+ statement: "BS" | "IS" | "CF";
3251
+ /** Periode laporan: `FY` = tahunan, `Q` = seluruh kuartal, `Q1`–`Q4` = kuartal tertentu. Example: `FY`. */
3252
+ type: "FY" | "Q" | "Q1" | "Q2" | "Q3" | "Q4";
3253
+ /** Jumlah periode laporan terakhir yang ditampilkan. Default: `8`. Min: `1`. Max: `8`. Example: `8`. */
3254
+ limit?: number;
3255
+ }
3256
+ /** Query parameters for `GET /analysis/financial-statement-chart/{code}`. */
3257
+ export interface FinancialStatementChartParams {
3258
+ /** Jenis laporan keuangan: `BS` = neraca (balance sheet), `IS` = laba rugi (income statement), `CF` = arus kas (cash flow). Example: `IS`. */
3259
+ statement: "BS" | "IS" | "CF";
3260
+ /** Periode laporan: `FY` = tahunan, `Q` = seluruh kuartal, `Q1`–`Q4` = kuartal tertentu. Example: `FY`. */
3261
+ type: "FY" | "Q" | "Q1" | "Q2" | "Q3" | "Q4";
3262
+ /** Jumlah periode laporan terakhir yang ditampilkan. Default: `8`. Min: `1`. Max: `8`. Example: `8`. */
3263
+ limit?: number;
3264
+ /** ID akun laporan keuangan (string 32 karakter) yang akan ditampilkan sebagai grafik. Gunakan nilai `rows[].id` dari response `/analysis/financial-statement/{code}` dengan `statement` yang sama; ID yang tidak ditemukan menghasilkan `account_id`/`name` null dengan `amount` 0. Example: `4e2a2ad6e9b8adbfb2c135edf0f86f5e`. */
3265
+ account: string;
3266
+ }
3267
+ /** Query parameters for `GET /analysis/keystat/{code}`. */
3268
+ export interface KeystatParams {
3269
+ /** Periode laporan: `FY` = tahunan, `Q` = seluruh kuartal, `Q1`–`Q4` = kuartal tertentu. Example: `FY`. */
3270
+ type: "FY" | "Q" | "Q1" | "Q2" | "Q3" | "Q4";
3271
+ /** Jumlah periode terakhir yang ditampilkan. Default: `8`. Min: `1`. Max: `8`. Example: `8`. */
3272
+ limit?: number;
3273
+ }
3274
+ /** Query parameters for `GET /analysis/keystat-chart/{code}`. */
3275
+ export interface KeystatChartParams {
3276
+ /** Periode laporan: `FY` = tahunan, `Q` = seluruh kuartal, `Q1`–`Q4` = kuartal tertentu. Example: `FY`. */
3277
+ type: "FY" | "Q" | "Q1" | "Q2" | "Q3" | "Q4";
3278
+ /** Jumlah periode terakhir yang ditampilkan (default 8). Maksimal 8 untuk periode kuartalan (`Q`, `Q1`-`Q4`) dan 3 untuk `type=FY`; karena default 8 melebihi batas FY, `limit` (1-3) wajib diisi saat `type=FY`. Default: `8`. Min: `1`. Max: `8`. Example: `3`. */
3279
+ limit?: number;
3280
+ /** Nama rasio atau statistik kunci yang akan ditampilkan sebagai grafik, mis. `ROE`, `PER`, atau `PBV`. Gunakan nama yang sama persis dengan response `/analysis/keystat/{code}`. Example: `ROE`. */
3281
+ name: string;
3282
+ }
3283
+ /** Query parameters for `GET /analysis/calendar`. */
3284
+ export interface CalendarParams {
3285
+ /** Filter hasil untuk satu kode saham tertentu. Example: `BBCA`. */
3286
+ code?: string;
3287
+ /** Jenis aksi korporasi: `IPO`, `PUBLIC_EXPOSE` = paparan publik, `RUPS_SCHEDULE` / `RUPS_RESULT` = jadwal / hasil RUPS, `DIVIDEND`, `RIGHT` = rights issue, `WARRANT`, `BONUS`, `SPLIT` = stock split, `REVERSE` = reverse split, `CONVERTION` = konversi. Example: `DIVIDEND`. */
3288
+ type?: "IPO" | "PUBLIC_EXPOSE" | "REVERSE" | "RIGHT" | "RUPS_RESULT" | "RUPS_SCHEDULE" | "SPLIT" | "WARRANT" | "BONUS" | "CONVERTION" | "DIVIDEND";
3289
+ /** Nomor halaman, dimulai dari 1. Default: `1`. Min: `1`. Example: `1`. */
3290
+ page?: number;
3291
+ /** Jumlah data per halaman. Default: `20`. Min: `1`. Max: `50`. Example: `20`. */
3292
+ limit?: number;
3293
+ }
3294
+ /** Query parameters for `GET /batch/order-book/{code}`. */
3295
+ export interface BatchOrderBookParams {
3296
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Default `RG` bila tidak diisi. Default: `RG`. Example: `RG`. */
3297
+ market?: "RG" | "NG" | "TN";
3298
+ /** Tanggal order book historis (`YYYY-MM-DD`), data tersedia mulai `2026-03-25`. Kirim bersama `time`; kosongkan keduanya untuk data realtime. Format: `YYYY-MM-DD`. Example: `2026-03-25`. */
3299
+ date?: string;
3300
+ /** Jam order book dalam WIB, format `HH:mm` dengan presisi menit. Kirim bersama `date`. Example: `09:30`. */
3301
+ time?: string;
3302
+ }
3303
+ /** Query parameters for `GET /batch/intraday-data/{code}`. */
3304
+ export interface BatchIntradayDataParams {
3305
+ /** Jenis pasar: `RG` = Pasar Reguler, `NG` = Pasar Negosiasi, `TN` = Pasar Tunai. Gunakan `RG` untuk analisis pergerakan harga pada umumnya. Default `RG` bila tidak diisi. Default: `RG`. Example: `RG`. */
3306
+ market?: "RG" | "NG" | "TN";
3307
+ /** Tanggal data historis (`YYYY-MM-DD`). Kosongkan untuk data realtime hari ini. Format: `YYYY-MM-DD`. Example: `2026-03-25`. */
3308
+ date?: string;
3309
+ }
3310
+ /** Query parameters for `GET /search`. */
3311
+ export interface SearchParams {
3312
+ /** Kata kunci pencarian berupa kode saham, nama perusahaan, atau username. Example: `bank`. */
3313
+ query: string;
3314
+ }
3315
+ /** Query parameters for `GET /search/stock`. */
3316
+ export interface SearchStockParams {
3317
+ /** Kata kunci pencarian berupa kode saham atau nama perusahaan. Example: `bank`. */
3318
+ query: string;
3319
+ /** Nomor halaman hasil pencarian, dimulai dari 1. Setiap halaman berisi 20 hasil. Default: `1`. Min: `1`. Example: `1`. */
3320
+ cursor?: number;
3321
+ }
3322
+ /** Query parameters for `GET /search/user`. */
3323
+ export interface SearchUserParams {
3324
+ /** Kata kunci pencarian berupa username atau nama pengguna. Example: `invezgo`. */
3325
+ query: string;
3326
+ /** Nomor halaman hasil pencarian, dimulai dari 1. Setiap halaman berisi 20 hasil. Default: `1`. Min: `1`. Example: `1`. */
3327
+ cursor?: number;
3328
+ }
3329
+ /** Query parameters for `GET /usage/logs`. */
3330
+ export interface UsageLogsParams {
3331
+ /** Waktu awal dalam WIB, format `YYYY-MM-DD HH:mm:ss` atau `YYYY-MM-DD`. Maksimal 30 hari ke belakang. Default 24 jam terakhir. Example: `2026-07-29 23:14:00`. */
3332
+ from?: string;
3333
+ /** Waktu akhir dalam WIB, format `YYYY-MM-DD HH:mm:ss` atau `YYYY-MM-DD`. Harus lebih besar atau sama dengan `from`. Default waktu saat ini. Example: `2026-07-30 23:14:00`. */
3334
+ to?: string;
3335
+ /** Filter log berdasarkan HTTP status code, mis. `200`, `422`, atau `429`. Min: `100`. Max: `599`. Example: `200`. */
3336
+ status?: number;
3337
+ /** Jumlah log maksimal yang dikembalikan. Kosongkan untuk mengambil seluruh log. Min: `1`. Max: `320000`. Example: `100`. */
3338
+ limit?: number;
3339
+ }
3340
+ /** Query parameters for `GET /watchlists`. */
3341
+ export interface WatchlistsListParams {
3342
+ /** ID grup watchlist yang ingin ditampilkan, diambil dari field `id` pada response `GET /watchlists/group`. Kosongkan atau isi `null` untuk menampilkan seluruh watchlist dari semua grup. Example: `null`. */
3343
+ group?: string;
3344
+ }
3345
+ /** Query parameters for `GET /journals`. */
3346
+ export interface JournalsListParams {
3347
+ /** Tanggal awal periode (`YYYY-MM-DD`). Format: `YYYY-MM-DD`. Example: `2026-01-01`. */
3348
+ from: string;
3349
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2026-12-31`. */
3350
+ to: string;
3351
+ }
3352
+ /** Query parameters for `GET /journals/summary`. */
3353
+ export interface JournalsSummaryParams {
3354
+ /** Tanggal awal periode (`YYYY-MM-DD`). Format: `YYYY-MM-DD`. Example: `2026-01-01`. */
3355
+ from: string;
3356
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2026-12-31`. */
3357
+ to: string;
3358
+ }
3359
+ /** Query parameters for `GET /posts`. */
3360
+ export interface PostsListParams {
3361
+ /** Nomor halaman, dimulai dari 1. Min: `1`. Example: `1`. */
3362
+ page: number;
3363
+ /** Jumlah postingan per halaman. Min: `1`. Max: `20`. Example: `10`. */
3364
+ limit: number;
3365
+ }
3366
+ /** Query parameters for `GET /posts/category/{category}`. */
3367
+ export interface PostsListByCategoryParams {
3368
+ /** Nomor halaman, dimulai dari 1. Min: `1`. Example: `1`. */
3369
+ page: number;
3370
+ /** Jumlah postingan per halaman. Min: `1`. Max: `20`. Example: `10`. */
3371
+ limit: number;
3372
+ }
3373
+ /** Query parameters for `GET /posts/space/{code}`. */
3374
+ export interface PostsListByStockParams {
3375
+ /** Nomor halaman, dimulai dari 1. Min: `1`. Example: `1`. */
3376
+ page: number;
3377
+ /** Jumlah postingan per halaman. Min: `1`. Max: `20`. Example: `10`. */
3378
+ limit: number;
3379
+ }
3380
+ /** Query parameters for `GET /posts/space/category/{code}/{category}`. */
3381
+ export interface PostsListByStockCategoryParams {
3382
+ /** Nomor halaman, dimulai dari 1. Min: `1`. Example: `1`. */
3383
+ page: number;
3384
+ /** Jumlah postingan per halaman. Min: `1`. Max: `20`. Example: `10`. */
3385
+ limit: number;
3386
+ }
3387
+ /** Query parameters for `GET /posts/comment/{id}`. */
3388
+ export interface PostsCommentsParams {
3389
+ /** Nomor halaman, dimulai dari 1. Min: `1`. Example: `1`. */
3390
+ page: number;
3391
+ /** Jumlah postingan per halaman. Min: `1`. Max: `20`. Example: `10`. */
3392
+ limit: number;
3393
+ }
3394
+ /** Query parameters for `GET /posts/like`. */
3395
+ export interface PostsLikesParams {
3396
+ /** Nomor halaman, dimulai dari 1. Min: `1`. Example: `1`. */
3397
+ page: number;
3398
+ /** Jumlah postingan per halaman. Min: `1`. Max: `20`. Example: `10`. */
3399
+ limit: number;
3400
+ }
3401
+ /** Query parameters for `GET /posts/favorite`. */
3402
+ export interface PostsFavoritesParams {
3403
+ /** Nomor halaman, dimulai dari 1. Min: `1`. Example: `1`. */
3404
+ page: number;
3405
+ /** Jumlah postingan per halaman. Min: `1`. Max: `20`. Example: `10`. */
3406
+ limit: number;
3407
+ }
3408
+ /** Query parameters for `GET /trades`. */
3409
+ export interface TradesListParams {
3410
+ /** Tanggal awal periode (`YYYY-MM-DD`). Format: `YYYY-MM-DD`. Example: `2026-01-01`. */
3411
+ from: string;
3412
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2026-12-31`. */
3413
+ to: string;
3414
+ }
3415
+ /** Query parameters for `GET /trades/summary`. */
3416
+ export interface TradesSummaryParams {
3417
+ /** Tanggal awal periode (`YYYY-MM-DD`). Format: `YYYY-MM-DD`. Example: `2026-01-01`. */
3418
+ from: string;
3419
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2026-12-31`. */
3420
+ to: string;
3421
+ }
3422
+ /** Query parameters for `GET /trades/summary-chart`. */
3423
+ export interface TradesSummaryChartParams {
3424
+ /** Tanggal awal periode (`YYYY-MM-DD`). Format: `YYYY-MM-DD`. Example: `2026-01-01`. */
3425
+ from: string;
3426
+ /** Tanggal akhir periode (`YYYY-MM-DD`). Harus lebih besar atau sama dengan `from`. Format: `YYYY-MM-DD`. Example: `2026-12-31`. */
3427
+ to: string;
3428
+ /** Kode indeks pembanding pada grafik, mis. `COMPOSITE`. Bila dikirim kosong (`code=`), setiap tanggal berisi satu baris per indeks. Example: `COMPOSITE`. */
3429
+ code: string;
3430
+ }
3431
+ /** Query parameters for `GET /analysis/news`. */
3432
+ export interface NewsParams {
3433
+ /** Nomor halaman, dimulai dari 1. Default: `1`. Min: `1`. Example: `1`. */
3434
+ page?: number;
3435
+ /** Jumlah data per halaman, 1-100. Default: `20`. Min: `1`. Max: `100`. Example: `20`. */
3436
+ limit?: number;
3437
+ /** Filter kode saham, mis. `BBCA` (opsional). Example: `BBCA`. */
3438
+ code?: string;
3439
+ }
3440
+ /** Query parameters for `GET /analysis/disclosure`. */
3441
+ export interface DisclosureParams {
3442
+ /** Nomor halaman, dimulai dari 1. Default: `1`. Min: `1`. Example: `1`. */
3443
+ page?: number;
3444
+ /** Jumlah data per halaman, 1-100. Default: `20`. Min: `1`. Max: `100`. Example: `20`. */
3445
+ limit?: number;
3446
+ /** Filter kode saham, mis. `BBCA` (opsional). Example: `BBCA`. */
3447
+ code?: string;
3448
+ }
3449
+ //# sourceMappingURL=types.d.ts.map