@r2wa-org/eden 0.0.82 → 0.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/index.d.ts +12 -0
- package/dist/index.d.ts +56 -4
- package/dist/trade-market/admin/dto.schemas.d.ts +356 -0
- package/dist/trade-market/admin/router.d.ts +12 -0
- package/dist/trade-market/admin/service.d.ts +12 -0
- package/dist/trade-market/internal/service.d.ts +26 -0
- package/dist/trade-market/user/dto.schemas.d.ts +153 -480
- package/dist/trade-market/user/router.d.ts +44 -4
- package/dist/trade-market/user/service.d.ts +24 -0
- package/package.json +1 -1
package/dist/admin/index.d.ts
CHANGED
|
@@ -6874,6 +6874,18 @@ export declare const adminRouter: Elysia<"/admin", {
|
|
|
6874
6874
|
dailyUserBuyBaseLimit: string | null;
|
|
6875
6875
|
dailyUserSellBaseLimit: string | null;
|
|
6876
6876
|
maxSlippageBps: string;
|
|
6877
|
+
latestPrice: {
|
|
6878
|
+
id: string;
|
|
6879
|
+
createdAt: Date;
|
|
6880
|
+
updatedAt: Date;
|
|
6881
|
+
baseAssetId: string;
|
|
6882
|
+
baseAsset: string;
|
|
6883
|
+
quoteAssetId: string;
|
|
6884
|
+
quoteAsset: string;
|
|
6885
|
+
price: string;
|
|
6886
|
+
source: string;
|
|
6887
|
+
effectiveAt: Date;
|
|
6888
|
+
} | null;
|
|
6877
6889
|
}[];
|
|
6878
6890
|
pagination: {
|
|
6879
6891
|
total: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -7197,6 +7197,18 @@ declare const app: Elysia<"/api", {
|
|
|
7197
7197
|
dailyUserBuyBaseLimit: string | null;
|
|
7198
7198
|
dailyUserSellBaseLimit: string | null;
|
|
7199
7199
|
maxSlippageBps: string;
|
|
7200
|
+
latestPrice: {
|
|
7201
|
+
id: string;
|
|
7202
|
+
createdAt: Date;
|
|
7203
|
+
updatedAt: Date;
|
|
7204
|
+
baseAssetId: string;
|
|
7205
|
+
baseAsset: string;
|
|
7206
|
+
quoteAssetId: string;
|
|
7207
|
+
quoteAsset: string;
|
|
7208
|
+
price: string;
|
|
7209
|
+
source: string;
|
|
7210
|
+
effectiveAt: Date;
|
|
7211
|
+
} | null;
|
|
7200
7212
|
}[];
|
|
7201
7213
|
pagination: {
|
|
7202
7214
|
total: number;
|
|
@@ -12835,11 +12847,27 @@ declare const app: Elysia<"/api", {
|
|
|
12835
12847
|
data: {
|
|
12836
12848
|
id: string;
|
|
12837
12849
|
name: string;
|
|
12838
|
-
createdAt: Date;
|
|
12839
|
-
updatedAt: Date;
|
|
12840
12850
|
status: "active" | "draft" | "paused" | "ended";
|
|
12841
12851
|
baseAssetId: string;
|
|
12852
|
+
baseAsset: {
|
|
12853
|
+
symbol: string | null;
|
|
12854
|
+
id: string;
|
|
12855
|
+
name: string;
|
|
12856
|
+
code: string;
|
|
12857
|
+
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
12858
|
+
isActive: boolean;
|
|
12859
|
+
precision: number;
|
|
12860
|
+
};
|
|
12842
12861
|
quoteAssetId: string;
|
|
12862
|
+
quoteAsset: {
|
|
12863
|
+
symbol: string | null;
|
|
12864
|
+
id: string;
|
|
12865
|
+
name: string;
|
|
12866
|
+
code: string;
|
|
12867
|
+
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
12868
|
+
isActive: boolean;
|
|
12869
|
+
precision: number;
|
|
12870
|
+
};
|
|
12843
12871
|
isBuyEnabled: boolean;
|
|
12844
12872
|
isSellEnabled: boolean;
|
|
12845
12873
|
minBaseAmount: string;
|
|
@@ -12847,6 +12875,10 @@ declare const app: Elysia<"/api", {
|
|
|
12847
12875
|
dailyUserBuyBaseLimit: string | null;
|
|
12848
12876
|
dailyUserSellBaseLimit: string | null;
|
|
12849
12877
|
maxSlippageBps: string;
|
|
12878
|
+
latestPrice: {
|
|
12879
|
+
price: string;
|
|
12880
|
+
effectiveAt: Date;
|
|
12881
|
+
} | null;
|
|
12850
12882
|
}[];
|
|
12851
12883
|
pagination: {
|
|
12852
12884
|
total: number;
|
|
@@ -12885,11 +12917,27 @@ declare const app: Elysia<"/api", {
|
|
|
12885
12917
|
200: {
|
|
12886
12918
|
id: string;
|
|
12887
12919
|
name: string;
|
|
12888
|
-
createdAt: Date;
|
|
12889
|
-
updatedAt: Date;
|
|
12890
12920
|
status: "active" | "draft" | "paused" | "ended";
|
|
12891
12921
|
baseAssetId: string;
|
|
12922
|
+
baseAsset: {
|
|
12923
|
+
symbol: string | null;
|
|
12924
|
+
id: string;
|
|
12925
|
+
name: string;
|
|
12926
|
+
code: string;
|
|
12927
|
+
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
12928
|
+
isActive: boolean;
|
|
12929
|
+
precision: number;
|
|
12930
|
+
};
|
|
12892
12931
|
quoteAssetId: string;
|
|
12932
|
+
quoteAsset: {
|
|
12933
|
+
symbol: string | null;
|
|
12934
|
+
id: string;
|
|
12935
|
+
name: string;
|
|
12936
|
+
code: string;
|
|
12937
|
+
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
12938
|
+
isActive: boolean;
|
|
12939
|
+
precision: number;
|
|
12940
|
+
};
|
|
12893
12941
|
isBuyEnabled: boolean;
|
|
12894
12942
|
isSellEnabled: boolean;
|
|
12895
12943
|
minBaseAmount: string;
|
|
@@ -12897,6 +12945,10 @@ declare const app: Elysia<"/api", {
|
|
|
12897
12945
|
dailyUserBuyBaseLimit: string | null;
|
|
12898
12946
|
dailyUserSellBaseLimit: string | null;
|
|
12899
12947
|
maxSlippageBps: string;
|
|
12948
|
+
latestPrice: {
|
|
12949
|
+
price: string;
|
|
12950
|
+
effectiveAt: Date;
|
|
12951
|
+
} | null;
|
|
12900
12952
|
};
|
|
12901
12953
|
401: "Unauthorized";
|
|
12902
12954
|
422: {
|
|
@@ -445,6 +445,184 @@ export declare const tradeMarketAdminItemSchema: import("@sinclair/typebox").TOb
|
|
|
445
445
|
generated: undefined;
|
|
446
446
|
}, {}, {}>;
|
|
447
447
|
}, undefined>;
|
|
448
|
+
latestPrice: import("@sinclair/typebox").TUnion<[import("drizzle-typebox").BuildSchema<"select", {
|
|
449
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
450
|
+
name: "created_at";
|
|
451
|
+
tableName: "asset_price";
|
|
452
|
+
dataType: "date";
|
|
453
|
+
columnType: "PgTimestamp";
|
|
454
|
+
data: Date;
|
|
455
|
+
driverParam: string;
|
|
456
|
+
notNull: true;
|
|
457
|
+
hasDefault: true;
|
|
458
|
+
isPrimaryKey: false;
|
|
459
|
+
isAutoincrement: false;
|
|
460
|
+
hasRuntimeDefault: false;
|
|
461
|
+
enumValues: undefined;
|
|
462
|
+
baseColumn: never;
|
|
463
|
+
identity: undefined;
|
|
464
|
+
generated: undefined;
|
|
465
|
+
}, {}, {}>;
|
|
466
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
467
|
+
name: "updated_at";
|
|
468
|
+
tableName: "asset_price";
|
|
469
|
+
dataType: "date";
|
|
470
|
+
columnType: "PgTimestamp";
|
|
471
|
+
data: Date;
|
|
472
|
+
driverParam: string;
|
|
473
|
+
notNull: true;
|
|
474
|
+
hasDefault: true;
|
|
475
|
+
isPrimaryKey: false;
|
|
476
|
+
isAutoincrement: false;
|
|
477
|
+
hasRuntimeDefault: false;
|
|
478
|
+
enumValues: undefined;
|
|
479
|
+
baseColumn: never;
|
|
480
|
+
identity: undefined;
|
|
481
|
+
generated: undefined;
|
|
482
|
+
}, {}, {}>;
|
|
483
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
484
|
+
name: "id";
|
|
485
|
+
tableName: "asset_price";
|
|
486
|
+
dataType: "string";
|
|
487
|
+
columnType: "PgUUID";
|
|
488
|
+
data: string;
|
|
489
|
+
driverParam: string;
|
|
490
|
+
notNull: true;
|
|
491
|
+
hasDefault: true;
|
|
492
|
+
isPrimaryKey: true;
|
|
493
|
+
isAutoincrement: false;
|
|
494
|
+
hasRuntimeDefault: false;
|
|
495
|
+
enumValues: undefined;
|
|
496
|
+
baseColumn: never;
|
|
497
|
+
identity: undefined;
|
|
498
|
+
generated: undefined;
|
|
499
|
+
}, {}, {}>;
|
|
500
|
+
baseAssetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
501
|
+
name: "base_asset_id";
|
|
502
|
+
tableName: "asset_price";
|
|
503
|
+
dataType: "string";
|
|
504
|
+
columnType: "PgUUID";
|
|
505
|
+
data: string;
|
|
506
|
+
driverParam: string;
|
|
507
|
+
notNull: true;
|
|
508
|
+
hasDefault: false;
|
|
509
|
+
isPrimaryKey: false;
|
|
510
|
+
isAutoincrement: false;
|
|
511
|
+
hasRuntimeDefault: false;
|
|
512
|
+
enumValues: undefined;
|
|
513
|
+
baseColumn: never;
|
|
514
|
+
identity: undefined;
|
|
515
|
+
generated: undefined;
|
|
516
|
+
}, {}, {}>;
|
|
517
|
+
baseAsset: import("drizzle-orm/pg-core").PgColumn<{
|
|
518
|
+
name: "base_asset";
|
|
519
|
+
tableName: "asset_price";
|
|
520
|
+
dataType: "string";
|
|
521
|
+
columnType: "PgVarchar";
|
|
522
|
+
data: string;
|
|
523
|
+
driverParam: string;
|
|
524
|
+
notNull: true;
|
|
525
|
+
hasDefault: false;
|
|
526
|
+
isPrimaryKey: false;
|
|
527
|
+
isAutoincrement: false;
|
|
528
|
+
hasRuntimeDefault: false;
|
|
529
|
+
enumValues: [string, ...string[]];
|
|
530
|
+
baseColumn: never;
|
|
531
|
+
identity: undefined;
|
|
532
|
+
generated: undefined;
|
|
533
|
+
}, {}, {
|
|
534
|
+
length: 32;
|
|
535
|
+
}>;
|
|
536
|
+
quoteAssetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
537
|
+
name: "quote_asset_id";
|
|
538
|
+
tableName: "asset_price";
|
|
539
|
+
dataType: "string";
|
|
540
|
+
columnType: "PgUUID";
|
|
541
|
+
data: string;
|
|
542
|
+
driverParam: string;
|
|
543
|
+
notNull: true;
|
|
544
|
+
hasDefault: false;
|
|
545
|
+
isPrimaryKey: false;
|
|
546
|
+
isAutoincrement: false;
|
|
547
|
+
hasRuntimeDefault: false;
|
|
548
|
+
enumValues: undefined;
|
|
549
|
+
baseColumn: never;
|
|
550
|
+
identity: undefined;
|
|
551
|
+
generated: undefined;
|
|
552
|
+
}, {}, {}>;
|
|
553
|
+
quoteAsset: import("drizzle-orm/pg-core").PgColumn<{
|
|
554
|
+
name: "quote_asset";
|
|
555
|
+
tableName: "asset_price";
|
|
556
|
+
dataType: "string";
|
|
557
|
+
columnType: "PgVarchar";
|
|
558
|
+
data: string;
|
|
559
|
+
driverParam: string;
|
|
560
|
+
notNull: true;
|
|
561
|
+
hasDefault: false;
|
|
562
|
+
isPrimaryKey: false;
|
|
563
|
+
isAutoincrement: false;
|
|
564
|
+
hasRuntimeDefault: false;
|
|
565
|
+
enumValues: [string, ...string[]];
|
|
566
|
+
baseColumn: never;
|
|
567
|
+
identity: undefined;
|
|
568
|
+
generated: undefined;
|
|
569
|
+
}, {}, {
|
|
570
|
+
length: 32;
|
|
571
|
+
}>;
|
|
572
|
+
price: import("drizzle-orm/pg-core").PgColumn<{
|
|
573
|
+
name: "price";
|
|
574
|
+
tableName: "asset_price";
|
|
575
|
+
dataType: "string";
|
|
576
|
+
columnType: "PgNumeric";
|
|
577
|
+
data: string;
|
|
578
|
+
driverParam: string;
|
|
579
|
+
notNull: true;
|
|
580
|
+
hasDefault: false;
|
|
581
|
+
isPrimaryKey: false;
|
|
582
|
+
isAutoincrement: false;
|
|
583
|
+
hasRuntimeDefault: false;
|
|
584
|
+
enumValues: undefined;
|
|
585
|
+
baseColumn: never;
|
|
586
|
+
identity: undefined;
|
|
587
|
+
generated: undefined;
|
|
588
|
+
}, {}, {}>;
|
|
589
|
+
source: import("drizzle-orm/pg-core").PgColumn<{
|
|
590
|
+
name: "source";
|
|
591
|
+
tableName: "asset_price";
|
|
592
|
+
dataType: "string";
|
|
593
|
+
columnType: "PgVarchar";
|
|
594
|
+
data: string;
|
|
595
|
+
driverParam: string;
|
|
596
|
+
notNull: true;
|
|
597
|
+
hasDefault: false;
|
|
598
|
+
isPrimaryKey: false;
|
|
599
|
+
isAutoincrement: false;
|
|
600
|
+
hasRuntimeDefault: false;
|
|
601
|
+
enumValues: [string, ...string[]];
|
|
602
|
+
baseColumn: never;
|
|
603
|
+
identity: undefined;
|
|
604
|
+
generated: undefined;
|
|
605
|
+
}, {}, {
|
|
606
|
+
length: 64;
|
|
607
|
+
}>;
|
|
608
|
+
effectiveAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
609
|
+
name: "effective_at";
|
|
610
|
+
tableName: "asset_price";
|
|
611
|
+
dataType: "date";
|
|
612
|
+
columnType: "PgTimestamp";
|
|
613
|
+
data: Date;
|
|
614
|
+
driverParam: string;
|
|
615
|
+
notNull: true;
|
|
616
|
+
hasDefault: false;
|
|
617
|
+
isPrimaryKey: false;
|
|
618
|
+
isAutoincrement: false;
|
|
619
|
+
hasRuntimeDefault: false;
|
|
620
|
+
enumValues: undefined;
|
|
621
|
+
baseColumn: never;
|
|
622
|
+
identity: undefined;
|
|
623
|
+
generated: undefined;
|
|
624
|
+
}, {}, {}>;
|
|
625
|
+
}, undefined>, import("@sinclair/typebox").TNull]>;
|
|
448
626
|
}>;
|
|
449
627
|
export type TradeMarketAdminItemType = typeof tradeMarketAdminItemSchema.static;
|
|
450
628
|
export declare const tradeMarketAdminListResponseSchema: import("@sinclair/typebox").TObject<{
|
|
@@ -846,6 +1024,184 @@ export declare const tradeMarketAdminListResponseSchema: import("@sinclair/typeb
|
|
|
846
1024
|
generated: undefined;
|
|
847
1025
|
}, {}, {}>;
|
|
848
1026
|
}, undefined>;
|
|
1027
|
+
latestPrice: import("@sinclair/typebox").TUnion<[import("drizzle-typebox").BuildSchema<"select", {
|
|
1028
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1029
|
+
name: "created_at";
|
|
1030
|
+
tableName: "asset_price";
|
|
1031
|
+
dataType: "date";
|
|
1032
|
+
columnType: "PgTimestamp";
|
|
1033
|
+
data: Date;
|
|
1034
|
+
driverParam: string;
|
|
1035
|
+
notNull: true;
|
|
1036
|
+
hasDefault: true;
|
|
1037
|
+
isPrimaryKey: false;
|
|
1038
|
+
isAutoincrement: false;
|
|
1039
|
+
hasRuntimeDefault: false;
|
|
1040
|
+
enumValues: undefined;
|
|
1041
|
+
baseColumn: never;
|
|
1042
|
+
identity: undefined;
|
|
1043
|
+
generated: undefined;
|
|
1044
|
+
}, {}, {}>;
|
|
1045
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1046
|
+
name: "updated_at";
|
|
1047
|
+
tableName: "asset_price";
|
|
1048
|
+
dataType: "date";
|
|
1049
|
+
columnType: "PgTimestamp";
|
|
1050
|
+
data: Date;
|
|
1051
|
+
driverParam: string;
|
|
1052
|
+
notNull: true;
|
|
1053
|
+
hasDefault: true;
|
|
1054
|
+
isPrimaryKey: false;
|
|
1055
|
+
isAutoincrement: false;
|
|
1056
|
+
hasRuntimeDefault: false;
|
|
1057
|
+
enumValues: undefined;
|
|
1058
|
+
baseColumn: never;
|
|
1059
|
+
identity: undefined;
|
|
1060
|
+
generated: undefined;
|
|
1061
|
+
}, {}, {}>;
|
|
1062
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
1063
|
+
name: "id";
|
|
1064
|
+
tableName: "asset_price";
|
|
1065
|
+
dataType: "string";
|
|
1066
|
+
columnType: "PgUUID";
|
|
1067
|
+
data: string;
|
|
1068
|
+
driverParam: string;
|
|
1069
|
+
notNull: true;
|
|
1070
|
+
hasDefault: true;
|
|
1071
|
+
isPrimaryKey: true;
|
|
1072
|
+
isAutoincrement: false;
|
|
1073
|
+
hasRuntimeDefault: false;
|
|
1074
|
+
enumValues: undefined;
|
|
1075
|
+
baseColumn: never;
|
|
1076
|
+
identity: undefined;
|
|
1077
|
+
generated: undefined;
|
|
1078
|
+
}, {}, {}>;
|
|
1079
|
+
baseAssetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1080
|
+
name: "base_asset_id";
|
|
1081
|
+
tableName: "asset_price";
|
|
1082
|
+
dataType: "string";
|
|
1083
|
+
columnType: "PgUUID";
|
|
1084
|
+
data: string;
|
|
1085
|
+
driverParam: string;
|
|
1086
|
+
notNull: true;
|
|
1087
|
+
hasDefault: false;
|
|
1088
|
+
isPrimaryKey: false;
|
|
1089
|
+
isAutoincrement: false;
|
|
1090
|
+
hasRuntimeDefault: false;
|
|
1091
|
+
enumValues: undefined;
|
|
1092
|
+
baseColumn: never;
|
|
1093
|
+
identity: undefined;
|
|
1094
|
+
generated: undefined;
|
|
1095
|
+
}, {}, {}>;
|
|
1096
|
+
baseAsset: import("drizzle-orm/pg-core").PgColumn<{
|
|
1097
|
+
name: "base_asset";
|
|
1098
|
+
tableName: "asset_price";
|
|
1099
|
+
dataType: "string";
|
|
1100
|
+
columnType: "PgVarchar";
|
|
1101
|
+
data: string;
|
|
1102
|
+
driverParam: string;
|
|
1103
|
+
notNull: true;
|
|
1104
|
+
hasDefault: false;
|
|
1105
|
+
isPrimaryKey: false;
|
|
1106
|
+
isAutoincrement: false;
|
|
1107
|
+
hasRuntimeDefault: false;
|
|
1108
|
+
enumValues: [string, ...string[]];
|
|
1109
|
+
baseColumn: never;
|
|
1110
|
+
identity: undefined;
|
|
1111
|
+
generated: undefined;
|
|
1112
|
+
}, {}, {
|
|
1113
|
+
length: 32;
|
|
1114
|
+
}>;
|
|
1115
|
+
quoteAssetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
1116
|
+
name: "quote_asset_id";
|
|
1117
|
+
tableName: "asset_price";
|
|
1118
|
+
dataType: "string";
|
|
1119
|
+
columnType: "PgUUID";
|
|
1120
|
+
data: string;
|
|
1121
|
+
driverParam: string;
|
|
1122
|
+
notNull: true;
|
|
1123
|
+
hasDefault: false;
|
|
1124
|
+
isPrimaryKey: false;
|
|
1125
|
+
isAutoincrement: false;
|
|
1126
|
+
hasRuntimeDefault: false;
|
|
1127
|
+
enumValues: undefined;
|
|
1128
|
+
baseColumn: never;
|
|
1129
|
+
identity: undefined;
|
|
1130
|
+
generated: undefined;
|
|
1131
|
+
}, {}, {}>;
|
|
1132
|
+
quoteAsset: import("drizzle-orm/pg-core").PgColumn<{
|
|
1133
|
+
name: "quote_asset";
|
|
1134
|
+
tableName: "asset_price";
|
|
1135
|
+
dataType: "string";
|
|
1136
|
+
columnType: "PgVarchar";
|
|
1137
|
+
data: string;
|
|
1138
|
+
driverParam: string;
|
|
1139
|
+
notNull: true;
|
|
1140
|
+
hasDefault: false;
|
|
1141
|
+
isPrimaryKey: false;
|
|
1142
|
+
isAutoincrement: false;
|
|
1143
|
+
hasRuntimeDefault: false;
|
|
1144
|
+
enumValues: [string, ...string[]];
|
|
1145
|
+
baseColumn: never;
|
|
1146
|
+
identity: undefined;
|
|
1147
|
+
generated: undefined;
|
|
1148
|
+
}, {}, {
|
|
1149
|
+
length: 32;
|
|
1150
|
+
}>;
|
|
1151
|
+
price: import("drizzle-orm/pg-core").PgColumn<{
|
|
1152
|
+
name: "price";
|
|
1153
|
+
tableName: "asset_price";
|
|
1154
|
+
dataType: "string";
|
|
1155
|
+
columnType: "PgNumeric";
|
|
1156
|
+
data: string;
|
|
1157
|
+
driverParam: string;
|
|
1158
|
+
notNull: true;
|
|
1159
|
+
hasDefault: false;
|
|
1160
|
+
isPrimaryKey: false;
|
|
1161
|
+
isAutoincrement: false;
|
|
1162
|
+
hasRuntimeDefault: false;
|
|
1163
|
+
enumValues: undefined;
|
|
1164
|
+
baseColumn: never;
|
|
1165
|
+
identity: undefined;
|
|
1166
|
+
generated: undefined;
|
|
1167
|
+
}, {}, {}>;
|
|
1168
|
+
source: import("drizzle-orm/pg-core").PgColumn<{
|
|
1169
|
+
name: "source";
|
|
1170
|
+
tableName: "asset_price";
|
|
1171
|
+
dataType: "string";
|
|
1172
|
+
columnType: "PgVarchar";
|
|
1173
|
+
data: string;
|
|
1174
|
+
driverParam: string;
|
|
1175
|
+
notNull: true;
|
|
1176
|
+
hasDefault: false;
|
|
1177
|
+
isPrimaryKey: false;
|
|
1178
|
+
isAutoincrement: false;
|
|
1179
|
+
hasRuntimeDefault: false;
|
|
1180
|
+
enumValues: [string, ...string[]];
|
|
1181
|
+
baseColumn: never;
|
|
1182
|
+
identity: undefined;
|
|
1183
|
+
generated: undefined;
|
|
1184
|
+
}, {}, {
|
|
1185
|
+
length: 64;
|
|
1186
|
+
}>;
|
|
1187
|
+
effectiveAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1188
|
+
name: "effective_at";
|
|
1189
|
+
tableName: "asset_price";
|
|
1190
|
+
dataType: "date";
|
|
1191
|
+
columnType: "PgTimestamp";
|
|
1192
|
+
data: Date;
|
|
1193
|
+
driverParam: string;
|
|
1194
|
+
notNull: true;
|
|
1195
|
+
hasDefault: false;
|
|
1196
|
+
isPrimaryKey: false;
|
|
1197
|
+
isAutoincrement: false;
|
|
1198
|
+
hasRuntimeDefault: false;
|
|
1199
|
+
enumValues: undefined;
|
|
1200
|
+
baseColumn: never;
|
|
1201
|
+
identity: undefined;
|
|
1202
|
+
generated: undefined;
|
|
1203
|
+
}, {}, {}>;
|
|
1204
|
+
}, undefined>, import("@sinclair/typebox").TNull]>;
|
|
849
1205
|
}>>;
|
|
850
1206
|
pagination: import("@sinclair/typebox").TObject<{
|
|
851
1207
|
pageSize: import("@sinclair/typebox").TNumber;
|
|
@@ -732,6 +732,18 @@ export declare const tradeMarketAdminRouter: Elysia<"/trade_market", {
|
|
|
732
732
|
dailyUserBuyBaseLimit: string | null;
|
|
733
733
|
dailyUserSellBaseLimit: string | null;
|
|
734
734
|
maxSlippageBps: string;
|
|
735
|
+
latestPrice: {
|
|
736
|
+
id: string;
|
|
737
|
+
createdAt: Date;
|
|
738
|
+
updatedAt: Date;
|
|
739
|
+
baseAssetId: string;
|
|
740
|
+
baseAsset: string;
|
|
741
|
+
quoteAssetId: string;
|
|
742
|
+
quoteAsset: string;
|
|
743
|
+
price: string;
|
|
744
|
+
source: string;
|
|
745
|
+
effectiveAt: Date;
|
|
746
|
+
} | null;
|
|
735
747
|
}[];
|
|
736
748
|
pagination: {
|
|
737
749
|
total: number;
|
|
@@ -141,6 +141,18 @@ export declare abstract class AdminTradeMarketService extends BaseTradeMarketAdm
|
|
|
141
141
|
}>;
|
|
142
142
|
static listMarkets(query?: TradeMarketAdminListQueryType): Promise<{
|
|
143
143
|
items: {
|
|
144
|
+
latestPrice: {
|
|
145
|
+
id: string;
|
|
146
|
+
createdAt: Date;
|
|
147
|
+
updatedAt: Date;
|
|
148
|
+
baseAssetId: string;
|
|
149
|
+
baseAsset: string;
|
|
150
|
+
quoteAssetId: string;
|
|
151
|
+
quoteAsset: string;
|
|
152
|
+
price: string;
|
|
153
|
+
source: string;
|
|
154
|
+
effectiveAt: Date;
|
|
155
|
+
} | null;
|
|
144
156
|
id: string;
|
|
145
157
|
name: string;
|
|
146
158
|
createdAt: Date;
|
|
@@ -81,6 +81,8 @@ export declare abstract class BaseTradeMarketService {
|
|
|
81
81
|
protected static assertIdempotentPayload(existing: typeof tradeMarketOrder.$inferSelect, input: ExecuteMarketOrderInput): void;
|
|
82
82
|
}
|
|
83
83
|
export declare abstract class InternalTradeMarketService extends BaseTradeMarketService {
|
|
84
|
+
private static buildMarketPairKey;
|
|
85
|
+
private static getLatestPriceMapForMarkets;
|
|
84
86
|
private static marketWithRelationsQuery;
|
|
85
87
|
static listMarkets(query?: {
|
|
86
88
|
status?: 'draft' | 'active' | 'paused' | 'ended';
|
|
@@ -88,6 +90,18 @@ export declare abstract class InternalTradeMarketService extends BaseTradeMarket
|
|
|
88
90
|
offset?: number;
|
|
89
91
|
}): Promise<{
|
|
90
92
|
items: {
|
|
93
|
+
latestPrice: {
|
|
94
|
+
id: string;
|
|
95
|
+
createdAt: Date;
|
|
96
|
+
updatedAt: Date;
|
|
97
|
+
baseAssetId: string;
|
|
98
|
+
baseAsset: string;
|
|
99
|
+
quoteAssetId: string;
|
|
100
|
+
quoteAsset: string;
|
|
101
|
+
price: string;
|
|
102
|
+
source: string;
|
|
103
|
+
effectiveAt: Date;
|
|
104
|
+
} | null;
|
|
91
105
|
id: string;
|
|
92
106
|
name: string;
|
|
93
107
|
createdAt: Date;
|
|
@@ -132,6 +146,18 @@ export declare abstract class InternalTradeMarketService extends BaseTradeMarket
|
|
|
132
146
|
total: number;
|
|
133
147
|
}>;
|
|
134
148
|
static getMarket(marketId: string): Promise<{
|
|
149
|
+
latestPrice: {
|
|
150
|
+
id: string;
|
|
151
|
+
createdAt: Date;
|
|
152
|
+
updatedAt: Date;
|
|
153
|
+
baseAssetId: string;
|
|
154
|
+
baseAsset: string;
|
|
155
|
+
quoteAssetId: string;
|
|
156
|
+
quoteAsset: string;
|
|
157
|
+
price: string;
|
|
158
|
+
source: string;
|
|
159
|
+
effectiveAt: Date;
|
|
160
|
+
} | null;
|
|
135
161
|
id: string;
|
|
136
162
|
name: string;
|
|
137
163
|
createdAt: Date;
|