@sui-tracker/shared 1.0.57 → 1.0.59
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.
|
@@ -24,18 +24,40 @@ export interface PoolData {
|
|
|
24
24
|
score: string;
|
|
25
25
|
currentPrice: string;
|
|
26
26
|
}
|
|
27
|
+
export interface PoolDataDetail {
|
|
28
|
+
id: string;
|
|
29
|
+
tokenA: TokenData;
|
|
30
|
+
tokenB: TokenData;
|
|
31
|
+
aIsBase: boolean;
|
|
32
|
+
reserveA?: number;
|
|
33
|
+
reserveB?: number;
|
|
34
|
+
currentPrice: string;
|
|
35
|
+
dex: string;
|
|
36
|
+
statsData: {
|
|
37
|
+
volume: {
|
|
38
|
+
[key: string]: string;
|
|
39
|
+
};
|
|
40
|
+
price: {
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
};
|
|
43
|
+
totalA2b: {
|
|
44
|
+
[key: string]: string;
|
|
45
|
+
};
|
|
46
|
+
totalTx: {
|
|
47
|
+
[key: string]: string;
|
|
48
|
+
};
|
|
49
|
+
totalMakers: {
|
|
50
|
+
[key: string]: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}
|
|
27
54
|
export interface CandleData {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
openUsd: string;
|
|
35
|
-
highUsd: string;
|
|
36
|
-
lowUsd: string;
|
|
37
|
-
closeUsd: string;
|
|
38
|
-
volumeUsd: string;
|
|
55
|
+
t: string;
|
|
56
|
+
o: string;
|
|
57
|
+
h: string;
|
|
58
|
+
l: string;
|
|
59
|
+
c: string;
|
|
60
|
+
v: string;
|
|
39
61
|
}
|
|
40
62
|
export interface GetTrendingPoolsRequest {
|
|
41
63
|
label: number;
|
|
@@ -52,6 +74,7 @@ export interface GetCandleChartRequest {
|
|
|
52
74
|
resolution: number;
|
|
53
75
|
limit: number;
|
|
54
76
|
timestamp?: string;
|
|
77
|
+
type?: 'usd' | 'token';
|
|
55
78
|
}
|
|
56
79
|
export interface GetTrendingPoolsResponse extends BaseResponse {
|
|
57
80
|
data: PoolData[];
|
|
@@ -60,7 +83,7 @@ export interface GetNewPoolsResponse extends BaseResponse {
|
|
|
60
83
|
data: PoolData[];
|
|
61
84
|
}
|
|
62
85
|
export interface GetPoolResponse extends BaseResponse {
|
|
63
|
-
data:
|
|
86
|
+
data: PoolDataDetail | null;
|
|
64
87
|
}
|
|
65
88
|
export interface GetCandleChartResponse extends BaseResponse {
|
|
66
89
|
data: CandleData[];
|
|
@@ -82,7 +105,8 @@ export interface SwapOrderData {
|
|
|
82
105
|
}
|
|
83
106
|
export interface GetLastSwapOrderRequest {
|
|
84
107
|
poolAddress: string;
|
|
85
|
-
|
|
108
|
+
startTime: string;
|
|
109
|
+
endTime: string;
|
|
86
110
|
limit?: number;
|
|
87
111
|
type?: string;
|
|
88
112
|
page?: number;
|
|
@@ -26,6 +26,15 @@ message TokenData {
|
|
|
26
26
|
optional string description = 9;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
// Stats data structure for PoolDataDetail
|
|
30
|
+
message StatsData {
|
|
31
|
+
map<string, string> volume = 1;
|
|
32
|
+
map<string, string> price = 2;
|
|
33
|
+
map<string, string> totalA2b = 3;
|
|
34
|
+
map<string, string> totalTx = 4;
|
|
35
|
+
map<string, string> totalMakers = 5;
|
|
36
|
+
}
|
|
37
|
+
|
|
29
38
|
// Pool data structure matching PoolData interface
|
|
30
39
|
message PoolData {
|
|
31
40
|
string id = 1;
|
|
@@ -40,19 +49,27 @@ message PoolData {
|
|
|
40
49
|
string currentPrice = 10;
|
|
41
50
|
}
|
|
42
51
|
|
|
52
|
+
// Pool data detail structure matching PoolDataDetail interface
|
|
53
|
+
message PoolDataDetail {
|
|
54
|
+
string id = 1;
|
|
55
|
+
TokenData tokenA = 2;
|
|
56
|
+
TokenData tokenB = 3;
|
|
57
|
+
bool aIsBase = 4;
|
|
58
|
+
optional double reserveA = 5;
|
|
59
|
+
optional double reserveB = 6;
|
|
60
|
+
string currentPrice = 7;
|
|
61
|
+
string dex = 8;
|
|
62
|
+
StatsData statsData = 9;
|
|
63
|
+
}
|
|
64
|
+
|
|
43
65
|
// Candle data structure matching CandleData interface
|
|
44
66
|
message CandleData {
|
|
45
|
-
string
|
|
46
|
-
string
|
|
47
|
-
string
|
|
48
|
-
string
|
|
49
|
-
string
|
|
50
|
-
string
|
|
51
|
-
string openUsd = 7;
|
|
52
|
-
string highUsd = 8;
|
|
53
|
-
string lowUsd = 9;
|
|
54
|
-
string closeUsd = 10;
|
|
55
|
-
string volumeUsd = 11;
|
|
67
|
+
string t = 1; // timestamp
|
|
68
|
+
string o = 2; // open
|
|
69
|
+
string h = 3; // high
|
|
70
|
+
string l = 4; // low
|
|
71
|
+
string c = 5; // close
|
|
72
|
+
string v = 6; // volume
|
|
56
73
|
}
|
|
57
74
|
|
|
58
75
|
// Swap order data structure matching SwapOrderData interface
|
|
@@ -109,14 +126,16 @@ message GetCandleChartRequest {
|
|
|
109
126
|
int32 resolution = 2;
|
|
110
127
|
int32 limit = 3;
|
|
111
128
|
optional string timestamp = 4;
|
|
129
|
+
optional string type = 5; // 'usd' | 'token'
|
|
112
130
|
}
|
|
113
131
|
|
|
114
132
|
message GetLastSwapOrderRequest {
|
|
115
133
|
string poolAddress = 1;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
optional
|
|
119
|
-
optional
|
|
134
|
+
string startTime = 2;
|
|
135
|
+
string endTime = 3;
|
|
136
|
+
optional int32 limit = 4;
|
|
137
|
+
optional string type = 5;
|
|
138
|
+
optional int32 page = 6;
|
|
120
139
|
}
|
|
121
140
|
|
|
122
141
|
message GetTrendingTokensRequest {
|
|
@@ -143,7 +162,7 @@ message GetNewPoolsResponse {
|
|
|
143
162
|
message GetPoolResponse {
|
|
144
163
|
bool success = 1;
|
|
145
164
|
string message = 2;
|
|
146
|
-
optional
|
|
165
|
+
optional PoolDataDetail data = 3; // Updated to use PoolDataDetail instead of PoolData
|
|
147
166
|
}
|
|
148
167
|
|
|
149
168
|
message GetCandleChartResponse {
|