@aitlabs/namkwong 0.0.106 → 0.0.108

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.
@@ -4422,6 +4422,7 @@ export declare const adminRouter: Elysia<"/admin", {
4422
4422
  body: {};
4423
4423
  params: {};
4424
4424
  query: {
4425
+ isHot?: boolean | undefined;
4425
4426
  keyword?: string | undefined;
4426
4427
  limit?: number | undefined;
4427
4428
  marketSymbolId?: string | undefined;
@@ -35,7 +35,19 @@ export declare const assetPriceRouter: Elysia<"/asset_prices", {
35
35
  headers: import("elysia").HTTPHeaders;
36
36
  status?: number | keyof import("elysia").StatusMap;
37
37
  redirect?: string;
38
- cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
38
+ cookie?: Record<string, {
39
+ domain?: string | undefined;
40
+ expires?: Date | undefined;
41
+ httpOnly?: boolean | undefined;
42
+ maxAge?: number | undefined;
43
+ path?: string | undefined;
44
+ priority?: 'low' | 'medium' | 'high' | undefined;
45
+ partitioned?: boolean | undefined;
46
+ sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
47
+ secure?: boolean | undefined;
48
+ secrets?: string | null | (string | null)[];
49
+ value?: unknown;
50
+ }>;
39
51
  };
40
52
  path: string;
41
53
  route: string;
@@ -35,6 +35,7 @@ export declare const binaryOptionAdminMarketUpdateSchema: import("@sinclair/type
35
35
  }>;
36
36
  export type BinaryOptionAdminMarketUpdateInputType = typeof binaryOptionAdminMarketUpdateSchema.static;
37
37
  export declare const binaryOptionAdminMarketListQuerySchema: import("@sinclair/typebox").TObject<{
38
+ isHot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
38
39
  keyword: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
39
40
  limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
40
41
  marketSymbolId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -755,6 +755,7 @@ export declare const binaryOptionAdminRouter: Elysia<"/binary_option", {
755
755
  body: {};
756
756
  params: {};
757
757
  query: {
758
+ isHot?: boolean | undefined;
758
759
  keyword?: string | undefined;
759
760
  limit?: number | undefined;
760
761
  marketSymbolId?: string | undefined;
@@ -18,6 +18,10 @@ interface BinaryOptionSettlementRunInput {
18
18
  operatorId?: string;
19
19
  }
20
20
  export declare abstract class InternalBinaryOptionService {
21
+ private static buildLast10UtcCalendarDays;
22
+ private static completeTrend10dSparse;
23
+ private static loadPriceTrend10dMap;
24
+ private static enrichMarketsWithBaseAssetPrice;
21
25
  private static validateUserId;
22
26
  private static parseStakeAmount;
23
27
  private static assertStakeAmountInRange;
@@ -39,93 +43,14 @@ export declare abstract class InternalBinaryOptionService {
39
43
  private static getMarketByIdForUser;
40
44
  static listMarketsForUser(query?: {
41
45
  keyword?: string;
46
+ isHot?: boolean;
42
47
  limit?: number;
43
48
  offset?: number;
44
49
  }): Promise<{
45
- items: {
46
- baseAssetIdSnapshot: string;
47
- createdAt: Date;
48
- description: string | null;
49
- durationConfigs: {
50
- createdAt: Date;
51
- durationSeconds: number;
52
- id: string;
53
- isEnabled: boolean;
54
- losePayoutMultiplier: string;
55
- marketId: string;
56
- sortOrder: number;
57
- updatedAt: Date;
58
- winPayoutMultiplier: string;
59
- }[];
60
- id: string;
61
- image: string | null;
62
- isHot: boolean;
63
- isVisibleOnFrontend: boolean;
64
- marketSymbol: {
65
- baseAssetId: string;
66
- chartEnabled: boolean;
67
- createdAt: Date;
68
- id: string;
69
- quoteAssetId: string;
70
- settlementEnabled: boolean;
71
- sourceType: "manual" | "market_pricing" | "trade_market";
72
- status: "active" | "draft" | "ended" | "paused";
73
- symbol: string;
74
- updatedAt: Date;
75
- };
76
- marketSymbolId: string;
77
- maxStakeAmount: string | null;
78
- minStakeAmount: string;
79
- name: string;
80
- quoteAssetIdSnapshot: string;
81
- sortOrder: number;
82
- status: "active" | "draft" | "ended" | "paused";
83
- symbolSnapshot: string;
84
- updatedAt: Date;
85
- }[];
50
+ items: any[];
86
51
  total: number;
87
52
  }>;
88
- static getMarketForUser(marketId: string): Promise<{
89
- baseAssetIdSnapshot: string;
90
- createdAt: Date;
91
- description: string | null;
92
- durationConfigs: {
93
- createdAt: Date;
94
- durationSeconds: number;
95
- id: string;
96
- isEnabled: boolean;
97
- losePayoutMultiplier: string;
98
- marketId: string;
99
- sortOrder: number;
100
- updatedAt: Date;
101
- winPayoutMultiplier: string;
102
- }[];
103
- id: string;
104
- image: string | null;
105
- isHot: boolean;
106
- isVisibleOnFrontend: boolean;
107
- marketSymbol: {
108
- baseAssetId: string;
109
- chartEnabled: boolean;
110
- createdAt: Date;
111
- id: string;
112
- quoteAssetId: string;
113
- settlementEnabled: boolean;
114
- sourceType: "manual" | "market_pricing" | "trade_market";
115
- status: "active" | "draft" | "ended" | "paused";
116
- symbol: string;
117
- updatedAt: Date;
118
- };
119
- marketSymbolId: string;
120
- maxStakeAmount: string | null;
121
- minStakeAmount: string;
122
- name: string;
123
- quoteAssetIdSnapshot: string;
124
- sortOrder: number;
125
- status: "active" | "draft" | "ended" | "paused";
126
- symbolSnapshot: string;
127
- updatedAt: Date;
128
- }>;
53
+ static getMarketForUser(marketId: string): Promise<any>;
129
54
  static getOrderByIdForUser(userId: string, orderId: string): Promise<{
130
55
  baseAssetIdSnapshot: string;
131
56
  createdAt: Date;
@@ -1,4 +1,5 @@
1
1
  export declare const binaryOptionUserMarketListQuerySchema: import("@sinclair/typebox").TObject<{
2
+ isHot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
2
3
  keyword: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
3
4
  limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
4
5
  offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
@@ -169,178 +170,58 @@ export declare const binaryOptionUserMarketItemSchema: import("@sinclair/typebox
169
170
  image: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
170
171
  isHot: import("@sinclair/typebox").TBoolean;
171
172
  isVisibleOnFrontend: import("@sinclair/typebox").TBoolean;
172
- marketSymbol: import("drizzle-typebox").BuildSchema<"select", {
173
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
174
- name: "created_at";
175
- tableName: "market_symbol";
176
- dataType: "date";
177
- columnType: "PgTimestamp";
178
- data: Date;
179
- driverParam: string;
180
- notNull: true;
181
- hasDefault: true;
182
- isPrimaryKey: false;
183
- isAutoincrement: false;
184
- hasRuntimeDefault: false;
185
- enumValues: undefined;
186
- baseColumn: never;
187
- identity: undefined;
188
- generated: undefined;
189
- }, {}, {}>;
190
- updatedAt: import("drizzle-orm/pg-core").PgColumn<{
191
- name: "updated_at";
192
- tableName: "market_symbol";
193
- dataType: "date";
194
- columnType: "PgTimestamp";
195
- data: Date;
196
- driverParam: string;
197
- notNull: true;
198
- hasDefault: true;
199
- isPrimaryKey: false;
200
- isAutoincrement: false;
201
- hasRuntimeDefault: false;
202
- enumValues: undefined;
203
- baseColumn: never;
204
- identity: undefined;
205
- generated: undefined;
206
- }, {}, {}>;
207
- id: import("drizzle-orm/pg-core").PgColumn<{
208
- name: "id";
209
- tableName: "market_symbol";
210
- dataType: "string";
211
- columnType: "PgUUID";
212
- data: string;
213
- driverParam: string;
214
- notNull: true;
215
- hasDefault: true;
216
- isPrimaryKey: true;
217
- isAutoincrement: false;
218
- hasRuntimeDefault: false;
219
- enumValues: undefined;
220
- baseColumn: never;
221
- identity: undefined;
222
- generated: undefined;
223
- }, {}, {}>;
224
- symbol: import("drizzle-orm/pg-core").PgColumn<{
225
- name: "symbol";
226
- tableName: "market_symbol";
227
- dataType: "string";
228
- columnType: "PgText";
229
- data: string;
230
- driverParam: string;
231
- notNull: true;
232
- hasDefault: false;
233
- isPrimaryKey: false;
234
- isAutoincrement: false;
235
- hasRuntimeDefault: false;
236
- enumValues: [string, ...string[]];
237
- baseColumn: never;
238
- identity: undefined;
239
- generated: undefined;
240
- }, {}, {}>;
241
- baseAssetId: import("drizzle-orm/pg-core").PgColumn<{
242
- name: "base_asset_id";
243
- tableName: "market_symbol";
244
- dataType: "string";
245
- columnType: "PgUUID";
246
- data: string;
247
- driverParam: string;
248
- notNull: true;
249
- hasDefault: false;
250
- isPrimaryKey: false;
251
- isAutoincrement: false;
252
- hasRuntimeDefault: false;
253
- enumValues: undefined;
254
- baseColumn: never;
255
- identity: undefined;
256
- generated: undefined;
257
- }, {}, {}>;
258
- quoteAssetId: import("drizzle-orm/pg-core").PgColumn<{
259
- name: "quote_asset_id";
260
- tableName: "market_symbol";
261
- dataType: "string";
262
- columnType: "PgUUID";
263
- data: string;
264
- driverParam: string;
265
- notNull: true;
266
- hasDefault: false;
267
- isPrimaryKey: false;
268
- isAutoincrement: false;
269
- hasRuntimeDefault: false;
270
- enumValues: undefined;
271
- baseColumn: never;
272
- identity: undefined;
273
- generated: undefined;
274
- }, {}, {}>;
275
- status: import("drizzle-orm/pg-core").PgColumn<{
276
- name: "status";
277
- tableName: "market_symbol";
278
- dataType: "string";
279
- columnType: "PgEnumColumn";
280
- data: "active" | "draft" | "ended" | "paused";
281
- driverParam: string;
282
- notNull: true;
283
- hasDefault: true;
284
- isPrimaryKey: false;
285
- isAutoincrement: false;
286
- hasRuntimeDefault: false;
287
- enumValues: ["draft", "active", "paused", "ended"];
288
- baseColumn: never;
289
- identity: undefined;
290
- generated: undefined;
291
- }, {}, {}>;
292
- chartEnabled: import("drizzle-orm/pg-core").PgColumn<{
293
- name: "chart_enabled";
294
- tableName: "market_symbol";
295
- dataType: "boolean";
296
- columnType: "PgBoolean";
297
- data: boolean;
298
- driverParam: boolean;
299
- notNull: true;
300
- hasDefault: true;
301
- isPrimaryKey: false;
302
- isAutoincrement: false;
303
- hasRuntimeDefault: false;
304
- enumValues: undefined;
305
- baseColumn: never;
306
- identity: undefined;
307
- generated: undefined;
308
- }, {}, {}>;
309
- settlementEnabled: import("drizzle-orm/pg-core").PgColumn<{
310
- name: "settlement_enabled";
311
- tableName: "market_symbol";
312
- dataType: "boolean";
313
- columnType: "PgBoolean";
314
- data: boolean;
315
- driverParam: boolean;
316
- notNull: true;
317
- hasDefault: true;
318
- isPrimaryKey: false;
319
- isAutoincrement: false;
320
- hasRuntimeDefault: false;
321
- enumValues: undefined;
322
- baseColumn: never;
323
- identity: undefined;
324
- generated: undefined;
325
- }, {}, {}>;
326
- sourceType: import("drizzle-orm/pg-core").PgColumn<{
327
- name: "source_type";
328
- tableName: "market_symbol";
329
- dataType: "string";
330
- columnType: "PgEnumColumn";
331
- data: "manual" | "market_pricing" | "trade_market";
332
- driverParam: string;
333
- notNull: true;
334
- hasDefault: false;
335
- isPrimaryKey: false;
336
- isAutoincrement: false;
337
- hasRuntimeDefault: false;
338
- enumValues: ["trade_market", "market_pricing", "manual"];
339
- baseColumn: never;
340
- identity: undefined;
341
- generated: undefined;
342
- }, {}, {}>;
343
- }, undefined>;
173
+ marketSymbol: import("@sinclair/typebox").TObject<{
174
+ baseAsset: import("@sinclair/typebox").TObject<{
175
+ category: import("@sinclair/typebox").TEnum<{
176
+ CRYPTO: "CRYPTO";
177
+ FIAT: "FIAT";
178
+ POINT: "POINT";
179
+ RWA: "RWA";
180
+ }>;
181
+ code: import("@sinclair/typebox").TString;
182
+ iconUrl: import("@sinclair/typebox").TString;
183
+ id: import("@sinclair/typebox").TString;
184
+ isActive: import("@sinclair/typebox").TBoolean;
185
+ name: import("@sinclair/typebox").TString;
186
+ precision: import("@sinclair/typebox").TInteger;
187
+ price: import("@sinclair/typebox").TObject<{
188
+ latestPrice: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
189
+ id: import("@sinclair/typebox").TString;
190
+ baseAssetId: import("@sinclair/typebox").TString;
191
+ quoteAssetId: import("@sinclair/typebox").TString;
192
+ price: import("@sinclair/typebox").TString;
193
+ source: import("@sinclair/typebox").TString;
194
+ effectiveAt: import("@sinclair/typebox").TDate;
195
+ }>, import("@sinclair/typebox").TNull]>;
196
+ dailyChangeRate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
197
+ trend10d: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
198
+ date: import("@sinclair/typebox").TString;
199
+ price: import("@sinclair/typebox").TString;
200
+ effectiveAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TString]>;
201
+ }>>;
202
+ }>;
203
+ symbol: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
204
+ }>;
205
+ baseAssetId: import("@sinclair/typebox").TString;
206
+ chartEnabled: import("@sinclair/typebox").TBoolean;
207
+ createdAt: import("@sinclair/typebox").TDate;
208
+ id: import("@sinclair/typebox").TString;
209
+ quoteAssetId: import("@sinclair/typebox").TString;
210
+ settlementEnabled: import("@sinclair/typebox").TBoolean;
211
+ sourceType: import("@sinclair/typebox").TEnum<{
212
+ manual: "manual";
213
+ market_pricing: "market_pricing";
214
+ trade_market: "trade_market";
215
+ }>;
216
+ status: import("@sinclair/typebox").TEnum<{
217
+ active: "active";
218
+ draft: "draft";
219
+ ended: "ended";
220
+ paused: "paused";
221
+ }>;
222
+ symbol: import("@sinclair/typebox").TString;
223
+ updatedAt: import("@sinclair/typebox").TDate;
224
+ }>;
344
225
  marketSymbolId: import("@sinclair/typebox").TString;
345
226
  maxStakeAmount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
346
227
  minStakeAmount: import("@sinclair/typebox").TString;
@@ -521,178 +402,58 @@ export declare const binaryOptionUserMarketListResponseSchema: import("@sinclair
521
402
  image: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
522
403
  isHot: import("@sinclair/typebox").TBoolean;
523
404
  isVisibleOnFrontend: import("@sinclair/typebox").TBoolean;
524
- marketSymbol: import("drizzle-typebox").BuildSchema<"select", {
525
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
526
- name: "created_at";
527
- tableName: "market_symbol";
528
- dataType: "date";
529
- columnType: "PgTimestamp";
530
- data: Date;
531
- driverParam: string;
532
- notNull: true;
533
- hasDefault: true;
534
- isPrimaryKey: false;
535
- isAutoincrement: false;
536
- hasRuntimeDefault: false;
537
- enumValues: undefined;
538
- baseColumn: never;
539
- identity: undefined;
540
- generated: undefined;
541
- }, {}, {}>;
542
- updatedAt: import("drizzle-orm/pg-core").PgColumn<{
543
- name: "updated_at";
544
- tableName: "market_symbol";
545
- dataType: "date";
546
- columnType: "PgTimestamp";
547
- data: Date;
548
- driverParam: string;
549
- notNull: true;
550
- hasDefault: true;
551
- isPrimaryKey: false;
552
- isAutoincrement: false;
553
- hasRuntimeDefault: false;
554
- enumValues: undefined;
555
- baseColumn: never;
556
- identity: undefined;
557
- generated: undefined;
558
- }, {}, {}>;
559
- id: import("drizzle-orm/pg-core").PgColumn<{
560
- name: "id";
561
- tableName: "market_symbol";
562
- dataType: "string";
563
- columnType: "PgUUID";
564
- data: string;
565
- driverParam: string;
566
- notNull: true;
567
- hasDefault: true;
568
- isPrimaryKey: true;
569
- isAutoincrement: false;
570
- hasRuntimeDefault: false;
571
- enumValues: undefined;
572
- baseColumn: never;
573
- identity: undefined;
574
- generated: undefined;
575
- }, {}, {}>;
576
- symbol: import("drizzle-orm/pg-core").PgColumn<{
577
- name: "symbol";
578
- tableName: "market_symbol";
579
- dataType: "string";
580
- columnType: "PgText";
581
- data: string;
582
- driverParam: string;
583
- notNull: true;
584
- hasDefault: false;
585
- isPrimaryKey: false;
586
- isAutoincrement: false;
587
- hasRuntimeDefault: false;
588
- enumValues: [string, ...string[]];
589
- baseColumn: never;
590
- identity: undefined;
591
- generated: undefined;
592
- }, {}, {}>;
593
- baseAssetId: import("drizzle-orm/pg-core").PgColumn<{
594
- name: "base_asset_id";
595
- tableName: "market_symbol";
596
- dataType: "string";
597
- columnType: "PgUUID";
598
- data: string;
599
- driverParam: string;
600
- notNull: true;
601
- hasDefault: false;
602
- isPrimaryKey: false;
603
- isAutoincrement: false;
604
- hasRuntimeDefault: false;
605
- enumValues: undefined;
606
- baseColumn: never;
607
- identity: undefined;
608
- generated: undefined;
609
- }, {}, {}>;
610
- quoteAssetId: import("drizzle-orm/pg-core").PgColumn<{
611
- name: "quote_asset_id";
612
- tableName: "market_symbol";
613
- dataType: "string";
614
- columnType: "PgUUID";
615
- data: string;
616
- driverParam: string;
617
- notNull: true;
618
- hasDefault: false;
619
- isPrimaryKey: false;
620
- isAutoincrement: false;
621
- hasRuntimeDefault: false;
622
- enumValues: undefined;
623
- baseColumn: never;
624
- identity: undefined;
625
- generated: undefined;
626
- }, {}, {}>;
627
- status: import("drizzle-orm/pg-core").PgColumn<{
628
- name: "status";
629
- tableName: "market_symbol";
630
- dataType: "string";
631
- columnType: "PgEnumColumn";
632
- data: "active" | "draft" | "ended" | "paused";
633
- driverParam: string;
634
- notNull: true;
635
- hasDefault: true;
636
- isPrimaryKey: false;
637
- isAutoincrement: false;
638
- hasRuntimeDefault: false;
639
- enumValues: ["draft", "active", "paused", "ended"];
640
- baseColumn: never;
641
- identity: undefined;
642
- generated: undefined;
643
- }, {}, {}>;
644
- chartEnabled: import("drizzle-orm/pg-core").PgColumn<{
645
- name: "chart_enabled";
646
- tableName: "market_symbol";
647
- dataType: "boolean";
648
- columnType: "PgBoolean";
649
- data: boolean;
650
- driverParam: boolean;
651
- notNull: true;
652
- hasDefault: true;
653
- isPrimaryKey: false;
654
- isAutoincrement: false;
655
- hasRuntimeDefault: false;
656
- enumValues: undefined;
657
- baseColumn: never;
658
- identity: undefined;
659
- generated: undefined;
660
- }, {}, {}>;
661
- settlementEnabled: import("drizzle-orm/pg-core").PgColumn<{
662
- name: "settlement_enabled";
663
- tableName: "market_symbol";
664
- dataType: "boolean";
665
- columnType: "PgBoolean";
666
- data: boolean;
667
- driverParam: boolean;
668
- notNull: true;
669
- hasDefault: true;
670
- isPrimaryKey: false;
671
- isAutoincrement: false;
672
- hasRuntimeDefault: false;
673
- enumValues: undefined;
674
- baseColumn: never;
675
- identity: undefined;
676
- generated: undefined;
677
- }, {}, {}>;
678
- sourceType: import("drizzle-orm/pg-core").PgColumn<{
679
- name: "source_type";
680
- tableName: "market_symbol";
681
- dataType: "string";
682
- columnType: "PgEnumColumn";
683
- data: "manual" | "market_pricing" | "trade_market";
684
- driverParam: string;
685
- notNull: true;
686
- hasDefault: false;
687
- isPrimaryKey: false;
688
- isAutoincrement: false;
689
- hasRuntimeDefault: false;
690
- enumValues: ["trade_market", "market_pricing", "manual"];
691
- baseColumn: never;
692
- identity: undefined;
693
- generated: undefined;
694
- }, {}, {}>;
695
- }, undefined>;
405
+ marketSymbol: import("@sinclair/typebox").TObject<{
406
+ baseAsset: import("@sinclair/typebox").TObject<{
407
+ category: import("@sinclair/typebox").TEnum<{
408
+ CRYPTO: "CRYPTO";
409
+ FIAT: "FIAT";
410
+ POINT: "POINT";
411
+ RWA: "RWA";
412
+ }>;
413
+ code: import("@sinclair/typebox").TString;
414
+ iconUrl: import("@sinclair/typebox").TString;
415
+ id: import("@sinclair/typebox").TString;
416
+ isActive: import("@sinclair/typebox").TBoolean;
417
+ name: import("@sinclair/typebox").TString;
418
+ precision: import("@sinclair/typebox").TInteger;
419
+ price: import("@sinclair/typebox").TObject<{
420
+ latestPrice: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
421
+ id: import("@sinclair/typebox").TString;
422
+ baseAssetId: import("@sinclair/typebox").TString;
423
+ quoteAssetId: import("@sinclair/typebox").TString;
424
+ price: import("@sinclair/typebox").TString;
425
+ source: import("@sinclair/typebox").TString;
426
+ effectiveAt: import("@sinclair/typebox").TDate;
427
+ }>, import("@sinclair/typebox").TNull]>;
428
+ dailyChangeRate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
429
+ trend10d: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
430
+ date: import("@sinclair/typebox").TString;
431
+ price: import("@sinclair/typebox").TString;
432
+ effectiveAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TString]>;
433
+ }>>;
434
+ }>;
435
+ symbol: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
436
+ }>;
437
+ baseAssetId: import("@sinclair/typebox").TString;
438
+ chartEnabled: import("@sinclair/typebox").TBoolean;
439
+ createdAt: import("@sinclair/typebox").TDate;
440
+ id: import("@sinclair/typebox").TString;
441
+ quoteAssetId: import("@sinclair/typebox").TString;
442
+ settlementEnabled: import("@sinclair/typebox").TBoolean;
443
+ sourceType: import("@sinclair/typebox").TEnum<{
444
+ manual: "manual";
445
+ market_pricing: "market_pricing";
446
+ trade_market: "trade_market";
447
+ }>;
448
+ status: import("@sinclair/typebox").TEnum<{
449
+ active: "active";
450
+ draft: "draft";
451
+ ended: "ended";
452
+ paused: "paused";
453
+ }>;
454
+ symbol: import("@sinclair/typebox").TString;
455
+ updatedAt: import("@sinclair/typebox").TDate;
456
+ }>;
696
457
  marketSymbolId: import("@sinclair/typebox").TString;
697
458
  maxStakeAmount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
698
459
  minStakeAmount: import("@sinclair/typebox").TString;
@@ -35,19 +35,7 @@ export declare const binaryOptionRouter: Elysia<"/binary_option", {
35
35
  headers: import("elysia").HTTPHeaders;
36
36
  status?: number | keyof import("elysia").StatusMap;
37
37
  redirect?: string;
38
- cookie?: Record<string, {
39
- domain?: string | undefined;
40
- expires?: Date | undefined;
41
- httpOnly?: boolean | undefined;
42
- maxAge?: number | undefined;
43
- path?: string | undefined;
44
- priority?: 'low' | 'medium' | 'high' | undefined;
45
- partitioned?: boolean | undefined;
46
- sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
47
- secure?: boolean | undefined;
48
- secrets?: string | null | (string | null)[];
49
- value?: unknown;
50
- }>;
38
+ cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
51
39
  };
52
40
  path: string;
53
41
  route: string;
@@ -398,6 +386,7 @@ export declare const binaryOptionRouter: Elysia<"/binary_option", {
398
386
  body: {};
399
387
  params: {};
400
388
  query: {
389
+ isHot?: boolean | undefined;
401
390
  keyword?: string | undefined;
402
391
  limit?: number | undefined;
403
392
  offset?: number | undefined;
@@ -427,16 +416,42 @@ export declare const binaryOptionRouter: Elysia<"/binary_option", {
427
416
  isHot: boolean;
428
417
  isVisibleOnFrontend: boolean;
429
418
  marketSymbol: {
419
+ baseAsset: {
420
+ category: "CRYPTO" | "FIAT" | "POINT" | "RWA";
421
+ code: string;
422
+ iconUrl: string;
423
+ id: string;
424
+ isActive: boolean;
425
+ name: string;
426
+ precision: number;
427
+ price: {
428
+ latestPrice: {
429
+ id: string;
430
+ baseAssetId: string;
431
+ quoteAssetId: string;
432
+ price: string;
433
+ source: string;
434
+ effectiveAt: Date;
435
+ } | null;
436
+ dailyChangeRate: string | null;
437
+ trend10d: {
438
+ date: string;
439
+ price: string;
440
+ effectiveAt: string | Date;
441
+ }[];
442
+ };
443
+ symbol: string | null;
444
+ };
445
+ baseAssetId: string;
446
+ chartEnabled: boolean;
430
447
  createdAt: Date;
431
- updatedAt: Date;
432
448
  id: string;
433
- symbol: string;
434
- baseAssetId: string;
435
449
  quoteAssetId: string;
436
- status: "active" | "draft" | "ended" | "paused";
437
- chartEnabled: boolean;
438
450
  settlementEnabled: boolean;
439
451
  sourceType: "manual" | "market_pricing" | "trade_market";
452
+ status: "active" | "draft" | "ended" | "paused";
453
+ symbol: string;
454
+ updatedAt: Date;
440
455
  };
441
456
  marketSymbolId: string;
442
457
  maxStakeAmount: string | null;
@@ -502,16 +517,42 @@ export declare const binaryOptionRouter: Elysia<"/binary_option", {
502
517
  isHot: boolean;
503
518
  isVisibleOnFrontend: boolean;
504
519
  marketSymbol: {
520
+ baseAsset: {
521
+ category: "CRYPTO" | "FIAT" | "POINT" | "RWA";
522
+ code: string;
523
+ iconUrl: string;
524
+ id: string;
525
+ isActive: boolean;
526
+ name: string;
527
+ precision: number;
528
+ price: {
529
+ latestPrice: {
530
+ id: string;
531
+ baseAssetId: string;
532
+ quoteAssetId: string;
533
+ price: string;
534
+ source: string;
535
+ effectiveAt: Date;
536
+ } | null;
537
+ dailyChangeRate: string | null;
538
+ trend10d: {
539
+ date: string;
540
+ price: string;
541
+ effectiveAt: string | Date;
542
+ }[];
543
+ };
544
+ symbol: string | null;
545
+ };
546
+ baseAssetId: string;
547
+ chartEnabled: boolean;
505
548
  createdAt: Date;
506
- updatedAt: Date;
507
549
  id: string;
508
- symbol: string;
509
- baseAssetId: string;
510
550
  quoteAssetId: string;
511
- status: "active" | "draft" | "ended" | "paused";
512
- chartEnabled: boolean;
513
551
  settlementEnabled: boolean;
514
552
  sourceType: "manual" | "market_pricing" | "trade_market";
553
+ status: "active" | "draft" | "ended" | "paused";
554
+ symbol: string;
555
+ updatedAt: Date;
515
556
  };
516
557
  marketSymbolId: string;
517
558
  maxStakeAmount: string | null;
@@ -3,90 +3,10 @@ export declare abstract class UserBinaryOptionService {
3
3
  private static validateUserId;
4
4
  private static verifyTransactionPasswordByStatus;
5
5
  static listMarkets(query?: BinaryOptionUserMarketListQueryType): Promise<{
6
- items: {
7
- baseAssetIdSnapshot: string;
8
- createdAt: Date;
9
- description: string | null;
10
- durationConfigs: {
11
- createdAt: Date;
12
- durationSeconds: number;
13
- id: string;
14
- isEnabled: boolean;
15
- losePayoutMultiplier: string;
16
- marketId: string;
17
- sortOrder: number;
18
- updatedAt: Date;
19
- winPayoutMultiplier: string;
20
- }[];
21
- id: string;
22
- image: string | null;
23
- isHot: boolean;
24
- isVisibleOnFrontend: boolean;
25
- marketSymbol: {
26
- baseAssetId: string;
27
- chartEnabled: boolean;
28
- createdAt: Date;
29
- id: string;
30
- quoteAssetId: string;
31
- settlementEnabled: boolean;
32
- sourceType: "manual" | "market_pricing" | "trade_market";
33
- status: "active" | "draft" | "ended" | "paused";
34
- symbol: string;
35
- updatedAt: Date;
36
- };
37
- marketSymbolId: string;
38
- maxStakeAmount: string | null;
39
- minStakeAmount: string;
40
- name: string;
41
- quoteAssetIdSnapshot: string;
42
- sortOrder: number;
43
- status: "active" | "draft" | "ended" | "paused";
44
- symbolSnapshot: string;
45
- updatedAt: Date;
46
- }[];
6
+ items: any[];
47
7
  total: number;
48
8
  }>;
49
- static getMarket(marketId: string): Promise<{
50
- baseAssetIdSnapshot: string;
51
- createdAt: Date;
52
- description: string | null;
53
- durationConfigs: {
54
- createdAt: Date;
55
- durationSeconds: number;
56
- id: string;
57
- isEnabled: boolean;
58
- losePayoutMultiplier: string;
59
- marketId: string;
60
- sortOrder: number;
61
- updatedAt: Date;
62
- winPayoutMultiplier: string;
63
- }[];
64
- id: string;
65
- image: string | null;
66
- isHot: boolean;
67
- isVisibleOnFrontend: boolean;
68
- marketSymbol: {
69
- baseAssetId: string;
70
- chartEnabled: boolean;
71
- createdAt: Date;
72
- id: string;
73
- quoteAssetId: string;
74
- settlementEnabled: boolean;
75
- sourceType: "manual" | "market_pricing" | "trade_market";
76
- status: "active" | "draft" | "ended" | "paused";
77
- symbol: string;
78
- updatedAt: Date;
79
- };
80
- marketSymbolId: string;
81
- maxStakeAmount: string | null;
82
- minStakeAmount: string;
83
- name: string;
84
- quoteAssetIdSnapshot: string;
85
- sortOrder: number;
86
- status: "active" | "draft" | "ended" | "paused";
87
- symbolSnapshot: string;
88
- updatedAt: Date;
89
- }>;
9
+ static getMarket(marketId: string): Promise<any>;
90
10
  static placeOrder(userId: string, input: BinaryOptionUserOrderCreateInputType): Promise<{
91
11
  baseAssetIdSnapshot: string;
92
12
  createdAt: Date;
package/dist/index.d.ts CHANGED
@@ -4850,6 +4850,7 @@ declare const app: Elysia<"/api", {
4850
4850
  body: {};
4851
4851
  params: {};
4852
4852
  query: {
4853
+ isHot?: boolean | undefined;
4853
4854
  keyword?: string | undefined;
4854
4855
  limit?: number | undefined;
4855
4856
  marketSymbolId?: string | undefined;
@@ -15748,6 +15749,7 @@ declare const app: Elysia<"/api", {
15748
15749
  body: {};
15749
15750
  params: {};
15750
15751
  query: {
15752
+ isHot?: boolean | undefined;
15751
15753
  keyword?: string | undefined;
15752
15754
  limit?: number | undefined;
15753
15755
  offset?: number | undefined;
@@ -15777,16 +15779,42 @@ declare const app: Elysia<"/api", {
15777
15779
  isHot: boolean;
15778
15780
  isVisibleOnFrontend: boolean;
15779
15781
  marketSymbol: {
15782
+ baseAsset: {
15783
+ category: "CRYPTO" | "FIAT" | "POINT" | "RWA";
15784
+ code: string;
15785
+ iconUrl: string;
15786
+ id: string;
15787
+ isActive: boolean;
15788
+ name: string;
15789
+ precision: number;
15790
+ price: {
15791
+ latestPrice: {
15792
+ id: string;
15793
+ baseAssetId: string;
15794
+ quoteAssetId: string;
15795
+ price: string;
15796
+ source: string;
15797
+ effectiveAt: Date;
15798
+ } | null;
15799
+ dailyChangeRate: string | null;
15800
+ trend10d: {
15801
+ date: string;
15802
+ price: string;
15803
+ effectiveAt: string | Date;
15804
+ }[];
15805
+ };
15806
+ symbol: string | null;
15807
+ };
15808
+ baseAssetId: string;
15809
+ chartEnabled: boolean;
15780
15810
  createdAt: Date;
15781
- updatedAt: Date;
15782
15811
  id: string;
15783
- symbol: string;
15784
- baseAssetId: string;
15785
15812
  quoteAssetId: string;
15786
- status: "active" | "draft" | "ended" | "paused";
15787
- chartEnabled: boolean;
15788
15813
  settlementEnabled: boolean;
15789
15814
  sourceType: "manual" | "market_pricing" | "trade_market";
15815
+ status: "active" | "draft" | "ended" | "paused";
15816
+ symbol: string;
15817
+ updatedAt: Date;
15790
15818
  };
15791
15819
  marketSymbolId: string;
15792
15820
  maxStakeAmount: string | null;
@@ -15852,16 +15880,42 @@ declare const app: Elysia<"/api", {
15852
15880
  isHot: boolean;
15853
15881
  isVisibleOnFrontend: boolean;
15854
15882
  marketSymbol: {
15883
+ baseAsset: {
15884
+ category: "CRYPTO" | "FIAT" | "POINT" | "RWA";
15885
+ code: string;
15886
+ iconUrl: string;
15887
+ id: string;
15888
+ isActive: boolean;
15889
+ name: string;
15890
+ precision: number;
15891
+ price: {
15892
+ latestPrice: {
15893
+ id: string;
15894
+ baseAssetId: string;
15895
+ quoteAssetId: string;
15896
+ price: string;
15897
+ source: string;
15898
+ effectiveAt: Date;
15899
+ } | null;
15900
+ dailyChangeRate: string | null;
15901
+ trend10d: {
15902
+ date: string;
15903
+ price: string;
15904
+ effectiveAt: string | Date;
15905
+ }[];
15906
+ };
15907
+ symbol: string | null;
15908
+ };
15909
+ baseAssetId: string;
15910
+ chartEnabled: boolean;
15855
15911
  createdAt: Date;
15856
- updatedAt: Date;
15857
15912
  id: string;
15858
- symbol: string;
15859
- baseAssetId: string;
15860
15913
  quoteAssetId: string;
15861
- status: "active" | "draft" | "ended" | "paused";
15862
- chartEnabled: boolean;
15863
15914
  settlementEnabled: boolean;
15864
15915
  sourceType: "manual" | "market_pricing" | "trade_market";
15916
+ status: "active" | "draft" | "ended" | "paused";
15917
+ symbol: string;
15918
+ updatedAt: Date;
15865
15919
  };
15866
15920
  marketSymbolId: string;
15867
15921
  maxStakeAmount: string | null;
@@ -35,7 +35,19 @@ export declare const referralAdminRouter: Elysia<"/referrals", {
35
35
  headers: import("elysia").HTTPHeaders;
36
36
  status?: number | keyof import("elysia").StatusMap;
37
37
  redirect?: string;
38
- cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
38
+ cookie?: Record<string, {
39
+ domain?: string | undefined;
40
+ expires?: Date | undefined;
41
+ httpOnly?: boolean | undefined;
42
+ maxAge?: number | undefined;
43
+ path?: string | undefined;
44
+ priority?: 'low' | 'medium' | 'high' | undefined;
45
+ partitioned?: boolean | undefined;
46
+ sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
47
+ secure?: boolean | undefined;
48
+ secrets?: string | null | (string | null)[];
49
+ value?: unknown;
50
+ }>;
39
51
  };
40
52
  path: string;
41
53
  route: string;
@@ -35,19 +35,7 @@ export declare const teamAdminRouter: Elysia<"/team", {
35
35
  headers: import("elysia").HTTPHeaders;
36
36
  status?: number | keyof import("elysia").StatusMap;
37
37
  redirect?: string;
38
- cookie?: Record<string, {
39
- domain?: string | undefined;
40
- expires?: Date | undefined;
41
- httpOnly?: boolean | undefined;
42
- maxAge?: number | undefined;
43
- path?: string | undefined;
44
- priority?: 'low' | 'medium' | 'high' | undefined;
45
- partitioned?: boolean | undefined;
46
- sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
47
- secure?: boolean | undefined;
48
- secrets?: string | null | (string | null)[];
49
- value?: unknown;
50
- }>;
38
+ cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
51
39
  };
52
40
  path: string;
53
41
  route: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aitlabs/namkwong",
3
- "version": "0.0.106",
3
+ "version": "0.0.108",
4
4
  "description": "Elysia API type definitions for Eden Treaty",
5
5
  "files": [
6
6
  "dist"