@chainstream-io/sdk 0.1.5 → 0.1.7

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 (147) hide show
  1. package/README.md +46 -0
  2. package/dist/esm/index.d.ts +1 -1
  3. package/dist/esm/index.js +76 -60
  4. package/dist/esm/openapi/apis/BlockchainApi.js +61 -44
  5. package/dist/esm/openapi/apis/DefiSolanaMoonshotApi.js +67 -50
  6. package/dist/esm/openapi/apis/DefiSolanaPumpfunApi.js +38 -25
  7. package/dist/esm/openapi/apis/DexApi.js +205 -176
  8. package/dist/esm/openapi/apis/DexPoolApi.js +41 -28
  9. package/dist/esm/openapi/apis/EndpointApi.js +212 -175
  10. package/dist/esm/openapi/apis/IpfsApi.js +38 -25
  11. package/dist/esm/openapi/apis/JobsApi.js +65 -48
  12. package/dist/esm/openapi/apis/RankingApi.js +278 -249
  13. package/dist/esm/openapi/apis/RedPacketApi.js +294 -253
  14. package/dist/esm/openapi/apis/TokenApi.js +1145 -1056
  15. package/dist/esm/openapi/apis/TradeApi.js +233 -208
  16. package/dist/esm/openapi/apis/TransactionApi.js +42 -29
  17. package/dist/esm/openapi/apis/WalletApi.js +148 -123
  18. package/dist/esm/openapi/apis/WatchlistApi.js +41 -28
  19. package/dist/esm/openapi/runtime.js +81 -69
  20. package/dist/esm/stream/index.d.ts +3 -0
  21. package/dist/esm/stream/index.js +3 -0
  22. package/dist/esm/{api → stream}/stream.js +36 -29
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.js +75 -59
  25. package/dist/openapi/apis/BlockchainApi.js +62 -78
  26. package/dist/openapi/apis/DefiSolanaMoonshotApi.js +68 -84
  27. package/dist/openapi/apis/DefiSolanaPumpfunApi.js +39 -59
  28. package/dist/openapi/apis/DexApi.js +206 -210
  29. package/dist/openapi/apis/DexPoolApi.js +42 -62
  30. package/dist/openapi/apis/EndpointApi.js +213 -209
  31. package/dist/openapi/apis/IpfsApi.js +39 -59
  32. package/dist/openapi/apis/JobsApi.js +66 -82
  33. package/dist/openapi/apis/RankingApi.js +279 -283
  34. package/dist/openapi/apis/RedPacketApi.js +295 -287
  35. package/dist/openapi/apis/TokenApi.js +1146 -1090
  36. package/dist/openapi/apis/TradeApi.js +234 -242
  37. package/dist/openapi/apis/TransactionApi.js +43 -63
  38. package/dist/openapi/apis/WalletApi.js +149 -157
  39. package/dist/openapi/apis/WatchlistApi.js +42 -62
  40. package/dist/openapi/runtime.js +81 -69
  41. package/dist/stream/index.d.ts +3 -0
  42. package/dist/stream/index.js +19 -0
  43. package/dist/{api → stream}/stream.js +36 -29
  44. package/package.json +29 -26
  45. package/src/api/stream.fields.ts +0 -271
  46. package/src/api/stream.model.ts +0 -307
  47. package/src/api/stream.ts +0 -1086
  48. package/src/index.ts +0 -188
  49. package/src/openapi/apis/BlockchainApi.ts +0 -140
  50. package/src/openapi/apis/DefiSolanaMoonshotApi.ts +0 -145
  51. package/src/openapi/apis/DefiSolanaPumpfunApi.ts +0 -86
  52. package/src/openapi/apis/DexApi.ts +0 -490
  53. package/src/openapi/apis/DexPoolApi.ts +0 -107
  54. package/src/openapi/apis/EndpointApi.ts +0 -421
  55. package/src/openapi/apis/IpfsApi.ts +0 -66
  56. package/src/openapi/apis/JobsApi.ts +0 -135
  57. package/src/openapi/apis/RankingApi.ts +0 -939
  58. package/src/openapi/apis/RedPacketApi.ts +0 -621
  59. package/src/openapi/apis/TokenApi.ts +0 -2569
  60. package/src/openapi/apis/TradeApi.ts +0 -596
  61. package/src/openapi/apis/TransactionApi.ts +0 -95
  62. package/src/openapi/apis/WalletApi.ts +0 -365
  63. package/src/openapi/apis/WatchlistApi.ts +0 -107
  64. package/src/openapi/apis/index.ts +0 -17
  65. package/src/openapi/index.ts +0 -5
  66. package/src/openapi/models/BlockchainDTO.ts +0 -93
  67. package/src/openapi/models/BlockchainLatestBlockDTO.ts +0 -75
  68. package/src/openapi/models/BooleanResultDTO.ts +0 -66
  69. package/src/openapi/models/CalculatePnlInput.ts +0 -65
  70. package/src/openapi/models/Candle.ts +0 -130
  71. package/src/openapi/models/ClaimRedPacketInput.ts +0 -90
  72. package/src/openapi/models/CreateEndpointInput.ts +0 -121
  73. package/src/openapi/models/CreateRedPacketInput.ts +0 -124
  74. package/src/openapi/models/CreateRedPacketReply.ts +0 -75
  75. package/src/openapi/models/CreateTokenInput.ts +0 -139
  76. package/src/openapi/models/CreateTokenReply.ts +0 -75
  77. package/src/openapi/models/DexDTO.ts +0 -90
  78. package/src/openapi/models/DexPage.ts +0 -114
  79. package/src/openapi/models/DexPoolDTO.ts +0 -141
  80. package/src/openapi/models/EndpointListResponse.ts +0 -97
  81. package/src/openapi/models/EndpointOperationResponse.ts +0 -65
  82. package/src/openapi/models/EndpointResponse.ts +0 -145
  83. package/src/openapi/models/EndpointSecretResponse.ts +0 -65
  84. package/src/openapi/models/FilterCondition.ts +0 -135
  85. package/src/openapi/models/GainersAndLosersDTO.ts +0 -93
  86. package/src/openapi/models/GainersAndLosersPage.ts +0 -114
  87. package/src/openapi/models/JobDTO.ts +0 -75
  88. package/src/openapi/models/JobStreamingDTO.ts +0 -75
  89. package/src/openapi/models/Link.ts +0 -88
  90. package/src/openapi/models/MoonshotCreateTokenInput.ts +0 -182
  91. package/src/openapi/models/MoonshotCreateTokenReply.ts +0 -75
  92. package/src/openapi/models/MoonshotSubmitCreateToken200Response.ts +0 -73
  93. package/src/openapi/models/MoonshotSubmitCreateTokenInput.ts +0 -74
  94. package/src/openapi/models/PumpCreateTokenInput.ts +0 -180
  95. package/src/openapi/models/PumpCreateTokenReply.ts +0 -74
  96. package/src/openapi/models/QuoteResponse.ts +0 -105
  97. package/src/openapi/models/RedPacketClaimDTO.ts +0 -148
  98. package/src/openapi/models/RedPacketClaimsPage.ts +0 -110
  99. package/src/openapi/models/RedPacketDTO.ts +0 -229
  100. package/src/openapi/models/RedPacketReply.ts +0 -66
  101. package/src/openapi/models/RedPacketSendTxInput.ts +0 -66
  102. package/src/openapi/models/RedPacketSendTxResponse.ts +0 -66
  103. package/src/openapi/models/RedPacketsPage.ts +0 -110
  104. package/src/openapi/models/Resolution.ts +0 -61
  105. package/src/openapi/models/SendTxInput.ts +0 -93
  106. package/src/openapi/models/SendTxResponse.ts +0 -84
  107. package/src/openapi/models/SwapInput.ts +0 -157
  108. package/src/openapi/models/SwapReply.ts +0 -75
  109. package/src/openapi/models/SwapRouteInput.ts +0 -186
  110. package/src/openapi/models/SwapRouteResponse.ts +0 -101
  111. package/src/openapi/models/Token.ts +0 -251
  112. package/src/openapi/models/TokenCreationDTO.ts +0 -131
  113. package/src/openapi/models/TokenCreationPage.ts +0 -114
  114. package/src/openapi/models/TokenCreatorsDTO.ts +0 -81
  115. package/src/openapi/models/TokenExtraDTO.ts +0 -225
  116. package/src/openapi/models/TokenHolder.ts +0 -93
  117. package/src/openapi/models/TokenHolderPage.ts +0 -114
  118. package/src/openapi/models/TokenListPage.ts +0 -114
  119. package/src/openapi/models/TokenMarketData.ts +0 -190
  120. package/src/openapi/models/TokenMetadata.ts +0 -188
  121. package/src/openapi/models/TokenPage.ts +0 -122
  122. package/src/openapi/models/TokenPriceDTO.ts +0 -93
  123. package/src/openapi/models/TokenPricePage.ts +0 -114
  124. package/src/openapi/models/TokenSocialMediasDTO.ts +0 -161
  125. package/src/openapi/models/TokenStat.ts +0 -1152
  126. package/src/openapi/models/TopTradersDTO.ts +0 -164
  127. package/src/openapi/models/TopTradersPage.ts +0 -114
  128. package/src/openapi/models/TradeDetailDTO.ts +0 -282
  129. package/src/openapi/models/TradeEvent.ts +0 -184
  130. package/src/openapi/models/TradePage.ts +0 -114
  131. package/src/openapi/models/TradeType.ts +0 -53
  132. package/src/openapi/models/UpdateEndpointInput.ts +0 -129
  133. package/src/openapi/models/WalletBalanceDetailDTO.ts +0 -282
  134. package/src/openapi/models/WalletBalancesDTO.ts +0 -92
  135. package/src/openapi/models/WalletPnlDTO.ts +0 -264
  136. package/src/openapi/models/index.ts +0 -72
  137. package/src/openapi/runtime.ts +0 -432
  138. /package/dist/{api → esm/stream}/stream.d.ts +0 -0
  139. /package/dist/{api → esm/stream}/stream.fields.d.ts +0 -0
  140. /package/dist/esm/{api → stream}/stream.fields.js +0 -0
  141. /package/dist/{api → esm/stream}/stream.model.d.ts +0 -0
  142. /package/dist/esm/{api → stream}/stream.model.js +0 -0
  143. /package/dist/{esm/api → stream}/stream.d.ts +0 -0
  144. /package/dist/{esm/api → stream}/stream.fields.d.ts +0 -0
  145. /package/dist/{api → stream}/stream.fields.js +0 -0
  146. /package/dist/{esm/api → stream}/stream.model.d.ts +0 -0
  147. /package/dist/{api → stream}/stream.model.js +0 -0
@@ -1,271 +0,0 @@
1
- /**
2
- * Field mappings for CEL filter expressions
3
- * Maps human-readable field names to short field names used in the API
4
- * Organized by subscription method to handle field name conflicts
5
- */
6
-
7
- export interface FieldMapping {
8
- readonly [key: string]: string;
9
- }
10
-
11
- export interface MethodFieldMappings {
12
- readonly [methodName: string]: FieldMapping;
13
- }
14
-
15
- /**
16
- * Field mappings organized by subscription method
17
- * Each method can have its own field mappings to handle conflicts
18
- */
19
- export const CEL_FIELD_MAPPINGS: MethodFieldMappings = {
20
- // Wallet balance subscription fields
21
- "subscribeWalletBalance": {
22
- "walletAddress": "a",
23
- "tokenAddress": "ta",
24
- "tokenPriceInUsd": "tpiu",
25
- "balance": "b",
26
- "timestamp": "t",
27
- },
28
-
29
- // Token candles subscription fields
30
- "subscribeTokenCandles": {
31
- "open": "o",
32
- "close": "c",
33
- "high": "h",
34
- "low": "l",
35
- "volume": "v",
36
- "resolution": "r",
37
- "time": "t",
38
- "number": "n",
39
- },
40
-
41
- // Token stats subscription fields
42
- "subscribeTokenStats": {
43
- "address": "a",
44
- "timestamp": "t",
45
- "buys1m": "b1m",
46
- "sells1m": "s1m",
47
- "buyers1m": "be1m",
48
- "sellers1m": "se1m",
49
- "buyVolumeInUsd1m": "bviu1m",
50
- "sellVolumeInUsd1m": "sviu1m",
51
- "price1m": "p1m",
52
- "openInUsd1m": "oiu1m",
53
- "closeInUsd1m": "ciu1m",
54
- "buys5m": "b5m",
55
- "sells5m": "s5m",
56
- "buyers5m": "be5m",
57
- "sellers5m": "se5m",
58
- "buyVolumeInUsd5m": "bviu5m",
59
- "sellVolumeInUsd5m": "sviu5m",
60
- "price5m": "p5m",
61
- "openInUsd5m": "oiu5m",
62
- "closeInUsd5m": "ciu5m",
63
- "buys15m": "b15m",
64
- "sells15m": "s15m",
65
- "buyers15m": "be15m",
66
- "sellers15m": "se15m",
67
- "buyVolumeInUsd15m": "bviu15m",
68
- "sellVolumeInUsd15m": "sviu15m",
69
- "price15m": "p15m",
70
- "openInUsd15m": "oiu15m",
71
- "closeInUsd15m": "ciu15m",
72
- "buys30m": "b30m",
73
- "sells30m": "s30m",
74
- "buyers30m": "be30m",
75
- "sellers30m": "se30m",
76
- "buyVolumeInUsd30m": "bviu30m",
77
- "sellVolumeInUsd30m": "sviu30m",
78
- "price30m": "p30m",
79
- "openInUsd30m": "oiu30m",
80
- "closeInUsd30m": "ciu30m",
81
- "buys1h": "b1h",
82
- "sells1h": "s1h",
83
- "buyers1h": "be1h",
84
- "sellers1h": "se1h",
85
- "buyVolumeInUsd1h": "bviu1h",
86
- "sellVolumeInUsd1h": "sviu1h",
87
- "price1h": "p1h",
88
- "openInUsd1h": "oiu1h",
89
- "closeInUsd1h": "ciu1h",
90
- "buys4h": "b4h",
91
- "sells4h": "s4h",
92
- "buyers4h": "be4h",
93
- "sellers4h": "se4h",
94
- "buyVolumeInUsd4h": "bviu4h",
95
- "sellVolumeInUsd4h": "sviu4h",
96
- "price4h": "p4h",
97
- "openInUsd4h": "oiu4h",
98
- "closeInUsd4h": "ciu4h",
99
- "buys24h": "b24h",
100
- "sells24h": "s24h",
101
- "buyers24h": "be24h",
102
- "sellers24h": "se24h",
103
- "buyVolumeInUsd24h": "bviu24h",
104
- "sellVolumeInUsd24h": "sviu24h",
105
- "price24h": "p24h",
106
- "price": "p",
107
- "openInUsd24h": "oiu24h",
108
- "closeInUsd24h": "ciu24h",
109
- },
110
-
111
- // Token holder subscription fields
112
- "subscribeTokenHolders": {
113
- "tokenAddress": "a",
114
- "holders": "h",
115
- "top100Amount": "t100a",
116
- "top10Amount": "t10a",
117
- "top100Holders": "t100h",
118
- "top10Holders": "t10h",
119
- "top100Ratio": "t100r",
120
- "top10Ratio": "t10r",
121
- "timestamp": "ts",
122
- },
123
-
124
- // New token subscription fields
125
- "subscribeNewToken": {
126
- "tokenAddress": "a",
127
- "name": "n",
128
- "symbol": "s",
129
- "createdAtMs": "cts",
130
- },
131
-
132
- // Token supply subscription fields
133
- "subscribeTokenSupply": {
134
- "tokenAddress": "a",
135
- "supply": "s",
136
- "timestamp": "ts",
137
- },
138
-
139
- // Dex pool balance subscription fields
140
- "subscribeDexPoolBalance": {
141
- "poolAddress": "a",
142
- "tokenAAddress": "taa",
143
- "tokenALiquidityInUsd": "taliu",
144
- "tokenBAddress": "tba",
145
- "tokenBLiquidityInUsd": "tbliu",
146
- },
147
-
148
- // Token liquidity subscription fields
149
- "subscribeTokenLiquidity": {
150
- "tokenAddress": "a",
151
- "metricType": "t",
152
- "value": "v",
153
- "timestamp": "ts",
154
- },
155
-
156
- // New token metadata subscription fields
157
- "subscribeNewTokensMetadata": {
158
- "tokenAddress": "a",
159
- "name": "n",
160
- "symbol": "s",
161
- "imageUrl": "iu",
162
- "description": "de",
163
- "socialMedia": "sm",
164
- "createdAtMs": "cts",
165
- },
166
-
167
- // Token trades subscription fields
168
- "subscribeTokenTrades": {
169
- "tokenAddress": "a",
170
- "timestamp": "t",
171
- "kind": "k",
172
- "buyAmount": "ba",
173
- "buyAmountInUsd": "baiu",
174
- "buyTokenAddress": "btma",
175
- "buyTokenName": "btn",
176
- "buyTokenSymbol": "bts",
177
- "buyWalletAddress": "bwa",
178
- "sellAmount": "sa",
179
- "sellAmountInUsd": "saiu",
180
- "sellTokenAddress": "stma",
181
- "sellTokenName": "stn",
182
- "sellTokenSymbol": "sts",
183
- "sellWalletAddress": "swa",
184
- "txHash": "h",
185
- },
186
-
187
- // Wallet token PnL subscription fields
188
- "subscribeWalletPnl": {
189
- "walletAddress": "a",
190
- "tokenAddress": "ta",
191
- "tokenPriceInUsd": "tpiu",
192
- "timestamp": "t",
193
- "opentime": "ot",
194
- "lasttime": "lt",
195
- "closetime": "ct",
196
- "buyAmount": "ba",
197
- "buyAmountInUsd": "baiu",
198
- "buyCount": "bs",
199
- "buyCount30d": "bs30d",
200
- "buyCount7d": "bs7d",
201
- "sellAmount": "sa",
202
- "sellAmountInUsd": "saiu",
203
- "sellCount": "ss",
204
- "sellCount30d": "ss30d",
205
- "sellCount7d": "ss7d",
206
- "heldDurationTimestamp": "hdts",
207
- "averageBuyPriceInUsd": "abpiu",
208
- "averageSellPriceInUsd": "aspiu",
209
- "unrealizedProfitInUsd": "upiu",
210
- "unrealizedProfitRatio": "upr",
211
- "realizedProfitInUsd": "rpiu",
212
- "realizedProfitRatio": "rpr",
213
- "totalRealizedProfitInUsd": "trpiu",
214
- "totalRealizedProfitRatio": "trr",
215
- },
216
- } as const;
217
-
218
- /**
219
- * Get field mappings for a specific subscription method
220
- * @param methodName - The name of the subscription method
221
- * @returns Field mapping object for the method, or empty object if not found
222
- */
223
- export function getFieldMappings(methodName: string): FieldMapping {
224
- return CEL_FIELD_MAPPINGS[methodName] || {};
225
- }
226
-
227
- /**
228
- * Replace long field names with short field names in a filter expression
229
- * Automatically adds meta. prefix if not present
230
- * @param filter - Original filter expression
231
- * @param methodName - The name of the subscription method
232
- * @returns Filter expression with short field names and meta. prefix
233
- */
234
- export function replaceFilterFields(filter: string, methodName: string): string {
235
- if (!filter) {return filter}
236
-
237
- const fieldMappings = getFieldMappings(methodName);
238
- let result = filter;
239
-
240
- // Replace all long field names with short field names
241
- for (const [longField, shortField] of Object.entries(fieldMappings)) {
242
- // Handle both cases: with and without meta. prefix
243
- const patterns = [
244
- // Pattern 1: fieldName (without meta. prefix)
245
- new RegExp(`\\b${longField}\\b`, "g"),
246
- // Pattern 2: meta.fieldName (with meta. prefix)
247
- new RegExp(`\\bmeta\\.${longField}\\b`, "g"),
248
- ];
249
-
250
- patterns.forEach((pattern) => {
251
- result = result.replace(pattern, `meta.${shortField}`);
252
- });
253
- }
254
-
255
- return result;
256
- }
257
-
258
- /**
259
- * Type-safe field mapping for specific subscription methods
260
- */
261
- export type SubscriptionMethod = keyof typeof CEL_FIELD_MAPPINGS;
262
-
263
- /**
264
- * Get available field names for a specific subscription method
265
- * @param methodName - The name of the subscription method
266
- * @returns Array of available field names
267
- */
268
- export function getAvailableFields(methodName: string): string[] {
269
- const mappings = getFieldMappings(methodName);
270
- return Object.keys(mappings);
271
- }
@@ -1,307 +0,0 @@
1
- import { Resolution } from "../openapi";
2
-
3
-
4
-
5
- export enum TokenActivityType {
6
- Sell = "sell",
7
- Buy = "buy",
8
- AddLiquidity = "add_liquidity",
9
- RemoveLiquidity = "remove_liquidity",
10
- }
11
-
12
- export enum ChannelType {
13
- New = "new",
14
- HOT = "trending",
15
- US_STOCKS = "us_stocks",
16
- COMPLETED = "completed",
17
- GRADUATED = "graduated",
18
- }
19
-
20
- export enum MetricType {
21
- LIQUIDITY_IN_USD = "liquidity_in_usd",
22
- MIGRATED_RATIO = "migrated_ratio",
23
- }
24
-
25
- export interface TokenActivity {
26
- address: string;
27
- priceUsd: string;
28
- amount: string;
29
- type: TokenActivityType;
30
- // maker: string;
31
- txHash: string;
32
- timestamp: number;
33
- }
34
-
35
- export interface TokenStat {
36
- address: string;
37
- timestamp: number;
38
- buys1m?: number;
39
- sells1m?: number;
40
- buyers1m?: number;
41
- sellers1m?: number;
42
- buyVolumeInUsd1m?: string;
43
- sellVolumeInUsd1m?: string;
44
- price1m?: string;
45
- openInUsd1m?: string;
46
- closeInUsd1m?: string;
47
-
48
- buys5m?: number;
49
- sells5m?: number;
50
- buyers5m?: number;
51
- sellers5m?: number;
52
- buyVolumeInUsd5m?: string;
53
- sellVolumeInUsd5m?: string;
54
- price5m?: string;
55
- openInUsd5m?: string;
56
- closeInUsd5m?: string;
57
-
58
- buys15m?: number;
59
- sells15m?: number;
60
- buyers15m?: number;
61
- sellers15m?: number;
62
- buyVolumeInUsd15m?: string;
63
- sellVolumeInUsd15m?: string;
64
- price15m?: string;
65
- openInUsd15m?: string;
66
- closeInUsd15m?: string;
67
-
68
- buys30m?: number;
69
- sells30m?: number;
70
- buyers30m?: number;
71
- sellers30m?: number;
72
- buyVolumeInUsd30m?: string;
73
- sellVolumeInUsd30m?: string;
74
- price30m?: string;
75
- openInUsd30m?: string;
76
- closeInUsd30m?: string;
77
-
78
- buys1h?: number;
79
- sells1h?: number;
80
- buyers1h?: number;
81
- sellers1h?: number;
82
- buyVolumeInUsd1h?: string;
83
- sellVolumeInUsd1h?: string;
84
- price1h?: string;
85
- openInUsd1h?: string;
86
- closeInUsd1h?: string;
87
-
88
- buys4h?: number;
89
- sells4h?: number;
90
- buyers4h?: number;
91
- sellers4h?: number;
92
- buyVolumeInUsd4h?: string;
93
- sellVolumeInUsd4h?: string;
94
- price4h?: string;
95
- openInUsd4h?: string;
96
- closeInUsd4h?: string;
97
-
98
- buys24h?: number;
99
- sells24h?: number;
100
- buyers24h?: number;
101
- sellers24h?: number;
102
- buyVolumeInUsd24h?: string;
103
- sellVolumeInUsd24h?: string;
104
- price24h?: string;
105
- openInUsd24h?: string;
106
- closeInUsd24h?: string;
107
-
108
- price?: string;
109
- }
110
-
111
- export interface TokenHolder {
112
- tokenAddress: string;
113
- holders?: number;
114
- top100Amount?: string;
115
- top10Amount?: string;
116
- top100Holders?: number;
117
- top10Holders?: number;
118
- top100Ratio?: string;
119
- top10Ratio?: string;
120
- creatorsHolders?: number;
121
- creatorsAmount?: string;
122
- creatorsRatio?: string;
123
- timestamp: number;
124
- }
125
-
126
- export interface WalletBalance {
127
- walletAddress: string;
128
- tokenAddress: string;
129
- tokenPriceInUsd: string;
130
- balance: string;
131
- timestamp: number;
132
- }
133
-
134
- export interface WalletPnl {
135
- walletAddress: string;
136
- buys: number;
137
- buyAmount: string;
138
- buyAmountInUsd: string;
139
- averageBuyPriceInUsd: string;
140
- sellAmount: string;
141
- sellAmountInUsd: string;
142
- sells: number;
143
- wins: number;
144
- winRatio: string;
145
- pnlInUsd: string;
146
- averagePnlInUsd: string;
147
- pnlRatio: string;
148
- profitableDays: number;
149
- losingDays: number;
150
- tokens: number;
151
- resolution: string;
152
- }
153
-
154
- export interface NewToken {
155
- tokenAddress: string;
156
- name: string;
157
- symbol: string;
158
- decimals?: number;
159
- launchFrom?: DexProtocol;
160
- createdAtMs: number;
161
- }
162
-
163
- export interface TokenSupply {
164
- tokenAddress: string;
165
- supply?: string;
166
- marketCapInUsd?: string;
167
- timestamp: number;
168
- }
169
-
170
- export interface DexPoolBalance {
171
- poolAddress: string;
172
- tokenAAddress: string;
173
- tokenALiquidityInUsd: string;
174
- tokenBAddress: string;
175
- tokenBLiquidityInUsd: string;
176
- }
177
-
178
- export interface TokenLiquidity {
179
- tokenAddress: string;
180
- metricType: MetricType;
181
- value: string;
182
- timestamp: number;
183
- }
184
-
185
- export interface DexProtocol {
186
- programAddress?: string;
187
- protocolFamily?: string;
188
- protocolName?: string;
189
- }
190
-
191
- export interface TokenBondingCurve {
192
- tokenAddress?: string;
193
- progressRatio?: string;
194
- }
195
-
196
- export interface TokenMetadata {
197
- tokenAddress: string;
198
- name?: string;
199
- decimals?: number;
200
- symbol?: string;
201
- imageUrl?: string;
202
- description?: string;
203
- socialMedia?: socialMedia;
204
- createdAtMs?: number;
205
- launchFrom?: DexProtocol;
206
- migratedTo?: DexProtocol;
207
- }
208
-
209
- export interface socialMedia {
210
- twitter?: string;
211
- telegram?: string;
212
- website?: string;
213
- tiktok?: string;
214
- discord?: string;
215
- facebook?: string;
216
- github?: string;
217
- instagram?: string;
218
- linkedin?: string;
219
- medium?: string;
220
- reddit?: string;
221
- youtube?: string;
222
- bitbucket?: string;
223
- }
224
-
225
- export interface TokenCandle {
226
- open: string;
227
- close: string;
228
- high: string;
229
- low: string;
230
- volume: string;
231
- resolution: Resolution;
232
- time: number;
233
- number: number;
234
- }
235
-
236
- export interface TradeActivity {
237
- tokenAddress: string;
238
- timestamp: number;
239
- kind: string;
240
- buyAmount: string;
241
- buyAmountInUsd: string;
242
- buyTokenAddress: string;
243
- buyTokenName: string;
244
- buyTokenSymbol: string;
245
- buyWalletAddress: string;
246
- sellAmount: string;
247
- sellAmountInUsd: string;
248
- sellTokenAddress: string;
249
- sellTokenName: string;
250
- sellTokenSymbol: string;
251
- sellWalletAddress: string;
252
- txHash: string;
253
- }
254
-
255
- export interface WalletTokenPnl {
256
- walletAddress: string;
257
- tokenAddress: string;
258
- tokenPriceInUsd: string;
259
- timestamp: number;
260
- opentime: number;
261
- lasttime: number;
262
- closetime: number;
263
- buyAmount: string;
264
- buyAmountInUsd: string;
265
- buyCount: number;
266
- buyCount30d: number;
267
- buyCount7d: number;
268
- sellAmount: string;
269
- sellAmountInUsd: string;
270
- sellCount: number;
271
- sellCount30d: number;
272
- sellCount7d: number;
273
- heldDurationTimestamp: number;
274
- averageBuyPriceInUsd: string;
275
- averageSellPriceInUsd: string;
276
- unrealizedProfitInUsd: string;
277
- unrealizedProfitRatio: string;
278
- realizedProfitInUsd: string;
279
- realizedProfitRatio: string;
280
- totalRealizedProfitInUsd: string;
281
- totalRealizedProfitRatio: string;
282
- }
283
-
284
- export enum RankingType {
285
- NEW = "new",
286
- HOT = "trending",
287
- STOCKS = "stocks",
288
- FINALSTRETCH = "completed",
289
- MIGRATED = "graduated",
290
- }
291
-
292
- export enum Dex {
293
- PUMP_FUN = "pump_fun",
294
- RAYDIUM_LAUNCHPAD = "raydium_launchpad",
295
- METEOR_DYNAMIC_BOUNDING_CURVE = "meteora_dynamic_bounding_curve",
296
- BONK_FUN = "bonk_fun",
297
- BOOP_FUN = "boop_fun",
298
- MOONIT_FUN = "moonit_fun",
299
- }
300
-
301
- export interface RankingTokenList {
302
- metadata?: TokenMetadata;
303
- holder?: TokenHolder;
304
- supply?: TokenSupply;
305
- stat?: TokenStat;
306
- bondingCurve?: TokenBondingCurve;
307
- }