@chainstream-io/sdk 0.2.7 → 0.2.9
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/{chainstream-kxqV2g1Q.d.cts → chainstream-B9uaC_fe.d.cts} +1055 -394
- package/dist/{chainstream-kxqV2g1Q.d.ts → chainstream-B9uaC_fe.d.ts} +1055 -394
- package/dist/chainstream.cjs +137 -76
- package/dist/chainstream.cjs.map +1 -1
- package/dist/chainstream.d.cts +1 -1
- package/dist/chainstream.d.ts +1 -1
- package/dist/chainstream.mjs +137 -76
- package/dist/chainstream.mjs.map +1 -1
- package/dist/index.cjs +303 -80
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +267 -78
- package/dist/index.mjs.map +1 -1
- package/dist/stream/index.cjs +45 -68
- package/dist/stream/index.cjs.map +1 -1
- package/dist/stream/index.d.cts +1 -1
- package/dist/stream/index.d.ts +1 -1
- package/dist/stream/index.mjs +45 -68
- package/dist/stream/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -49,6 +49,8 @@ __export(index_exports, {
|
|
|
49
49
|
FilterConditionField: () => FilterConditionField,
|
|
50
50
|
GetActivitiesDirection: () => GetActivitiesDirection,
|
|
51
51
|
GetActivitiesType: () => GetActivitiesType,
|
|
52
|
+
GetBalanceUpdatesDirection: () => GetBalanceUpdatesDirection,
|
|
53
|
+
GetDexpoolSnapshotsDirection: () => GetDexpoolSnapshotsDirection,
|
|
52
54
|
GetFinalStretchTokensSortBy: () => GetFinalStretchTokensSortBy,
|
|
53
55
|
GetFinalStretchTokensSortDirection: () => GetFinalStretchTokensSortDirection,
|
|
54
56
|
GetFinalStretchTokensTag: () => GetFinalStretchTokensTag,
|
|
@@ -61,9 +63,14 @@ __export(index_exports, {
|
|
|
61
63
|
GetMigratedTokensTag: () => GetMigratedTokensTag,
|
|
62
64
|
GetMintAndBurnDirection: () => GetMintAndBurnDirection,
|
|
63
65
|
GetMintAndBurnType: () => GetMintAndBurnType,
|
|
66
|
+
GetNetWorthDetailsDirection: () => GetNetWorthDetailsDirection,
|
|
67
|
+
GetNetWorthDirection: () => GetNetWorthDirection,
|
|
64
68
|
GetNewTokensSortBy: () => GetNewTokensSortBy,
|
|
65
69
|
GetNewTokensSortDirection: () => GetNewTokensSortDirection,
|
|
66
70
|
GetNewTokensTag: () => GetNewTokensTag,
|
|
71
|
+
GetPnlByTokenDirection: () => GetPnlByTokenDirection,
|
|
72
|
+
GetPnlByWalletDirection: () => GetPnlByWalletDirection,
|
|
73
|
+
GetPnlDetailsDirection: () => GetPnlDetailsDirection,
|
|
67
74
|
GetPoolsDirection: () => GetPoolsDirection,
|
|
68
75
|
GetPoolsSortBy: () => GetPoolsSortBy,
|
|
69
76
|
GetPoolsSortDirection: () => GetPoolsSortDirection,
|
|
@@ -72,14 +79,22 @@ __export(index_exports, {
|
|
|
72
79
|
GetStocksTokensSortBy: () => GetStocksTokensSortBy,
|
|
73
80
|
GetStocksTokensSortDirection: () => GetStocksTokensSortDirection,
|
|
74
81
|
GetStocksTokensTag: () => GetStocksTokensTag,
|
|
82
|
+
GetTokenLiquiditySnapshotsDirection: () => GetTokenLiquiditySnapshotsDirection,
|
|
83
|
+
GetTokenTransferTotalDirection: () => GetTokenTransferTotalDirection,
|
|
84
|
+
GetTokenTransfersDirection: () => GetTokenTransfersDirection,
|
|
85
|
+
GetTokensBalanceDirection: () => GetTokensBalanceDirection,
|
|
75
86
|
GetTokensSortBy: () => GetTokensSortBy,
|
|
76
87
|
GetTokensSortDirection: () => GetTokensSortDirection,
|
|
77
88
|
GetTopTradersDirection: () => GetTopTradersDirection,
|
|
78
89
|
GetTopTradersSortBy: () => GetTopTradersSortBy,
|
|
79
90
|
GetTopTradersSortType: () => GetTopTradersSortType,
|
|
80
91
|
GetTopTradersTimeFrame: () => GetTopTradersTimeFrame,
|
|
92
|
+
GetTraderGainersLosersDirection: () => GetTraderGainersLosersDirection,
|
|
93
|
+
GetTraderGainersLosersSortType: () => GetTraderGainersLosersSortType,
|
|
81
94
|
GetTradesDirection: () => GetTradesDirection,
|
|
82
95
|
GetTradesType: () => GetTradesType,
|
|
96
|
+
GetWalletTransferTotalDirection: () => GetWalletTransferTotalDirection,
|
|
97
|
+
GetWalletTransfersDirection: () => GetWalletTransfersDirection,
|
|
83
98
|
KYTRegisterTransferRequestDirection: () => KYTRegisterTransferRequestDirection,
|
|
84
99
|
KYTRegisterTransferRequestNetwork: () => KYTRegisterTransferRequestNetwork,
|
|
85
100
|
KYTRegisterWithdrawalRequestNetwork: () => KYTRegisterWithdrawalRequestNetwork,
|
|
@@ -90,11 +105,13 @@ __export(index_exports, {
|
|
|
90
105
|
ListTokenSortBy: () => ListTokenSortBy,
|
|
91
106
|
MoonshotCreateTokenInputDex: () => MoonshotCreateTokenInputDex,
|
|
92
107
|
MoonshotCreateTokenInputMigrationDex: () => MoonshotCreateTokenInputMigrationDex,
|
|
108
|
+
PnlResolution: () => PnlResolution,
|
|
93
109
|
PriceType: () => PriceType,
|
|
94
110
|
PumpCreateTokenInputDex: () => PumpCreateTokenInputDex,
|
|
95
111
|
PumpCreateTokenInputMigrationDex: () => PumpCreateTokenInputMigrationDex,
|
|
96
112
|
QuoteDex: () => QuoteDex,
|
|
97
113
|
Resolution: () => Resolution,
|
|
114
|
+
SearchDirection: () => SearchDirection,
|
|
98
115
|
SearchSort: () => SearchSort,
|
|
99
116
|
SearchSortBy: () => SearchSortBy,
|
|
100
117
|
SendTxInputSubmitType: () => SendTxInputSubmitType,
|
|
@@ -105,8 +122,13 @@ __export(index_exports, {
|
|
|
105
122
|
SwapRouteInputSwapMode: () => SwapRouteInputSwapMode,
|
|
106
123
|
TokenCreationDTOType: () => TokenCreationDTOType,
|
|
107
124
|
TokenTraderTag: () => TokenTraderTag,
|
|
125
|
+
TokenTransferItemDTOFlow: () => TokenTransferItemDTOFlow,
|
|
108
126
|
TradeType: () => TradeType,
|
|
127
|
+
TraderPnlResolution: () => TraderPnlResolution,
|
|
128
|
+
TransactionHistoryItemDTOMainAction: () => TransactionHistoryItemDTOMainAction,
|
|
129
|
+
TransactionHistoryItemDTOStatus: () => TransactionHistoryItemDTOStatus,
|
|
109
130
|
UpdateEndpointInputChannelsItem: () => UpdateEndpointInputChannelsItem,
|
|
131
|
+
WalletPnlSummaryDTOResolution: () => WalletPnlSummaryDTOResolution,
|
|
110
132
|
WsChannelType: () => WsChannelType,
|
|
111
133
|
WsDex: () => WsDex,
|
|
112
134
|
WsMetricType: () => WsMetricType,
|
|
@@ -122,7 +144,6 @@ __export(index_exports, {
|
|
|
122
144
|
getActivities: () => getActivities,
|
|
123
145
|
getAddressRisk: () => getAddressRisk,
|
|
124
146
|
getAvailableFields: () => getAvailableFields,
|
|
125
|
-
getBalance: () => getBalance,
|
|
126
147
|
getBalanceUpdates: () => getBalanceUpdates,
|
|
127
148
|
getCandles: () => getCandles,
|
|
128
149
|
getClaims: () => getClaims,
|
|
@@ -147,10 +168,16 @@ __export(index_exports, {
|
|
|
147
168
|
getMetadataMulti: () => getMetadataMulti,
|
|
148
169
|
getMigratedTokens: () => getMigratedTokens,
|
|
149
170
|
getMintAndBurn: () => getMintAndBurn,
|
|
171
|
+
getNetWorth: () => getNetWorth,
|
|
172
|
+
getNetWorthChart: () => getNetWorthChart,
|
|
173
|
+
getNetWorthDetails: () => getNetWorthDetails,
|
|
174
|
+
getNetWorthSummary: () => getNetWorthSummary,
|
|
150
175
|
getNewTokens: () => getNewTokens,
|
|
151
176
|
getPairCandles: () => getPairCandles,
|
|
152
177
|
getPnl: () => getPnl,
|
|
153
|
-
|
|
178
|
+
getPnlByToken: () => getPnlByToken,
|
|
179
|
+
getPnlByWallet: () => getPnlByWallet,
|
|
180
|
+
getPnlDetails: () => getPnlDetails,
|
|
154
181
|
getPoolCandles: () => getPoolCandles,
|
|
155
182
|
getPools: () => getPools,
|
|
156
183
|
getPriceByTime: () => getPriceByTime,
|
|
@@ -166,14 +193,21 @@ __export(index_exports, {
|
|
|
166
193
|
getToken: () => getToken,
|
|
167
194
|
getTokenLiquiditySnapshots: () => getTokenLiquiditySnapshots,
|
|
168
195
|
getTokenTraders: () => getTokenTraders,
|
|
196
|
+
getTokenTransferTotal: () => getTokenTransferTotal,
|
|
197
|
+
getTokenTransfers: () => getTokenTransfers,
|
|
169
198
|
getTokens: () => getTokens,
|
|
199
|
+
getTokensBalance: () => getTokensBalance,
|
|
170
200
|
getTopHolders: () => getTopHolders,
|
|
171
201
|
getTopTraders: () => getTopTraders,
|
|
202
|
+
getTraderGainersLosers: () => getTraderGainersLosers,
|
|
172
203
|
getTrades: () => getTrades,
|
|
173
204
|
getTransferAlerts: () => getTransferAlerts,
|
|
174
205
|
getTransferDirectExposure: () => getTransferDirectExposure,
|
|
175
206
|
getTransferNetworkIdentifications: () => getTransferNetworkIdentifications,
|
|
176
207
|
getTransferSummary: () => getTransferSummary,
|
|
208
|
+
getWalletFirstTx: () => getWalletFirstTx,
|
|
209
|
+
getWalletTransferTotal: () => getWalletTransferTotal,
|
|
210
|
+
getWalletTransfers: () => getWalletTransfers,
|
|
177
211
|
getWithdrawalAddressIdentifications: () => getWithdrawalAddressIdentifications,
|
|
178
212
|
getWithdrawalAlerts: () => getWithdrawalAlerts,
|
|
179
213
|
getWithdrawalDirectExposure: () => getWithdrawalDirectExposure,
|
|
@@ -837,6 +871,35 @@ var StreamApi = class {
|
|
|
837
871
|
"subscribePairCandles"
|
|
838
872
|
);
|
|
839
873
|
}
|
|
874
|
+
/**
|
|
875
|
+
* Parse token stat data for a specific time window
|
|
876
|
+
* @param data - Raw WebSocket data
|
|
877
|
+
* @param suffix - Time window suffix (e.g., "1m", "5m", "1h", "1W", "1M")
|
|
878
|
+
*/
|
|
879
|
+
parseTokenStatWindow(data, suffix) {
|
|
880
|
+
return {
|
|
881
|
+
[`buys${suffix}`]: data[`b${suffix}`],
|
|
882
|
+
[`sells${suffix}`]: data[`s${suffix}`],
|
|
883
|
+
[`buyers${suffix}`]: data[`be${suffix}`],
|
|
884
|
+
[`sellers${suffix}`]: data[`se${suffix}`],
|
|
885
|
+
[`buyVolumeInUsd${suffix}`]: this.formatScientificNotation(data[`bviu${suffix}`]),
|
|
886
|
+
[`sellVolumeInUsd${suffix}`]: this.formatScientificNotation(data[`sviu${suffix}`]),
|
|
887
|
+
[`price${suffix}`]: this.formatScientificNotation(data[`p${suffix}`]),
|
|
888
|
+
[`openInUsd${suffix}`]: this.formatScientificNotation(data[`oiu${suffix}`]),
|
|
889
|
+
[`closeInUsd${suffix}`]: this.formatScientificNotation(data[`ciu${suffix}`]),
|
|
890
|
+
[`volumeChangeRatio${suffix}`]: this.formatScientificNotation(data[`vpc${suffix}`]),
|
|
891
|
+
[`trades${suffix}`]: data[`tr${suffix}`],
|
|
892
|
+
[`dappProgramCount${suffix}`]: data[`dpc${suffix}`],
|
|
893
|
+
[`poolCount${suffix}`]: data[`pc${suffix}`],
|
|
894
|
+
[`liquidityInUsd${suffix}`]: this.formatScientificNotation(data[`liq${suffix}`]),
|
|
895
|
+
[`liquidityChangeRatio${suffix}`]: this.formatScientificNotation(data[`lpc${suffix}`])
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Subscribe to token trade statistics
|
|
900
|
+
* Channel: dex-token-stats:{chain}_{tokenAddress}
|
|
901
|
+
* Time windows: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 24h, 1W, 1M
|
|
902
|
+
*/
|
|
840
903
|
subscribeTokenStats({
|
|
841
904
|
chain,
|
|
842
905
|
tokenAddress,
|
|
@@ -844,76 +907,24 @@ var StreamApi = class {
|
|
|
844
907
|
filter
|
|
845
908
|
}) {
|
|
846
909
|
const channel = `dex-token-stats:${chain}_${tokenAddress}`;
|
|
910
|
+
const timeWindows = ["1m", "5m", "15m", "30m", "1h", "2h", "4h", "6h", "8h", "24h", "1W", "1M"];
|
|
847
911
|
return this.subscribe(
|
|
848
912
|
channel,
|
|
849
|
-
(data) =>
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
sellers5m: data.se5m,
|
|
865
|
-
buyVolumeInUsd5m: this.formatScientificNotation(data.bviu5m),
|
|
866
|
-
sellVolumeInUsd5m: this.formatScientificNotation(data.sviu5m),
|
|
867
|
-
price5m: this.formatScientificNotation(data.p5m),
|
|
868
|
-
openInUsd5m: this.formatScientificNotation(data.oiu5m),
|
|
869
|
-
closeInUsd5m: this.formatScientificNotation(data.ciu5m),
|
|
870
|
-
buys15m: data.b15m,
|
|
871
|
-
sells15m: data.s15m,
|
|
872
|
-
buyers15m: data.be15m,
|
|
873
|
-
sellers15m: data.se15m,
|
|
874
|
-
buyVolumeInUsd15m: this.formatScientificNotation(data.bviu15m),
|
|
875
|
-
sellVolumeInUsd15m: this.formatScientificNotation(data.sviu15m),
|
|
876
|
-
price15m: this.formatScientificNotation(data.p15m),
|
|
877
|
-
openInUsd15m: this.formatScientificNotation(data.oiu15m),
|
|
878
|
-
closeInUsd15m: this.formatScientificNotation(data.ciu15m),
|
|
879
|
-
buys30m: data.b30m,
|
|
880
|
-
sells30m: data.s30m,
|
|
881
|
-
buyers30m: data.be30m,
|
|
882
|
-
sellers30m: data.se30m,
|
|
883
|
-
buyVolumeInUsd30m: this.formatScientificNotation(data.bviu30m),
|
|
884
|
-
sellVolumeInUsd30m: this.formatScientificNotation(data.sviu30m),
|
|
885
|
-
price30m: this.formatScientificNotation(data.p30m),
|
|
886
|
-
openInUsd30m: this.formatScientificNotation(data.oiu30m),
|
|
887
|
-
closeInUsd30m: this.formatScientificNotation(data.ciu30m),
|
|
888
|
-
buys1h: data.b1h,
|
|
889
|
-
sells1h: data.s1h,
|
|
890
|
-
buyers1h: data.be1h,
|
|
891
|
-
sellers1h: data.se1h,
|
|
892
|
-
buyVolumeInUsd1h: this.formatScientificNotation(data.bviu1h),
|
|
893
|
-
sellVolumeInUsd1h: this.formatScientificNotation(data.sviu1h),
|
|
894
|
-
price1h: this.formatScientificNotation(data.p1h),
|
|
895
|
-
openInUsd1h: this.formatScientificNotation(data.oiu1h),
|
|
896
|
-
closeInUsd1h: this.formatScientificNotation(data.ciu1h),
|
|
897
|
-
buys4h: data.b4h,
|
|
898
|
-
sells4h: data.s4h,
|
|
899
|
-
buyers4h: data.be4h,
|
|
900
|
-
sellers4h: data.se4h,
|
|
901
|
-
buyVolumeInUsd4h: this.formatScientificNotation(data.bviu4h),
|
|
902
|
-
sellVolumeInUsd4h: this.formatScientificNotation(data.sviu4h),
|
|
903
|
-
price4h: this.formatScientificNotation(data.p4h),
|
|
904
|
-
openInUsd4h: this.formatScientificNotation(data.oiu4h),
|
|
905
|
-
closeInUsd4h: this.formatScientificNotation(data.ciu4h),
|
|
906
|
-
buys24h: data.b24h,
|
|
907
|
-
sells24h: data.s24h,
|
|
908
|
-
buyers24h: data.be24h,
|
|
909
|
-
sellers24h: data.se24h,
|
|
910
|
-
buyVolumeInUsd24h: this.formatScientificNotation(data.bviu24h),
|
|
911
|
-
sellVolumeInUsd24h: this.formatScientificNotation(data.sviu24h),
|
|
912
|
-
price24h: this.formatScientificNotation(data.p24h),
|
|
913
|
-
openInUsd24h: this.formatScientificNotation(data.oiu24h),
|
|
914
|
-
closeInUsd24h: this.formatScientificNotation(data.ciu24h),
|
|
915
|
-
price: this.formatScientificNotation(data.p)
|
|
916
|
-
}),
|
|
913
|
+
(data) => {
|
|
914
|
+
const windowData = timeWindows.reduce(
|
|
915
|
+
(acc, suffix) => ({
|
|
916
|
+
...acc,
|
|
917
|
+
...this.parseTokenStatWindow(data, suffix)
|
|
918
|
+
}),
|
|
919
|
+
{}
|
|
920
|
+
);
|
|
921
|
+
callback({
|
|
922
|
+
address: data.a,
|
|
923
|
+
timestamp: data.t,
|
|
924
|
+
price: this.formatScientificNotation(data.p),
|
|
925
|
+
...windowData
|
|
926
|
+
});
|
|
927
|
+
},
|
|
917
928
|
filter,
|
|
918
929
|
"subscribeTokenStats"
|
|
919
930
|
);
|
|
@@ -2164,6 +2175,8 @@ __export(token_exports, {
|
|
|
2164
2175
|
getToken: () => getToken,
|
|
2165
2176
|
getTokenLiquiditySnapshots: () => getTokenLiquiditySnapshots,
|
|
2166
2177
|
getTokenTraders: () => getTokenTraders,
|
|
2178
|
+
getTokenTransferTotal: () => getTokenTransferTotal,
|
|
2179
|
+
getTokenTransfers: () => getTokenTransfers,
|
|
2167
2180
|
getTokens: () => getTokens,
|
|
2168
2181
|
getTopHolders: () => getTopHolders,
|
|
2169
2182
|
listToken: () => listToken,
|
|
@@ -2319,12 +2332,25 @@ var getTokenLiquiditySnapshots = (chain, tokenAddress, params, options) => {
|
|
|
2319
2332
|
options
|
|
2320
2333
|
);
|
|
2321
2334
|
};
|
|
2335
|
+
var getTokenTransfers = (chain, tokenAddress, params, options) => {
|
|
2336
|
+
return chainstreamApiClient(
|
|
2337
|
+
{ url: `/v1/token/${chain}/${tokenAddress}/transfers`, method: "GET", params },
|
|
2338
|
+
options
|
|
2339
|
+
);
|
|
2340
|
+
};
|
|
2341
|
+
var getTokenTransferTotal = (chain, tokenAddress, params, options) => {
|
|
2342
|
+
return chainstreamApiClient(
|
|
2343
|
+
{ url: `/v1/token/${chain}/${tokenAddress}/transfer-total`, method: "GET", params },
|
|
2344
|
+
options
|
|
2345
|
+
);
|
|
2346
|
+
};
|
|
2322
2347
|
|
|
2323
2348
|
// src/openapi-client/generated/trade/trade.ts
|
|
2324
2349
|
var trade_exports = {};
|
|
2325
2350
|
__export(trade_exports, {
|
|
2326
2351
|
getActivities: () => getActivities,
|
|
2327
2352
|
getTopTraders: () => getTopTraders,
|
|
2353
|
+
getTraderGainersLosers: () => getTraderGainersLosers,
|
|
2328
2354
|
getTrades: () => getTrades
|
|
2329
2355
|
});
|
|
2330
2356
|
var getTrades = (chain, params, options) => {
|
|
@@ -2345,6 +2371,12 @@ var getTopTraders = (chain, params, options) => {
|
|
|
2345
2371
|
options
|
|
2346
2372
|
);
|
|
2347
2373
|
};
|
|
2374
|
+
var getTraderGainersLosers = (chain, params, options) => {
|
|
2375
|
+
return chainstreamApiClient(
|
|
2376
|
+
{ url: `/v1/trade/${chain}/trader-gainers-losers`, method: "GET", params },
|
|
2377
|
+
options
|
|
2378
|
+
);
|
|
2379
|
+
};
|
|
2348
2380
|
|
|
2349
2381
|
// src/openapi-client/generated/transaction/transaction.ts
|
|
2350
2382
|
var transaction_exports = {};
|
|
@@ -2386,26 +2418,35 @@ var getGasLimit = (chain, estimateGasLimitInput, options) => {
|
|
|
2386
2418
|
var wallet_exports = {};
|
|
2387
2419
|
__export(wallet_exports, {
|
|
2388
2420
|
calculatePnl: () => calculatePnl,
|
|
2389
|
-
getBalance: () => getBalance,
|
|
2390
2421
|
getBalanceUpdates: () => getBalanceUpdates,
|
|
2422
|
+
getNetWorth: () => getNetWorth,
|
|
2423
|
+
getNetWorthChart: () => getNetWorthChart,
|
|
2424
|
+
getNetWorthDetails: () => getNetWorthDetails,
|
|
2425
|
+
getNetWorthSummary: () => getNetWorthSummary,
|
|
2391
2426
|
getPnl: () => getPnl,
|
|
2392
|
-
|
|
2427
|
+
getPnlByToken: () => getPnlByToken,
|
|
2428
|
+
getPnlByWallet: () => getPnlByWallet,
|
|
2429
|
+
getPnlDetails: () => getPnlDetails,
|
|
2430
|
+
getTokensBalance: () => getTokensBalance,
|
|
2431
|
+
getWalletFirstTx: () => getWalletFirstTx,
|
|
2432
|
+
getWalletTransferTotal: () => getWalletTransferTotal,
|
|
2433
|
+
getWalletTransfers: () => getWalletTransfers
|
|
2393
2434
|
});
|
|
2394
|
-
var
|
|
2435
|
+
var getNetWorthSummary = (chain, params, options) => {
|
|
2395
2436
|
return chainstreamApiClient(
|
|
2396
|
-
{ url: `/v1/wallet/${chain}
|
|
2437
|
+
{ url: `/v1/wallet/${chain}/net-worth-summary`, method: "GET", params },
|
|
2397
2438
|
options
|
|
2398
2439
|
);
|
|
2399
2440
|
};
|
|
2400
|
-
var
|
|
2441
|
+
var getPnlByWallet = (chain, params, options) => {
|
|
2401
2442
|
return chainstreamApiClient(
|
|
2402
|
-
{ url: `/v1/wallet/${chain}
|
|
2443
|
+
{ url: `/v1/wallet/${chain}/pnl-by-wallet`, method: "GET", params },
|
|
2403
2444
|
options
|
|
2404
2445
|
);
|
|
2405
2446
|
};
|
|
2406
|
-
var
|
|
2447
|
+
var getWalletFirstTx = (chain, params, options) => {
|
|
2407
2448
|
return chainstreamApiClient(
|
|
2408
|
-
{ url: `/v1/wallet/${chain}
|
|
2449
|
+
{ url: `/v1/wallet/${chain}/first-tx`, method: "GET", params },
|
|
2409
2450
|
options
|
|
2410
2451
|
);
|
|
2411
2452
|
};
|
|
@@ -2420,6 +2461,60 @@ var calculatePnl = (chain, walletAddress, calculatePnlInput, options) => {
|
|
|
2420
2461
|
options
|
|
2421
2462
|
);
|
|
2422
2463
|
};
|
|
2464
|
+
var getNetWorth = (chain, walletAddress, params, options) => {
|
|
2465
|
+
return chainstreamApiClient(
|
|
2466
|
+
{ url: `/v1/wallet/${chain}/${walletAddress}/net-worth`, method: "GET", params },
|
|
2467
|
+
options
|
|
2468
|
+
);
|
|
2469
|
+
};
|
|
2470
|
+
var getTokensBalance = (chain, walletAddress, params, options) => {
|
|
2471
|
+
return chainstreamApiClient(
|
|
2472
|
+
{ url: `/v1/wallet/${chain}/${walletAddress}/tokens-balance`, method: "GET", params },
|
|
2473
|
+
options
|
|
2474
|
+
);
|
|
2475
|
+
};
|
|
2476
|
+
var getNetWorthChart = (chain, walletAddress, params, options) => {
|
|
2477
|
+
return chainstreamApiClient(
|
|
2478
|
+
{ url: `/v1/wallet/${chain}/${walletAddress}/net-worth-chart`, method: "GET", params },
|
|
2479
|
+
options
|
|
2480
|
+
);
|
|
2481
|
+
};
|
|
2482
|
+
var getNetWorthDetails = (chain, walletAddress, params, options) => {
|
|
2483
|
+
return chainstreamApiClient(
|
|
2484
|
+
{ url: `/v1/wallet/${chain}/${walletAddress}/net-worth-details`, method: "GET", params },
|
|
2485
|
+
options
|
|
2486
|
+
);
|
|
2487
|
+
};
|
|
2488
|
+
var getPnl = (chain, walletAddress, params, options) => {
|
|
2489
|
+
return chainstreamApiClient(
|
|
2490
|
+
{ url: `/v1/wallet/${chain}/${walletAddress}/pnl`, method: "GET", params },
|
|
2491
|
+
options
|
|
2492
|
+
);
|
|
2493
|
+
};
|
|
2494
|
+
var getPnlDetails = (chain, walletAddress, params, options) => {
|
|
2495
|
+
return chainstreamApiClient(
|
|
2496
|
+
{ url: `/v1/wallet/${chain}/${walletAddress}/pnl-details`, method: "GET", params },
|
|
2497
|
+
options
|
|
2498
|
+
);
|
|
2499
|
+
};
|
|
2500
|
+
var getPnlByToken = (chain, walletAddress, params, options) => {
|
|
2501
|
+
return chainstreamApiClient(
|
|
2502
|
+
{ url: `/v1/wallet/${chain}/${walletAddress}/pnl-by-token`, method: "GET", params },
|
|
2503
|
+
options
|
|
2504
|
+
);
|
|
2505
|
+
};
|
|
2506
|
+
var getWalletTransfers = (chain, walletAddress, params, options) => {
|
|
2507
|
+
return chainstreamApiClient(
|
|
2508
|
+
{ url: `/v1/wallet/${chain}/${walletAddress}/transfers`, method: "GET", params },
|
|
2509
|
+
options
|
|
2510
|
+
);
|
|
2511
|
+
};
|
|
2512
|
+
var getWalletTransferTotal = (chain, walletAddress, params, options) => {
|
|
2513
|
+
return chainstreamApiClient(
|
|
2514
|
+
{ url: `/v1/wallet/${chain}/${walletAddress}/transfer-total`, method: "GET", params },
|
|
2515
|
+
options
|
|
2516
|
+
);
|
|
2517
|
+
};
|
|
2423
2518
|
var getBalanceUpdates = (chain, walletAddress, params, options) => {
|
|
2424
2519
|
return chainstreamApiClient(
|
|
2425
2520
|
{ url: `/v1/wallet/${chain}/${walletAddress}/balance-updates`, method: "GET", params },
|
|
@@ -2601,6 +2696,11 @@ var PumpCreateTokenInputMigrationDex = {
|
|
|
2601
2696
|
RAYDIUM: "RAYDIUM",
|
|
2602
2697
|
METEORA: "METEORA"
|
|
2603
2698
|
};
|
|
2699
|
+
var TraderPnlResolution = {
|
|
2700
|
+
"1d": "1d",
|
|
2701
|
+
"7d": "7d",
|
|
2702
|
+
"30d": "30d"
|
|
2703
|
+
};
|
|
2604
2704
|
var DexPoolDTOType = {
|
|
2605
2705
|
NUMBER_0: 0,
|
|
2606
2706
|
NUMBER_1: 1,
|
|
@@ -2710,6 +2810,31 @@ var TokenTraderTag = {
|
|
|
2710
2810
|
bluechip: "bluechip",
|
|
2711
2811
|
smart: "smart"
|
|
2712
2812
|
};
|
|
2813
|
+
var TokenTransferItemDTOFlow = {
|
|
2814
|
+
in: "in",
|
|
2815
|
+
out: "out"
|
|
2816
|
+
};
|
|
2817
|
+
var PnlResolution = {
|
|
2818
|
+
"1d": "1d",
|
|
2819
|
+
"7d": "7d",
|
|
2820
|
+
"30d": "30d",
|
|
2821
|
+
all: "all"
|
|
2822
|
+
};
|
|
2823
|
+
var WalletPnlSummaryDTOResolution = {
|
|
2824
|
+
"1d": "1d",
|
|
2825
|
+
"7d": "7d",
|
|
2826
|
+
"30d": "30d",
|
|
2827
|
+
all: "all"
|
|
2828
|
+
};
|
|
2829
|
+
var TransactionHistoryItemDTOStatus = {
|
|
2830
|
+
UNKNOWN: "UNKNOWN",
|
|
2831
|
+
SUCCEEDED: "SUCCEEDED",
|
|
2832
|
+
FAILED: "FAILED"
|
|
2833
|
+
};
|
|
2834
|
+
var TransactionHistoryItemDTOMainAction = {
|
|
2835
|
+
send: "send",
|
|
2836
|
+
receive: "receive"
|
|
2837
|
+
};
|
|
2713
2838
|
var BalanceTokenType = {
|
|
2714
2839
|
SOL: "SOL",
|
|
2715
2840
|
SPL: "SPL"
|
|
@@ -2812,6 +2937,18 @@ var GetTopTradersSortBy = {
|
|
|
2812
2937
|
tradeAmount: "tradeAmount",
|
|
2813
2938
|
tradeCount: "tradeCount"
|
|
2814
2939
|
};
|
|
2940
|
+
var GetTraderGainersLosersDirection = {
|
|
2941
|
+
next: "next",
|
|
2942
|
+
prev: "prev"
|
|
2943
|
+
};
|
|
2944
|
+
var GetTraderGainersLosersSortType = {
|
|
2945
|
+
desc: "desc",
|
|
2946
|
+
asc: "asc"
|
|
2947
|
+
};
|
|
2948
|
+
var SearchDirection = {
|
|
2949
|
+
next: "next",
|
|
2950
|
+
prev: "prev"
|
|
2951
|
+
};
|
|
2815
2952
|
var SearchSort = {
|
|
2816
2953
|
asc: "asc",
|
|
2817
2954
|
desc: "desc"
|
|
@@ -2979,6 +3116,22 @@ var ListTokenSortBy = {
|
|
|
2979
3116
|
m1BuyVolumeInUsd: "m1BuyVolumeInUsd",
|
|
2980
3117
|
m1SellVolumeInUsd: "m1SellVolumeInUsd"
|
|
2981
3118
|
};
|
|
3119
|
+
var GetTokenLiquiditySnapshotsDirection = {
|
|
3120
|
+
next: "next",
|
|
3121
|
+
prev: "prev"
|
|
3122
|
+
};
|
|
3123
|
+
var GetTokenTransfersDirection = {
|
|
3124
|
+
next: "next",
|
|
3125
|
+
prev: "prev"
|
|
3126
|
+
};
|
|
3127
|
+
var GetTokenTransferTotalDirection = {
|
|
3128
|
+
next: "next",
|
|
3129
|
+
prev: "prev"
|
|
3130
|
+
};
|
|
3131
|
+
var GetDexpoolSnapshotsDirection = {
|
|
3132
|
+
next: "next",
|
|
3133
|
+
prev: "prev"
|
|
3134
|
+
};
|
|
2982
3135
|
var GetHotTokensSortBy = {
|
|
2983
3136
|
marketDatapriceInUsd: "marketData.priceInUsd",
|
|
2984
3137
|
statspriceChangeRatioInUsd1m: "stats.priceChangeRatioInUsd1m",
|
|
@@ -3274,6 +3427,42 @@ var GetMigratedTokensTag = {
|
|
|
3274
3427
|
bonk_fun: "bonk_fun",
|
|
3275
3428
|
moonit_fun: "moonit_fun"
|
|
3276
3429
|
};
|
|
3430
|
+
var GetPnlByWalletDirection = {
|
|
3431
|
+
next: "next",
|
|
3432
|
+
prev: "prev"
|
|
3433
|
+
};
|
|
3434
|
+
var GetNetWorthDirection = {
|
|
3435
|
+
next: "next",
|
|
3436
|
+
prev: "prev"
|
|
3437
|
+
};
|
|
3438
|
+
var GetTokensBalanceDirection = {
|
|
3439
|
+
next: "next",
|
|
3440
|
+
prev: "prev"
|
|
3441
|
+
};
|
|
3442
|
+
var GetNetWorthDetailsDirection = {
|
|
3443
|
+
next: "next",
|
|
3444
|
+
prev: "prev"
|
|
3445
|
+
};
|
|
3446
|
+
var GetPnlDetailsDirection = {
|
|
3447
|
+
next: "next",
|
|
3448
|
+
prev: "prev"
|
|
3449
|
+
};
|
|
3450
|
+
var GetPnlByTokenDirection = {
|
|
3451
|
+
next: "next",
|
|
3452
|
+
prev: "prev"
|
|
3453
|
+
};
|
|
3454
|
+
var GetWalletTransfersDirection = {
|
|
3455
|
+
next: "next",
|
|
3456
|
+
prev: "prev"
|
|
3457
|
+
};
|
|
3458
|
+
var GetWalletTransferTotalDirection = {
|
|
3459
|
+
next: "next",
|
|
3460
|
+
prev: "prev"
|
|
3461
|
+
};
|
|
3462
|
+
var GetBalanceUpdatesDirection = {
|
|
3463
|
+
next: "next",
|
|
3464
|
+
prev: "prev"
|
|
3465
|
+
};
|
|
3277
3466
|
var GetRedpacketsChain = {
|
|
3278
3467
|
sol: "sol",
|
|
3279
3468
|
bsc: "bsc",
|
|
@@ -3302,6 +3491,8 @@ var ListEndpointsOrder = {
|
|
|
3302
3491
|
FilterConditionField,
|
|
3303
3492
|
GetActivitiesDirection,
|
|
3304
3493
|
GetActivitiesType,
|
|
3494
|
+
GetBalanceUpdatesDirection,
|
|
3495
|
+
GetDexpoolSnapshotsDirection,
|
|
3305
3496
|
GetFinalStretchTokensSortBy,
|
|
3306
3497
|
GetFinalStretchTokensSortDirection,
|
|
3307
3498
|
GetFinalStretchTokensTag,
|
|
@@ -3314,9 +3505,14 @@ var ListEndpointsOrder = {
|
|
|
3314
3505
|
GetMigratedTokensTag,
|
|
3315
3506
|
GetMintAndBurnDirection,
|
|
3316
3507
|
GetMintAndBurnType,
|
|
3508
|
+
GetNetWorthDetailsDirection,
|
|
3509
|
+
GetNetWorthDirection,
|
|
3317
3510
|
GetNewTokensSortBy,
|
|
3318
3511
|
GetNewTokensSortDirection,
|
|
3319
3512
|
GetNewTokensTag,
|
|
3513
|
+
GetPnlByTokenDirection,
|
|
3514
|
+
GetPnlByWalletDirection,
|
|
3515
|
+
GetPnlDetailsDirection,
|
|
3320
3516
|
GetPoolsDirection,
|
|
3321
3517
|
GetPoolsSortBy,
|
|
3322
3518
|
GetPoolsSortDirection,
|
|
@@ -3325,14 +3521,22 @@ var ListEndpointsOrder = {
|
|
|
3325
3521
|
GetStocksTokensSortBy,
|
|
3326
3522
|
GetStocksTokensSortDirection,
|
|
3327
3523
|
GetStocksTokensTag,
|
|
3524
|
+
GetTokenLiquiditySnapshotsDirection,
|
|
3525
|
+
GetTokenTransferTotalDirection,
|
|
3526
|
+
GetTokenTransfersDirection,
|
|
3527
|
+
GetTokensBalanceDirection,
|
|
3328
3528
|
GetTokensSortBy,
|
|
3329
3529
|
GetTokensSortDirection,
|
|
3330
3530
|
GetTopTradersDirection,
|
|
3331
3531
|
GetTopTradersSortBy,
|
|
3332
3532
|
GetTopTradersSortType,
|
|
3333
3533
|
GetTopTradersTimeFrame,
|
|
3534
|
+
GetTraderGainersLosersDirection,
|
|
3535
|
+
GetTraderGainersLosersSortType,
|
|
3334
3536
|
GetTradesDirection,
|
|
3335
3537
|
GetTradesType,
|
|
3538
|
+
GetWalletTransferTotalDirection,
|
|
3539
|
+
GetWalletTransfersDirection,
|
|
3336
3540
|
KYTRegisterTransferRequestDirection,
|
|
3337
3541
|
KYTRegisterTransferRequestNetwork,
|
|
3338
3542
|
KYTRegisterWithdrawalRequestNetwork,
|
|
@@ -3343,11 +3547,13 @@ var ListEndpointsOrder = {
|
|
|
3343
3547
|
ListTokenSortBy,
|
|
3344
3548
|
MoonshotCreateTokenInputDex,
|
|
3345
3549
|
MoonshotCreateTokenInputMigrationDex,
|
|
3550
|
+
PnlResolution,
|
|
3346
3551
|
PriceType,
|
|
3347
3552
|
PumpCreateTokenInputDex,
|
|
3348
3553
|
PumpCreateTokenInputMigrationDex,
|
|
3349
3554
|
QuoteDex,
|
|
3350
3555
|
Resolution,
|
|
3556
|
+
SearchDirection,
|
|
3351
3557
|
SearchSort,
|
|
3352
3558
|
SearchSortBy,
|
|
3353
3559
|
SendTxInputSubmitType,
|
|
@@ -3358,8 +3564,13 @@ var ListEndpointsOrder = {
|
|
|
3358
3564
|
SwapRouteInputSwapMode,
|
|
3359
3565
|
TokenCreationDTOType,
|
|
3360
3566
|
TokenTraderTag,
|
|
3567
|
+
TokenTransferItemDTOFlow,
|
|
3361
3568
|
TradeType,
|
|
3569
|
+
TraderPnlResolution,
|
|
3570
|
+
TransactionHistoryItemDTOMainAction,
|
|
3571
|
+
TransactionHistoryItemDTOStatus,
|
|
3362
3572
|
UpdateEndpointInputChannelsItem,
|
|
3573
|
+
WalletPnlSummaryDTOResolution,
|
|
3363
3574
|
WsChannelType,
|
|
3364
3575
|
WsDex,
|
|
3365
3576
|
WsMetricType,
|
|
@@ -3375,7 +3586,6 @@ var ListEndpointsOrder = {
|
|
|
3375
3586
|
getActivities,
|
|
3376
3587
|
getAddressRisk,
|
|
3377
3588
|
getAvailableFields,
|
|
3378
|
-
getBalance,
|
|
3379
3589
|
getBalanceUpdates,
|
|
3380
3590
|
getCandles,
|
|
3381
3591
|
getClaims,
|
|
@@ -3400,10 +3610,16 @@ var ListEndpointsOrder = {
|
|
|
3400
3610
|
getMetadataMulti,
|
|
3401
3611
|
getMigratedTokens,
|
|
3402
3612
|
getMintAndBurn,
|
|
3613
|
+
getNetWorth,
|
|
3614
|
+
getNetWorthChart,
|
|
3615
|
+
getNetWorthDetails,
|
|
3616
|
+
getNetWorthSummary,
|
|
3403
3617
|
getNewTokens,
|
|
3404
3618
|
getPairCandles,
|
|
3405
3619
|
getPnl,
|
|
3406
|
-
|
|
3620
|
+
getPnlByToken,
|
|
3621
|
+
getPnlByWallet,
|
|
3622
|
+
getPnlDetails,
|
|
3407
3623
|
getPoolCandles,
|
|
3408
3624
|
getPools,
|
|
3409
3625
|
getPriceByTime,
|
|
@@ -3419,14 +3635,21 @@ var ListEndpointsOrder = {
|
|
|
3419
3635
|
getToken,
|
|
3420
3636
|
getTokenLiquiditySnapshots,
|
|
3421
3637
|
getTokenTraders,
|
|
3638
|
+
getTokenTransferTotal,
|
|
3639
|
+
getTokenTransfers,
|
|
3422
3640
|
getTokens,
|
|
3641
|
+
getTokensBalance,
|
|
3423
3642
|
getTopHolders,
|
|
3424
3643
|
getTopTraders,
|
|
3644
|
+
getTraderGainersLosers,
|
|
3425
3645
|
getTrades,
|
|
3426
3646
|
getTransferAlerts,
|
|
3427
3647
|
getTransferDirectExposure,
|
|
3428
3648
|
getTransferNetworkIdentifications,
|
|
3429
3649
|
getTransferSummary,
|
|
3650
|
+
getWalletFirstTx,
|
|
3651
|
+
getWalletTransferTotal,
|
|
3652
|
+
getWalletTransfers,
|
|
3430
3653
|
getWithdrawalAddressIdentifications,
|
|
3431
3654
|
getWithdrawalAlerts,
|
|
3432
3655
|
getWithdrawalDirectExposure,
|