@codex-data/sdk 1.0.23 → 1.0.25
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/resources/graphql.d.ts +33 -5
- package/dist/resources/graphql.d.ts.map +1 -1
- package/dist/resources/graphql.js +2 -0
- package/dist/resources/graphql.js.map +1 -1
- package/dist/sdk/Mutation.d.ts +2 -2
- package/dist/sdk/Mutation.d.ts.map +1 -1
- package/dist/sdk/Mutation.js +2 -2
- package/dist/sdk/Mutation.js.map +1 -1
- package/dist/sdk/Query.d.ts +48 -48
- package/dist/sdk/Query.d.ts.map +1 -1
- package/dist/sdk/Query.js +48 -48
- package/dist/sdk/Query.js.map +1 -1
- package/dist/sdk/Subscribe.d.ts +17 -17
- package/dist/sdk/Subscribe.d.ts.map +1 -1
- package/dist/sdk/Subscribe.js +82 -82
- package/dist/sdk/Subscribe.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +33 -5
- package/dist/sdk/generated/graphql.d.ts.map +1 -1
- package/dist/sdk/generated/graphql.js +2 -0
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -0
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/index.test.js +18 -0
- package/dist/sdk/index.test.js.map +1 -1
- package/package.json +1 -1
- package/src/resources/graphql.schema.json +171 -5
- package/src/resources/graphql.ts +33 -5
- package/src/resources/schema.graphql +33 -5
- package/src/sdk/Mutation.ts +5 -5
- package/src/sdk/Query.ts +103 -103
- package/src/sdk/Subscribe.ts +165 -165
- package/src/sdk/generated/graphql.ts +33 -5
- package/src/sdk/index.test.ts +25 -0
- package/src/sdk/index.ts +4 -0
package/src/sdk/Subscribe.ts
CHANGED
|
@@ -53,58 +53,128 @@ import { Codex } from "./index";
|
|
|
53
53
|
|
|
54
54
|
export class Subscribe {
|
|
55
55
|
constructor(private sdk: Codex) {}
|
|
56
|
-
|
|
57
|
-
vars:
|
|
58
|
-
sink: Sink<ExecutionResult<
|
|
56
|
+
onDetailedStatsUpdated = (
|
|
57
|
+
vars: OnDetailedStatsUpdatedSubscriptionVariables,
|
|
58
|
+
sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
|
|
59
59
|
) =>
|
|
60
60
|
this.sdk.subscribe(
|
|
61
|
-
`subscription
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
`subscription OnDetailedStatsUpdated($pairId: String, $tokenOfInterest: TokenOfInterest) {
|
|
62
|
+
onDetailedStatsUpdated (pairId: $pairId, tokenOfInterest: $tokenOfInterest) {
|
|
63
|
+
bucketCount, pairId, queryTimestamp, statsType, stats_day1 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour1 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour4 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour12 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_min5 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, tokenOfInterest
|
|
64
64
|
}
|
|
65
65
|
}`,
|
|
66
66
|
vars,
|
|
67
67
|
sink,
|
|
68
68
|
);
|
|
69
|
-
|
|
70
|
-
vars:
|
|
71
|
-
sink: Sink<ExecutionResult<
|
|
69
|
+
onUnconfirmedEventsCreated = (
|
|
70
|
+
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
71
|
+
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
72
72
|
) =>
|
|
73
73
|
this.sdk.subscribe(
|
|
74
|
-
`subscription
|
|
75
|
-
|
|
76
|
-
address, events {
|
|
74
|
+
`subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
|
|
75
|
+
onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
|
|
76
|
+
address, events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, id, networkId, quoteToken
|
|
77
77
|
}
|
|
78
78
|
}`,
|
|
79
79
|
vars,
|
|
80
80
|
sink,
|
|
81
81
|
);
|
|
82
|
-
|
|
83
|
-
vars:
|
|
84
|
-
sink: Sink<ExecutionResult<
|
|
82
|
+
onBalanceUpdated = (
|
|
83
|
+
vars: OnBalanceUpdatedSubscriptionVariables,
|
|
84
|
+
sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
|
|
85
85
|
) =>
|
|
86
86
|
this.sdk.subscribe(
|
|
87
|
-
`subscription
|
|
88
|
-
|
|
89
|
-
address,
|
|
87
|
+
`subscription OnBalanceUpdated($walletAddress: String!) {
|
|
88
|
+
onBalanceUpdated (walletAddress: $walletAddress) {
|
|
89
|
+
address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, tokenAddress, tokenId, tokenPriceUsd, walletId
|
|
90
90
|
}
|
|
91
91
|
}`,
|
|
92
92
|
vars,
|
|
93
93
|
sink,
|
|
94
94
|
);
|
|
95
|
-
|
|
96
|
-
vars:
|
|
97
|
-
sink: Sink<ExecutionResult<
|
|
95
|
+
onHoldersUpdated = (
|
|
96
|
+
vars: OnHoldersUpdatedSubscriptionVariables,
|
|
97
|
+
sink: Sink<ExecutionResult<OnHoldersUpdatedSubscription>>,
|
|
98
98
|
) =>
|
|
99
99
|
this.sdk.subscribe(
|
|
100
|
-
`subscription
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
`subscription OnHoldersUpdated($tokenId: String!) {
|
|
101
|
+
onHoldersUpdated (tokenId: $tokenId) {
|
|
102
|
+
balances { address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, tokenAddress, tokenId, tokenPriceUsd, walletId }, holders, networkId, tokenAddress, tokenId
|
|
103
103
|
}
|
|
104
104
|
}`,
|
|
105
105
|
vars,
|
|
106
106
|
sink,
|
|
107
107
|
);
|
|
108
|
+
onPricesUpdated = (
|
|
109
|
+
vars: OnPricesUpdatedSubscriptionVariables,
|
|
110
|
+
sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
|
|
111
|
+
) =>
|
|
112
|
+
this.sdk.subscribe(
|
|
113
|
+
`subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
|
|
114
|
+
onPricesUpdated (input: $input) {
|
|
115
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
116
|
+
}
|
|
117
|
+
}`,
|
|
118
|
+
vars,
|
|
119
|
+
sink,
|
|
120
|
+
);
|
|
121
|
+
onLatestTokens = (
|
|
122
|
+
vars: OnLatestTokensSubscriptionVariables,
|
|
123
|
+
sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
|
|
124
|
+
) =>
|
|
125
|
+
this.sdk.subscribe(
|
|
126
|
+
`subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
|
|
127
|
+
onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
|
|
128
|
+
blockHash, blockNumber, creatorAddress, creatorBalance, decimals, id, networkId, simulationResults { buyGasUsed, buySuccess, buyTax, canRenounceOwnership, canTransferOwnership, isOwnerRenounced, maxBuyAmount, maxSellAmount, openTradingCall, sellGasUsed, sellSuccess, sellTax }, timeCreated, tokenAddress, tokenName, tokenSymbol, totalSupply, traceIndex, transactionHash, transactionIndex
|
|
129
|
+
}
|
|
130
|
+
}`,
|
|
131
|
+
vars,
|
|
132
|
+
sink,
|
|
133
|
+
);
|
|
134
|
+
onTokenEventsCreated = (
|
|
135
|
+
vars: OnTokenEventsCreatedSubscriptionVariables,
|
|
136
|
+
sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
|
|
137
|
+
) =>
|
|
138
|
+
this.sdk.subscribe(
|
|
139
|
+
`subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
|
|
140
|
+
onTokenEventsCreated (input: $input) {
|
|
141
|
+
events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, id
|
|
142
|
+
}
|
|
143
|
+
}`,
|
|
144
|
+
vars,
|
|
145
|
+
sink,
|
|
146
|
+
);
|
|
147
|
+
onEventLabelCreated = (
|
|
148
|
+
vars: OnEventLabelCreatedSubscriptionVariables,
|
|
149
|
+
sink: Sink<ExecutionResult<OnEventLabelCreatedSubscription>>,
|
|
150
|
+
) =>
|
|
151
|
+
this.sdk.subscribe(
|
|
152
|
+
`subscription OnEventLabelCreated($id: String) {
|
|
153
|
+
onEventLabelCreated(id: $id) {
|
|
154
|
+
data {
|
|
155
|
+
... on FrontRunLabelData {
|
|
156
|
+
index
|
|
157
|
+
token0DrainedAmount
|
|
158
|
+
token1DrainedAmount
|
|
159
|
+
}
|
|
160
|
+
... on SandwichedLabelData {
|
|
161
|
+
token0DrainedAmountSandwich: token0DrainedAmount
|
|
162
|
+
token1DrainedAmountSandwich: token1DrainedAmount
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
id
|
|
166
|
+
label
|
|
167
|
+
logIndex
|
|
168
|
+
networkId
|
|
169
|
+
timestamp
|
|
170
|
+
transactionHash
|
|
171
|
+
transactionIndex
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
`,
|
|
175
|
+
vars,
|
|
176
|
+
sink,
|
|
177
|
+
);
|
|
108
178
|
onLaunchpadTokenEventBatch = (
|
|
109
179
|
vars: OnLaunchpadTokenEventBatchSubscriptionVariables,
|
|
110
180
|
sink: Sink<ExecutionResult<OnLaunchpadTokenEventBatchSubscription>>,
|
|
@@ -210,40 +280,40 @@ export class Subscribe {
|
|
|
210
280
|
vars,
|
|
211
281
|
sink,
|
|
212
282
|
);
|
|
213
|
-
|
|
214
|
-
vars:
|
|
215
|
-
sink: Sink<ExecutionResult<
|
|
283
|
+
onPriceUpdated = (
|
|
284
|
+
vars: OnPriceUpdatedSubscriptionVariables,
|
|
285
|
+
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
|
|
216
286
|
) =>
|
|
217
287
|
this.sdk.subscribe(
|
|
218
|
-
`subscription
|
|
219
|
-
|
|
288
|
+
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
289
|
+
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
220
290
|
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
221
291
|
}
|
|
222
292
|
}`,
|
|
223
293
|
vars,
|
|
224
294
|
sink,
|
|
225
295
|
);
|
|
226
|
-
|
|
227
|
-
vars:
|
|
228
|
-
sink: Sink<ExecutionResult<
|
|
296
|
+
onUnconfirmedBarsUpdated = (
|
|
297
|
+
vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
|
|
298
|
+
sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
|
|
229
299
|
) =>
|
|
230
300
|
this.sdk.subscribe(
|
|
231
|
-
`subscription
|
|
232
|
-
|
|
233
|
-
|
|
301
|
+
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
302
|
+
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
303
|
+
aggregates { r1 { c, h, l, o, t, v, volume }, r1S { c, h, l, o, t, v, volume }, r5 { c, h, l, o, t, v, volume }, r5S { c, h, l, o, t, v, volume }, r15 { c, h, l, o, t, v, volume }, r15S { c, h, l, o, t, v, volume } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, timestamp
|
|
234
304
|
}
|
|
235
305
|
}`,
|
|
236
306
|
vars,
|
|
237
307
|
sink,
|
|
238
308
|
);
|
|
239
|
-
|
|
240
|
-
vars:
|
|
241
|
-
sink: Sink<ExecutionResult<
|
|
309
|
+
onLaunchpadTokenEvent = (
|
|
310
|
+
vars: OnLaunchpadTokenEventSubscriptionVariables,
|
|
311
|
+
sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
|
|
242
312
|
) =>
|
|
243
313
|
this.sdk.subscribe(
|
|
244
|
-
`subscription
|
|
245
|
-
|
|
246
|
-
address,
|
|
314
|
+
`subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
|
|
315
|
+
onLaunchpadTokenEvent (input: $input) {
|
|
316
|
+
address, buyCount1, eventType, holders, launchpadName, liquidity, marketCap, networkId, price, protocol, sellCount1, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, transactions1, volume1
|
|
247
317
|
}
|
|
248
318
|
}`,
|
|
249
319
|
vars,
|
|
@@ -262,40 +332,40 @@ export class Subscribe {
|
|
|
262
332
|
vars,
|
|
263
333
|
sink,
|
|
264
334
|
);
|
|
265
|
-
|
|
266
|
-
vars:
|
|
267
|
-
sink: Sink<ExecutionResult<
|
|
335
|
+
onNftPoolEventsCreated = (
|
|
336
|
+
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
337
|
+
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
268
338
|
) =>
|
|
269
339
|
this.sdk.subscribe(
|
|
270
|
-
`subscription
|
|
271
|
-
|
|
272
|
-
|
|
340
|
+
`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
341
|
+
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
342
|
+
collectionAddress, events { blockHash, blockNumber, collectionAddress, collectionId, data { ... on NewPoolEventData { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftTokenBalance, ownerAddress, poolAddress, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NewPoolEventDataV2 { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenIds, nftTokenQuantities, ownerAddress, poolAddress, poolNftType, propertyChecker, royalties { percent, recipient }, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NftPoolAssetRecipientUpdateEventData { newAssetRecipient, type }, ... on NftPoolDeltaUpdateEventData { newDelta, type }, ... on NftPoolFeeUpdateEventData { nbtRatio, newFeeT, type, usdRatio }, ... on NftPoolNftDepositEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftDepositEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolOwnershipTransferredEventDataV2 { newOwner, type }, ... on NftPoolSpotPriceUpdateEventData { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolSpotPriceUpdateEventDataV2 { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolTokenDepositEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenDepositEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on SwapNftInPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftInPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio } }, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
|
|
273
343
|
}
|
|
274
344
|
}`,
|
|
275
345
|
vars,
|
|
276
346
|
sink,
|
|
277
347
|
);
|
|
278
|
-
|
|
279
|
-
vars:
|
|
280
|
-
sink: Sink<ExecutionResult<
|
|
348
|
+
onEventsCreatedByMaker = (
|
|
349
|
+
vars: OnEventsCreatedByMakerSubscriptionVariables,
|
|
350
|
+
sink: Sink<ExecutionResult<OnEventsCreatedByMakerSubscription>>,
|
|
281
351
|
) =>
|
|
282
352
|
this.sdk.subscribe(
|
|
283
|
-
`subscription
|
|
284
|
-
|
|
285
|
-
|
|
353
|
+
`subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
|
|
354
|
+
onEventsCreatedByMaker (input: $input) {
|
|
355
|
+
events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, makerAddress
|
|
286
356
|
}
|
|
287
357
|
}`,
|
|
288
358
|
vars,
|
|
289
359
|
sink,
|
|
290
360
|
);
|
|
291
|
-
|
|
292
|
-
vars:
|
|
293
|
-
sink: Sink<ExecutionResult<
|
|
361
|
+
onTokenBarsUpdated = (
|
|
362
|
+
vars: OnTokenBarsUpdatedSubscriptionVariables,
|
|
363
|
+
sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
|
|
294
364
|
) =>
|
|
295
365
|
this.sdk.subscribe(
|
|
296
|
-
`subscription
|
|
297
|
-
|
|
298
|
-
|
|
366
|
+
`subscription OnTokenBarsUpdated($networkId: Int, $tokenId: String) {
|
|
367
|
+
onTokenBarsUpdated (networkId: $networkId, tokenId: $tokenId) {
|
|
368
|
+
aggregates { r1 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r7D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r60 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r240 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r720 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, statsType, timestamp, tokenAddress, tokenId
|
|
299
369
|
}
|
|
300
370
|
}`,
|
|
301
371
|
vars,
|
|
@@ -314,149 +384,79 @@ export class Subscribe {
|
|
|
314
384
|
vars,
|
|
315
385
|
sink,
|
|
316
386
|
);
|
|
317
|
-
|
|
318
|
-
vars:
|
|
319
|
-
sink: Sink<ExecutionResult<
|
|
320
|
-
) =>
|
|
321
|
-
this.sdk.subscribe(
|
|
322
|
-
`subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
|
|
323
|
-
onTokenEventsCreated (input: $input) {
|
|
324
|
-
events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, id
|
|
325
|
-
}
|
|
326
|
-
}`,
|
|
327
|
-
vars,
|
|
328
|
-
sink,
|
|
329
|
-
);
|
|
330
|
-
onEventLabelCreated = (
|
|
331
|
-
vars: OnEventLabelCreatedSubscriptionVariables,
|
|
332
|
-
sink: Sink<ExecutionResult<OnEventLabelCreatedSubscription>>,
|
|
333
|
-
) =>
|
|
334
|
-
this.sdk.subscribe(
|
|
335
|
-
`subscription OnEventLabelCreated($id: String) {
|
|
336
|
-
onEventLabelCreated(id: $id) {
|
|
337
|
-
data {
|
|
338
|
-
... on FrontRunLabelData {
|
|
339
|
-
index
|
|
340
|
-
token0DrainedAmount
|
|
341
|
-
token1DrainedAmount
|
|
342
|
-
}
|
|
343
|
-
... on SandwichedLabelData {
|
|
344
|
-
token0DrainedAmountSandwich: token0DrainedAmount
|
|
345
|
-
token1DrainedAmountSandwich: token1DrainedAmount
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
id
|
|
349
|
-
label
|
|
350
|
-
logIndex
|
|
351
|
-
networkId
|
|
352
|
-
timestamp
|
|
353
|
-
transactionHash
|
|
354
|
-
transactionIndex
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
`,
|
|
358
|
-
vars,
|
|
359
|
-
sink,
|
|
360
|
-
);
|
|
361
|
-
onEventsCreatedByMaker = (
|
|
362
|
-
vars: OnEventsCreatedByMakerSubscriptionVariables,
|
|
363
|
-
sink: Sink<ExecutionResult<OnEventsCreatedByMakerSubscription>>,
|
|
364
|
-
) =>
|
|
365
|
-
this.sdk.subscribe(
|
|
366
|
-
`subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
|
|
367
|
-
onEventsCreatedByMaker (input: $input) {
|
|
368
|
-
events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, makerAddress
|
|
369
|
-
}
|
|
370
|
-
}`,
|
|
371
|
-
vars,
|
|
372
|
-
sink,
|
|
373
|
-
);
|
|
374
|
-
onUnconfirmedEventsCreated = (
|
|
375
|
-
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
376
|
-
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
377
|
-
) =>
|
|
378
|
-
this.sdk.subscribe(
|
|
379
|
-
`subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
|
|
380
|
-
onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
|
|
381
|
-
address, events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, id, networkId, quoteToken
|
|
382
|
-
}
|
|
383
|
-
}`,
|
|
384
|
-
vars,
|
|
385
|
-
sink,
|
|
386
|
-
);
|
|
387
|
-
onLatestTokens = (
|
|
388
|
-
vars: OnLatestTokensSubscriptionVariables,
|
|
389
|
-
sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
|
|
387
|
+
onTokenLifecycleEventsCreated = (
|
|
388
|
+
vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
|
|
389
|
+
sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
|
|
390
390
|
) =>
|
|
391
391
|
this.sdk.subscribe(
|
|
392
|
-
`subscription
|
|
393
|
-
|
|
394
|
-
blockHash, blockNumber,
|
|
392
|
+
`subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
|
|
393
|
+
onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
|
|
394
|
+
events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
|
|
395
395
|
}
|
|
396
396
|
}`,
|
|
397
397
|
vars,
|
|
398
398
|
sink,
|
|
399
399
|
);
|
|
400
|
-
|
|
401
|
-
vars:
|
|
402
|
-
sink: Sink<ExecutionResult<
|
|
400
|
+
onEventsCreated = (
|
|
401
|
+
vars: OnEventsCreatedSubscriptionVariables,
|
|
402
|
+
sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
|
|
403
403
|
) =>
|
|
404
404
|
this.sdk.subscribe(
|
|
405
|
-
`subscription
|
|
406
|
-
|
|
407
|
-
address,
|
|
405
|
+
`subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
|
|
406
|
+
onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
|
|
407
|
+
address, events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, id, networkId, quoteToken
|
|
408
408
|
}
|
|
409
409
|
}`,
|
|
410
410
|
vars,
|
|
411
411
|
sink,
|
|
412
412
|
);
|
|
413
|
-
|
|
414
|
-
vars:
|
|
415
|
-
sink: Sink<ExecutionResult<
|
|
413
|
+
onUnconfirmedEventsCreatedByMaker = (
|
|
414
|
+
vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
|
|
415
|
+
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
|
|
416
416
|
) =>
|
|
417
417
|
this.sdk.subscribe(
|
|
418
|
-
`subscription
|
|
419
|
-
|
|
420
|
-
|
|
418
|
+
`subscription OnUnconfirmedEventsCreatedByMaker($input: OnUnconfirmedEventsCreatedByMakerInput!) {
|
|
419
|
+
onUnconfirmedEventsCreatedByMaker (input: $input) {
|
|
420
|
+
events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, makerAddress
|
|
421
421
|
}
|
|
422
422
|
}`,
|
|
423
423
|
vars,
|
|
424
424
|
sink,
|
|
425
425
|
);
|
|
426
|
-
|
|
427
|
-
vars:
|
|
428
|
-
sink: Sink<ExecutionResult<
|
|
426
|
+
onPairMetadataUpdated = (
|
|
427
|
+
vars: OnPairMetadataUpdatedSubscriptionVariables,
|
|
428
|
+
sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
|
|
429
429
|
) =>
|
|
430
430
|
this.sdk.subscribe(
|
|
431
|
-
`subscription
|
|
432
|
-
|
|
433
|
-
|
|
431
|
+
`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken) {
|
|
432
|
+
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken) {
|
|
433
|
+
createdAt, enhancedToken0 { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, enhancedToken1 { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, exchangeId, fee, highPrice1, highPrice1w, highPrice4, highPrice5m, highPrice12, highPrice24, id, liquidity, liquidityToken, lowPrice1, lowPrice1w, lowPrice4, lowPrice5m, lowPrice12, lowPrice24, networkId, nonLiquidityToken, pairAddress, price, priceChange1, priceChange1w, priceChange4, priceChange5m, priceChange12, priceChange24, quoteToken, statsType, tickSpacing, token0 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, token1 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, volume1, volume1w, volume4, volume5m, volume12, volume24
|
|
434
434
|
}
|
|
435
435
|
}`,
|
|
436
436
|
vars,
|
|
437
437
|
sink,
|
|
438
438
|
);
|
|
439
|
-
|
|
440
|
-
vars:
|
|
441
|
-
sink: Sink<ExecutionResult<
|
|
439
|
+
onNftEventsCreated = (
|
|
440
|
+
vars: OnNftEventsCreatedSubscriptionVariables,
|
|
441
|
+
sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
|
|
442
442
|
) =>
|
|
443
443
|
this.sdk.subscribe(
|
|
444
|
-
`subscription
|
|
445
|
-
|
|
446
|
-
|
|
444
|
+
`subscription OnNftEventsCreated($address: String, $networkId: Int) {
|
|
445
|
+
onNftEventsCreated (address: $address, networkId: $networkId) {
|
|
446
|
+
address, events { aggregatorAddress, blockNumber, contractAddress, eventType, exchangeAddress, fillSource, id, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, logIndex, maker, networkId, numberOfTokens, orderDirection, paymentTokenAddress, poolAddress, priceError, sortKey, taker, timestamp, tokenId, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, tradeOffer { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, tradeReceived { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, transactionHash, transactionIndex }, id, networkId
|
|
447
447
|
}
|
|
448
448
|
}`,
|
|
449
449
|
vars,
|
|
450
450
|
sink,
|
|
451
451
|
);
|
|
452
|
-
|
|
453
|
-
vars:
|
|
454
|
-
sink: Sink<ExecutionResult<
|
|
452
|
+
onLatestPairUpdated = (
|
|
453
|
+
vars: OnLatestPairUpdatedSubscriptionVariables,
|
|
454
|
+
sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
|
|
455
455
|
) =>
|
|
456
456
|
this.sdk.subscribe(
|
|
457
|
-
`subscription
|
|
458
|
-
|
|
459
|
-
|
|
457
|
+
`subscription OnLatestPairUpdated($id: String, $networkId: Int) {
|
|
458
|
+
onLatestPairUpdated (id: $id, networkId: $networkId) {
|
|
459
|
+
address, exchangeHash, id, initialPriceUsd, liquidAt, liquidity, liquidityToken, networkId, newToken, nonLiquidityToken, oldToken, priceChange, priceUsd, token0 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, token1 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, transactionHash
|
|
460
460
|
}
|
|
461
461
|
}`,
|
|
462
462
|
vars,
|