@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,282 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Dex Aggregator API
5
- * Dex Aggregator API ⚡️
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: ai@sx.ai
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
- import { mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface WalletBalanceDetailDTO
20
- */
21
- export interface WalletBalanceDetailDTO {
22
- /**
23
- * DTO.WALLET.BALANCE.TOKEN_ADDRESS
24
- * @type {string}
25
- * @memberof WalletBalanceDetailDTO
26
- */
27
- tokenAddress: string;
28
- /**
29
- * DTO.WALLET.BALANCE.AMOUNT
30
- * @type {string}
31
- * @memberof WalletBalanceDetailDTO
32
- */
33
- amount: string;
34
- /**
35
- * DTO.WALLET.BALANCE.AMOUNT_IN_USD
36
- * @type {string}
37
- * @memberof WalletBalanceDetailDTO
38
- */
39
- valueInUsd: string;
40
- /**
41
- * DTO.WALLET.BALANCE.TOKEN_NAME
42
- * @type {string}
43
- * @memberof WalletBalanceDetailDTO
44
- */
45
- name: string;
46
- /**
47
- * DTO.WALLET.BALANCE.TOKEN_SYMBOL
48
- * @type {string}
49
- * @memberof WalletBalanceDetailDTO
50
- */
51
- symbol: string;
52
- /**
53
- * DTO.WALLET.BALANCE.TOKEN_IMAGE_URL
54
- * @type {string}
55
- * @memberof WalletBalanceDetailDTO
56
- */
57
- imageUrl: string;
58
- /**
59
- * DTO.WALLET.BALANCE.TOKEN_PRICE_IN_SOL
60
- * @type {string}
61
- * @memberof WalletBalanceDetailDTO
62
- */
63
- priceInSol: string;
64
- /**
65
- * DTO.WALLET.BALANCE.TOKEN_PRICE_IN_USD
66
- * @type {string}
67
- * @memberof WalletBalanceDetailDTO
68
- */
69
- priceInUsd: string;
70
- /**
71
- * DTO.WALLET.BALANCE.PRICE_CHANGE_24H
72
- * @type {string}
73
- * @memberof WalletBalanceDetailDTO
74
- */
75
- priceChangeRatioInUsd24h: string;
76
- /**
77
- * DTO.WALLET.BALANCE.UNREALIZED_PROFIT
78
- * @type {string}
79
- * @memberof WalletBalanceDetailDTO
80
- */
81
- unrealizedProfitInUsd: string;
82
- /**
83
- * DTO.WALLET.BALANCE.UNREALIZED_PROFIT_RATIO
84
- * @type {string}
85
- * @memberof WalletBalanceDetailDTO
86
- */
87
- unrealizedProfitRatio: string;
88
- /**
89
- * DTO.WALLET.BALANCE.OPEN_TIME
90
- * @type {number}
91
- * @memberof WalletBalanceDetailDTO
92
- */
93
- openTime: number;
94
- /**
95
- * DTO.WALLET.BALANCE.CLOSE_TIME
96
- * @type {number}
97
- * @memberof WalletBalanceDetailDTO
98
- */
99
- closeTime: number;
100
- /**
101
- * DTO.WALLET.BALANCE.BUYS
102
- * @type {string}
103
- * @memberof WalletBalanceDetailDTO
104
- */
105
- buys: string;
106
- /**
107
- * DTO.WALLET.BALANCE.BUY_AMOUNT
108
- * @type {string}
109
- * @memberof WalletBalanceDetailDTO
110
- */
111
- buyAmount: string;
112
- /**
113
- * DTO.WALLET.BALANCE.BUY_AMOUNT_USD
114
- * @type {string}
115
- * @memberof WalletBalanceDetailDTO
116
- */
117
- buyAmountInUsd: string;
118
- /**
119
- * DTO.WALLET.BALANCE.SELLS
120
- * @type {string}
121
- * @memberof WalletBalanceDetailDTO
122
- */
123
- sells: string;
124
- /**
125
- * DTO.WALLET.BALANCE.SELL_AMOUNT
126
- * @type {string}
127
- * @memberof WalletBalanceDetailDTO
128
- */
129
- sellAmount: string;
130
- /**
131
- * DTO.WALLET.BALANCE.SELL_AMOUNT_USD
132
- * @type {string}
133
- * @memberof WalletBalanceDetailDTO
134
- */
135
- sellAmountInUsd: string;
136
- /**
137
- * DTO.WALLET.BALANCE.AVERAGE_BUY_PRICE
138
- * @type {string}
139
- * @memberof WalletBalanceDetailDTO
140
- */
141
- averageBuyPriceInUsd: string;
142
- /**
143
- * DTO.WALLET.BALANCE.AVERAGE_SELL_PRICE
144
- * @type {string}
145
- * @memberof WalletBalanceDetailDTO
146
- */
147
- averageSellPriceInUsd: string;
148
- /**
149
- * DTO.WALLET.BALANCE.REALIZED_PROFIT_IN_USD
150
- * @type {string}
151
- * @memberof WalletBalanceDetailDTO
152
- */
153
- realizedProfitInUsd: string;
154
- /**
155
- * DTO.WALLET.BALANCE.REALIZED_PROFIT_RATIO
156
- * @type {string}
157
- * @memberof WalletBalanceDetailDTO
158
- */
159
- realizedProfitRatio: string;
160
- /**
161
- * DTO.WALLET.BALANCE.TOTAL_REALIZED_PROFIT
162
- * @type {string}
163
- * @memberof WalletBalanceDetailDTO
164
- */
165
- totalRealizedProfitInUsd: string;
166
- /**
167
- * DTO.WALLET.BALANCE.TOTAL_REALIZED_PROFIT_RATIO
168
- * @type {string}
169
- * @memberof WalletBalanceDetailDTO
170
- */
171
- totalRealizedProfitRatio: string;
172
- }
173
-
174
- /**
175
- * Check if a given object implements the WalletBalanceDetailDTO interface.
176
- */
177
- export function instanceOfWalletBalanceDetailDTO(value: object): value is WalletBalanceDetailDTO {
178
- if (!('tokenAddress' in value) || value['tokenAddress'] === undefined) return false;
179
- if (!('amount' in value) || value['amount'] === undefined) return false;
180
- if (!('valueInUsd' in value) || value['valueInUsd'] === undefined) return false;
181
- if (!('name' in value) || value['name'] === undefined) return false;
182
- if (!('symbol' in value) || value['symbol'] === undefined) return false;
183
- if (!('imageUrl' in value) || value['imageUrl'] === undefined) return false;
184
- if (!('priceInSol' in value) || value['priceInSol'] === undefined) return false;
185
- if (!('priceInUsd' in value) || value['priceInUsd'] === undefined) return false;
186
- if (!('priceChangeRatioInUsd24h' in value) || value['priceChangeRatioInUsd24h'] === undefined) return false;
187
- if (!('unrealizedProfitInUsd' in value) || value['unrealizedProfitInUsd'] === undefined) return false;
188
- if (!('unrealizedProfitRatio' in value) || value['unrealizedProfitRatio'] === undefined) return false;
189
- if (!('openTime' in value) || value['openTime'] === undefined) return false;
190
- if (!('closeTime' in value) || value['closeTime'] === undefined) return false;
191
- if (!('buys' in value) || value['buys'] === undefined) return false;
192
- if (!('buyAmount' in value) || value['buyAmount'] === undefined) return false;
193
- if (!('buyAmountInUsd' in value) || value['buyAmountInUsd'] === undefined) return false;
194
- if (!('sells' in value) || value['sells'] === undefined) return false;
195
- if (!('sellAmount' in value) || value['sellAmount'] === undefined) return false;
196
- if (!('sellAmountInUsd' in value) || value['sellAmountInUsd'] === undefined) return false;
197
- if (!('averageBuyPriceInUsd' in value) || value['averageBuyPriceInUsd'] === undefined) return false;
198
- if (!('averageSellPriceInUsd' in value) || value['averageSellPriceInUsd'] === undefined) return false;
199
- if (!('realizedProfitInUsd' in value) || value['realizedProfitInUsd'] === undefined) return false;
200
- if (!('realizedProfitRatio' in value) || value['realizedProfitRatio'] === undefined) return false;
201
- if (!('totalRealizedProfitInUsd' in value) || value['totalRealizedProfitInUsd'] === undefined) return false;
202
- if (!('totalRealizedProfitRatio' in value) || value['totalRealizedProfitRatio'] === undefined) return false;
203
- return true;
204
- }
205
-
206
- export function WalletBalanceDetailDTOFromJSON(json: any): WalletBalanceDetailDTO {
207
- return WalletBalanceDetailDTOFromJSONTyped(json, false);
208
- }
209
-
210
- export function WalletBalanceDetailDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): WalletBalanceDetailDTO {
211
- if (json == null) {
212
- return json;
213
- }
214
- return {
215
-
216
- 'tokenAddress': json['tokenAddress'],
217
- 'amount': json['amount'],
218
- 'valueInUsd': json['valueInUsd'],
219
- 'name': json['name'],
220
- 'symbol': json['symbol'],
221
- 'imageUrl': json['imageUrl'],
222
- 'priceInSol': json['priceInSol'],
223
- 'priceInUsd': json['priceInUsd'],
224
- 'priceChangeRatioInUsd24h': json['priceChangeRatioInUsd24h'],
225
- 'unrealizedProfitInUsd': json['unrealizedProfitInUsd'],
226
- 'unrealizedProfitRatio': json['unrealizedProfitRatio'],
227
- 'openTime': json['openTime'],
228
- 'closeTime': json['closeTime'],
229
- 'buys': json['buys'],
230
- 'buyAmount': json['buyAmount'],
231
- 'buyAmountInUsd': json['buyAmountInUsd'],
232
- 'sells': json['sells'],
233
- 'sellAmount': json['sellAmount'],
234
- 'sellAmountInUsd': json['sellAmountInUsd'],
235
- 'averageBuyPriceInUsd': json['averageBuyPriceInUsd'],
236
- 'averageSellPriceInUsd': json['averageSellPriceInUsd'],
237
- 'realizedProfitInUsd': json['realizedProfitInUsd'],
238
- 'realizedProfitRatio': json['realizedProfitRatio'],
239
- 'totalRealizedProfitInUsd': json['totalRealizedProfitInUsd'],
240
- 'totalRealizedProfitRatio': json['totalRealizedProfitRatio'],
241
- };
242
- }
243
-
244
- export function WalletBalanceDetailDTOToJSON(json: any): WalletBalanceDetailDTO {
245
- return WalletBalanceDetailDTOToJSONTyped(json, false);
246
- }
247
-
248
- export function WalletBalanceDetailDTOToJSONTyped(value?: WalletBalanceDetailDTO | null, ignoreDiscriminator: boolean = false): any {
249
- if (value == null) {
250
- return value;
251
- }
252
-
253
- return {
254
-
255
- 'tokenAddress': value['tokenAddress'],
256
- 'amount': value['amount'],
257
- 'valueInUsd': value['valueInUsd'],
258
- 'name': value['name'],
259
- 'symbol': value['symbol'],
260
- 'imageUrl': value['imageUrl'],
261
- 'priceInSol': value['priceInSol'],
262
- 'priceInUsd': value['priceInUsd'],
263
- 'priceChangeRatioInUsd24h': value['priceChangeRatioInUsd24h'],
264
- 'unrealizedProfitInUsd': value['unrealizedProfitInUsd'],
265
- 'unrealizedProfitRatio': value['unrealizedProfitRatio'],
266
- 'openTime': value['openTime'],
267
- 'closeTime': value['closeTime'],
268
- 'buys': value['buys'],
269
- 'buyAmount': value['buyAmount'],
270
- 'buyAmountInUsd': value['buyAmountInUsd'],
271
- 'sells': value['sells'],
272
- 'sellAmount': value['sellAmount'],
273
- 'sellAmountInUsd': value['sellAmountInUsd'],
274
- 'averageBuyPriceInUsd': value['averageBuyPriceInUsd'],
275
- 'averageSellPriceInUsd': value['averageSellPriceInUsd'],
276
- 'realizedProfitInUsd': value['realizedProfitInUsd'],
277
- 'realizedProfitRatio': value['realizedProfitRatio'],
278
- 'totalRealizedProfitInUsd': value['totalRealizedProfitInUsd'],
279
- 'totalRealizedProfitRatio': value['totalRealizedProfitRatio'],
280
- };
281
- }
282
-
@@ -1,92 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Dex Aggregator API
5
- * Dex Aggregator API ⚡️
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: ai@sx.ai
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
- import { mapValues } from '../runtime';
16
- import type { WalletBalanceDetailDTO } from './WalletBalanceDetailDTO';
17
- import {
18
- WalletBalanceDetailDTOFromJSON,
19
- WalletBalanceDetailDTOFromJSONTyped,
20
- WalletBalanceDetailDTOToJSON,
21
- WalletBalanceDetailDTOToJSONTyped,
22
- } from './WalletBalanceDetailDTO';
23
-
24
- /**
25
- *
26
- * @export
27
- * @interface WalletBalancesDTO
28
- */
29
- export interface WalletBalancesDTO {
30
- /**
31
- * DTO.WALLET.BALANCES.TOTAL_BALANCES_IN_USD
32
- * @type {string}
33
- * @memberof WalletBalancesDTO
34
- */
35
- totalBalancesInUsd: string;
36
- /**
37
- * DTO.WALLET.BALANCES.TOTAL_PROFIT_IN_USD
38
- * @type {string}
39
- * @memberof WalletBalancesDTO
40
- */
41
- totalProfitInUsd: string;
42
- /**
43
- * DTO.WALLET.BALANCES.BALANCES.DETAIL
44
- * @type {Array<WalletBalanceDetailDTO>}
45
- * @memberof WalletBalancesDTO
46
- */
47
- balances: Array<WalletBalanceDetailDTO>;
48
- }
49
-
50
- /**
51
- * Check if a given object implements the WalletBalancesDTO interface.
52
- */
53
- export function instanceOfWalletBalancesDTO(value: object): value is WalletBalancesDTO {
54
- if (!('totalBalancesInUsd' in value) || value['totalBalancesInUsd'] === undefined) return false;
55
- if (!('totalProfitInUsd' in value) || value['totalProfitInUsd'] === undefined) return false;
56
- if (!('balances' in value) || value['balances'] === undefined) return false;
57
- return true;
58
- }
59
-
60
- export function WalletBalancesDTOFromJSON(json: any): WalletBalancesDTO {
61
- return WalletBalancesDTOFromJSONTyped(json, false);
62
- }
63
-
64
- export function WalletBalancesDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): WalletBalancesDTO {
65
- if (json == null) {
66
- return json;
67
- }
68
- return {
69
-
70
- 'totalBalancesInUsd': json['totalBalancesInUsd'],
71
- 'totalProfitInUsd': json['totalProfitInUsd'],
72
- 'balances': ((json['balances'] as Array<any>).map(WalletBalanceDetailDTOFromJSON)),
73
- };
74
- }
75
-
76
- export function WalletBalancesDTOToJSON(json: any): WalletBalancesDTO {
77
- return WalletBalancesDTOToJSONTyped(json, false);
78
- }
79
-
80
- export function WalletBalancesDTOToJSONTyped(value?: WalletBalancesDTO | null, ignoreDiscriminator: boolean = false): any {
81
- if (value == null) {
82
- return value;
83
- }
84
-
85
- return {
86
-
87
- 'totalBalancesInUsd': value['totalBalancesInUsd'],
88
- 'totalProfitInUsd': value['totalProfitInUsd'],
89
- 'balances': ((value['balances'] as Array<any>).map(WalletBalanceDetailDTOToJSON)),
90
- };
91
- }
92
-
@@ -1,264 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Dex Aggregator API
5
- * Dex Aggregator API ⚡️
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: ai@sx.ai
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
- import { mapValues } from '../runtime';
16
- /**
17
- *
18
- * @export
19
- * @interface WalletPnlDTO
20
- */
21
- export interface WalletPnlDTO {
22
- /**
23
- * DTO.WALLET.PNL.ID
24
- * @type {number}
25
- * @memberof WalletPnlDTO
26
- */
27
- id: number;
28
- /**
29
- * DTO.WALLET.PNL.CHAIN
30
- * @type {string}
31
- * @memberof WalletPnlDTO
32
- */
33
- chain: string;
34
- /**
35
- * DTO.WALLET.PNL.WALLET_ADDRESS
36
- * @type {string}
37
- * @memberof WalletPnlDTO
38
- */
39
- walletAddress: string;
40
- /**
41
- * DTO.WALLET.PNL.TOKEN_ADDRESS
42
- * @type {string}
43
- * @memberof WalletPnlDTO
44
- */
45
- tokenAddress: string;
46
- /**
47
- * DTO.WALLET.PNL.TOKEN_PRICE
48
- * @type {number}
49
- * @memberof WalletPnlDTO
50
- */
51
- tokenPriceInUsd: number;
52
- /**
53
- * DTO.WALLET.PNL.OPEN_TIME
54
- * @type {number}
55
- * @memberof WalletPnlDTO
56
- */
57
- openTime: number;
58
- /**
59
- * DTO.WALLET.PNL.CLOSE_TIME
60
- * @type {number}
61
- * @memberof WalletPnlDTO
62
- */
63
- closeTime: number;
64
- /**
65
- * DTO.WALLET.PNL.LAST_TIME
66
- * @type {number}
67
- * @memberof WalletPnlDTO
68
- */
69
- lastTime: number;
70
- /**
71
- * DTO.WALLET.PNL.BALANCE
72
- * @type {number}
73
- * @memberof WalletPnlDTO
74
- */
75
- balance: number;
76
- /**
77
- * DTO.WALLET.PNL.BUY_AMOUNT
78
- * @type {number}
79
- * @memberof WalletPnlDTO
80
- */
81
- buyAmount: number;
82
- /**
83
- * DTO.WALLET.PNL.BUY_AMOUNT_USD
84
- * @type {number}
85
- * @memberof WalletPnlDTO
86
- */
87
- buyAmountInUsd: number;
88
- /**
89
- * DTO.WALLET.PNL.BUYS
90
- * @type {number}
91
- * @memberof WalletPnlDTO
92
- */
93
- buys: number;
94
- /**
95
- * DTO.WALLET.PNL.SELL_AMOUNT
96
- * @type {number}
97
- * @memberof WalletPnlDTO
98
- */
99
- sellAmount: number;
100
- /**
101
- * DTO.WALLET.PNL.SELL_AMOUNT_USD
102
- * @type {number}
103
- * @memberof WalletPnlDTO
104
- */
105
- sellAmountInUsd: number;
106
- /**
107
- * DTO.WALLET.PNL.SELLS
108
- * @type {number}
109
- * @memberof WalletPnlDTO
110
- */
111
- sells: number;
112
- /**
113
- * DTO.WALLET.PNL.AVERAGE_BUY_PRICE
114
- * @type {number}
115
- * @memberof WalletPnlDTO
116
- */
117
- averageBuyPriceInUsd: number;
118
- /**
119
- * DTO.WALLET.PNL.AVERAGE_SELL_PRICE
120
- * @type {number}
121
- * @memberof WalletPnlDTO
122
- */
123
- averageSellPriceInUsd: number;
124
- /**
125
- * DTO.WALLET.PNL.UNREALIZED_PROFIT
126
- * @type {number}
127
- * @memberof WalletPnlDTO
128
- */
129
- unrealizedProfitInUsd: number;
130
- /**
131
- * DTO.WALLET.PNL.UNREALIZED_PROFIT_RATIO
132
- * @type {number}
133
- * @memberof WalletPnlDTO
134
- */
135
- unrealizedProfitRatio: number;
136
- /**
137
- * DTO.WALLET.PNL.REALIZED_PROFIT
138
- * @type {number}
139
- * @memberof WalletPnlDTO
140
- */
141
- realizedProfitInUsd: number;
142
- /**
143
- * DTO.WALLET.PNL.REALIZED_PROFIT_RATIO
144
- * @type {number}
145
- * @memberof WalletPnlDTO
146
- */
147
- realizedProfitRatio: number;
148
- /**
149
- * DTO.WALLET.PNL.TOTAL_REALIZED_PROFIT
150
- * @type {number}
151
- * @memberof WalletPnlDTO
152
- */
153
- totalRealizedProfitInUsd: number;
154
- /**
155
- * DTO.WALLET.PNL.TOTAL_REALIZED_PROFIT_RATIO
156
- * @type {number}
157
- * @memberof WalletPnlDTO
158
- */
159
- totalRealizedProfitRatio: number;
160
- }
161
-
162
- /**
163
- * Check if a given object implements the WalletPnlDTO interface.
164
- */
165
- export function instanceOfWalletPnlDTO(value: object): value is WalletPnlDTO {
166
- if (!('id' in value) || value['id'] === undefined) return false;
167
- if (!('chain' in value) || value['chain'] === undefined) return false;
168
- if (!('walletAddress' in value) || value['walletAddress'] === undefined) return false;
169
- if (!('tokenAddress' in value) || value['tokenAddress'] === undefined) return false;
170
- if (!('tokenPriceInUsd' in value) || value['tokenPriceInUsd'] === undefined) return false;
171
- if (!('openTime' in value) || value['openTime'] === undefined) return false;
172
- if (!('closeTime' in value) || value['closeTime'] === undefined) return false;
173
- if (!('lastTime' in value) || value['lastTime'] === undefined) return false;
174
- if (!('balance' in value) || value['balance'] === undefined) return false;
175
- if (!('buyAmount' in value) || value['buyAmount'] === undefined) return false;
176
- if (!('buyAmountInUsd' in value) || value['buyAmountInUsd'] === undefined) return false;
177
- if (!('buys' in value) || value['buys'] === undefined) return false;
178
- if (!('sellAmount' in value) || value['sellAmount'] === undefined) return false;
179
- if (!('sellAmountInUsd' in value) || value['sellAmountInUsd'] === undefined) return false;
180
- if (!('sells' in value) || value['sells'] === undefined) return false;
181
- if (!('averageBuyPriceInUsd' in value) || value['averageBuyPriceInUsd'] === undefined) return false;
182
- if (!('averageSellPriceInUsd' in value) || value['averageSellPriceInUsd'] === undefined) return false;
183
- if (!('unrealizedProfitInUsd' in value) || value['unrealizedProfitInUsd'] === undefined) return false;
184
- if (!('unrealizedProfitRatio' in value) || value['unrealizedProfitRatio'] === undefined) return false;
185
- if (!('realizedProfitInUsd' in value) || value['realizedProfitInUsd'] === undefined) return false;
186
- if (!('realizedProfitRatio' in value) || value['realizedProfitRatio'] === undefined) return false;
187
- if (!('totalRealizedProfitInUsd' in value) || value['totalRealizedProfitInUsd'] === undefined) return false;
188
- if (!('totalRealizedProfitRatio' in value) || value['totalRealizedProfitRatio'] === undefined) return false;
189
- return true;
190
- }
191
-
192
- export function WalletPnlDTOFromJSON(json: any): WalletPnlDTO {
193
- return WalletPnlDTOFromJSONTyped(json, false);
194
- }
195
-
196
- export function WalletPnlDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): WalletPnlDTO {
197
- if (json == null) {
198
- return json;
199
- }
200
- return {
201
-
202
- 'id': json['id'],
203
- 'chain': json['chain'],
204
- 'walletAddress': json['walletAddress'],
205
- 'tokenAddress': json['tokenAddress'],
206
- 'tokenPriceInUsd': json['tokenPriceInUsd'],
207
- 'openTime': json['openTime'],
208
- 'closeTime': json['closeTime'],
209
- 'lastTime': json['lastTime'],
210
- 'balance': json['balance'],
211
- 'buyAmount': json['buyAmount'],
212
- 'buyAmountInUsd': json['buyAmountInUsd'],
213
- 'buys': json['buys'],
214
- 'sellAmount': json['sellAmount'],
215
- 'sellAmountInUsd': json['sellAmountInUsd'],
216
- 'sells': json['sells'],
217
- 'averageBuyPriceInUsd': json['averageBuyPriceInUsd'],
218
- 'averageSellPriceInUsd': json['averageSellPriceInUsd'],
219
- 'unrealizedProfitInUsd': json['unrealizedProfitInUsd'],
220
- 'unrealizedProfitRatio': json['unrealizedProfitRatio'],
221
- 'realizedProfitInUsd': json['realizedProfitInUsd'],
222
- 'realizedProfitRatio': json['realizedProfitRatio'],
223
- 'totalRealizedProfitInUsd': json['totalRealizedProfitInUsd'],
224
- 'totalRealizedProfitRatio': json['totalRealizedProfitRatio'],
225
- };
226
- }
227
-
228
- export function WalletPnlDTOToJSON(json: any): WalletPnlDTO {
229
- return WalletPnlDTOToJSONTyped(json, false);
230
- }
231
-
232
- export function WalletPnlDTOToJSONTyped(value?: WalletPnlDTO | null, ignoreDiscriminator: boolean = false): any {
233
- if (value == null) {
234
- return value;
235
- }
236
-
237
- return {
238
-
239
- 'id': value['id'],
240
- 'chain': value['chain'],
241
- 'walletAddress': value['walletAddress'],
242
- 'tokenAddress': value['tokenAddress'],
243
- 'tokenPriceInUsd': value['tokenPriceInUsd'],
244
- 'openTime': value['openTime'],
245
- 'closeTime': value['closeTime'],
246
- 'lastTime': value['lastTime'],
247
- 'balance': value['balance'],
248
- 'buyAmount': value['buyAmount'],
249
- 'buyAmountInUsd': value['buyAmountInUsd'],
250
- 'buys': value['buys'],
251
- 'sellAmount': value['sellAmount'],
252
- 'sellAmountInUsd': value['sellAmountInUsd'],
253
- 'sells': value['sells'],
254
- 'averageBuyPriceInUsd': value['averageBuyPriceInUsd'],
255
- 'averageSellPriceInUsd': value['averageSellPriceInUsd'],
256
- 'unrealizedProfitInUsd': value['unrealizedProfitInUsd'],
257
- 'unrealizedProfitRatio': value['unrealizedProfitRatio'],
258
- 'realizedProfitInUsd': value['realizedProfitInUsd'],
259
- 'realizedProfitRatio': value['realizedProfitRatio'],
260
- 'totalRealizedProfitInUsd': value['totalRealizedProfitInUsd'],
261
- 'totalRealizedProfitRatio': value['totalRealizedProfitRatio'],
262
- };
263
- }
264
-