@codex-data/sdk 1.0.11 → 1.0.12
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 +17 -15
- package/dist/resources/graphql.d.ts.map +1 -1
- package/dist/resources/graphql.js +8 -6
- package/dist/resources/graphql.js.map +1 -1
- package/dist/sdk/Mutation.d.ts +1 -1
- package/dist/sdk/Mutation.d.ts.map +1 -1
- package/dist/sdk/Mutation.js +1 -1
- package/dist/sdk/Mutation.js.map +1 -1
- package/dist/sdk/Query.d.ts +54 -54
- package/dist/sdk/Query.d.ts.map +1 -1
- package/dist/sdk/Query.js +54 -54
- package/dist/sdk/Query.js.map +1 -1
- package/dist/sdk/Subscribe.d.ts +18 -18
- package/dist/sdk/Subscribe.d.ts.map +1 -1
- package/dist/sdk/Subscribe.js +91 -91
- package/dist/sdk/Subscribe.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +17 -15
- package/dist/sdk/generated/graphql.d.ts.map +1 -1
- package/dist/sdk/generated/graphql.js +8 -6
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/package.json +2 -2
- package/src/resources/graphql.schema.json +21 -15
- package/src/resources/graphql.ts +17 -15
- package/src/resources/schema.graphql +17 -15
- package/src/sdk/Mutation.ts +2 -2
- package/src/sdk/Query.ts +112 -112
- package/src/sdk/Subscribe.ts +149 -149
- package/src/sdk/generated/graphql.ts +17 -15
package/src/sdk/Subscribe.ts
CHANGED
|
@@ -53,66 +53,53 @@ import { Codex } from "./index";
|
|
|
53
53
|
|
|
54
54
|
export class Subscribe {
|
|
55
55
|
constructor(private sdk: Codex) {}
|
|
56
|
-
|
|
57
|
-
vars:
|
|
58
|
-
sink: Sink<ExecutionResult<
|
|
59
|
-
) =>
|
|
60
|
-
this.sdk.subscribe(
|
|
61
|
-
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
62
|
-
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
63
|
-
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
64
|
-
}
|
|
65
|
-
}`,
|
|
66
|
-
vars,
|
|
67
|
-
sink,
|
|
68
|
-
);
|
|
69
|
-
onNftAssetsCreated = async (
|
|
70
|
-
vars: OnNftAssetsCreatedSubscriptionVariables,
|
|
71
|
-
sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
|
|
56
|
+
onTokenLifecycleEventsCreated = async (
|
|
57
|
+
vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
|
|
58
|
+
sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
|
|
72
59
|
) =>
|
|
73
60
|
this.sdk.subscribe(
|
|
74
|
-
`subscription
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
`subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
|
|
62
|
+
onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
|
|
63
|
+
events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
|
|
77
64
|
}
|
|
78
65
|
}`,
|
|
79
66
|
vars,
|
|
80
67
|
sink,
|
|
81
68
|
);
|
|
82
|
-
|
|
83
|
-
vars:
|
|
84
|
-
sink: Sink<ExecutionResult<
|
|
69
|
+
onNftEventsCreated = async (
|
|
70
|
+
vars: OnNftEventsCreatedSubscriptionVariables,
|
|
71
|
+
sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
|
|
85
72
|
) =>
|
|
86
73
|
this.sdk.subscribe(
|
|
87
|
-
`subscription
|
|
88
|
-
|
|
89
|
-
address,
|
|
74
|
+
`subscription OnNftEventsCreated($address: String, $networkId: Int) {
|
|
75
|
+
onNftEventsCreated (address: $address, networkId: $networkId) {
|
|
76
|
+
address, events { aggregatorAddress, baseTokenAddress, baseTokenPrice, blockNumber, contractAddress, eventType, exchangeAddress, fillSource, id, individualBaseTokenPrice, individualNetworkBaseTokenPrice, individualPrice, individualPriceNetworkBaseToken, individualPriceUsd, individualTokenPrice, individualTradePrice, logIndex, maker, networkBaseTokenPrice, networkId, numberOfTokens, orderDirection, paymentTokenAddress, poolAddress, priceError, sortKey, taker, timestamp, tokenId, tokenPrice, totalPrice, 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
|
|
90
77
|
}
|
|
91
78
|
}`,
|
|
92
79
|
vars,
|
|
93
80
|
sink,
|
|
94
81
|
);
|
|
95
|
-
|
|
96
|
-
vars:
|
|
97
|
-
sink: Sink<ExecutionResult<
|
|
82
|
+
onLaunchpadTokenEvent = async (
|
|
83
|
+
vars: OnLaunchpadTokenEventSubscriptionVariables,
|
|
84
|
+
sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
|
|
98
85
|
) =>
|
|
99
86
|
this.sdk.subscribe(
|
|
100
|
-
`subscription
|
|
101
|
-
|
|
102
|
-
|
|
87
|
+
`subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
|
|
88
|
+
onLaunchpadTokenEvent (input: $input) {
|
|
89
|
+
address, buyCount1, eventType, holders, marketCap, networkId, price, protocol, sellCount1, token { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, transactions1, volume1
|
|
103
90
|
}
|
|
104
91
|
}`,
|
|
105
92
|
vars,
|
|
106
93
|
sink,
|
|
107
94
|
);
|
|
108
|
-
|
|
109
|
-
vars:
|
|
110
|
-
sink: Sink<ExecutionResult<
|
|
95
|
+
onUnconfirmedBarsUpdated = async (
|
|
96
|
+
vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
|
|
97
|
+
sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
|
|
111
98
|
) =>
|
|
112
99
|
this.sdk.subscribe(
|
|
113
|
-
`subscription
|
|
114
|
-
|
|
115
|
-
|
|
100
|
+
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
101
|
+
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
102
|
+
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
|
|
116
103
|
}
|
|
117
104
|
}`,
|
|
118
105
|
vars,
|
|
@@ -218,53 +205,27 @@ export class Subscribe {
|
|
|
218
205
|
vars,
|
|
219
206
|
sink,
|
|
220
207
|
);
|
|
221
|
-
|
|
222
|
-
vars:
|
|
223
|
-
sink: Sink<ExecutionResult<
|
|
224
|
-
) =>
|
|
225
|
-
this.sdk.subscribe(
|
|
226
|
-
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
227
|
-
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
228
|
-
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
|
|
229
|
-
}
|
|
230
|
-
}`,
|
|
231
|
-
vars,
|
|
232
|
-
sink,
|
|
233
|
-
);
|
|
234
|
-
onNftPoolEventsCreated = async (
|
|
235
|
-
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
236
|
-
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
237
|
-
) =>
|
|
238
|
-
this.sdk.subscribe(
|
|
239
|
-
`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
240
|
-
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
241
|
-
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, nftTokenQuantity }, 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, nftTokenQuantity }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio } }, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
|
|
242
|
-
}
|
|
243
|
-
}`,
|
|
244
|
-
vars,
|
|
245
|
-
sink,
|
|
246
|
-
);
|
|
247
|
-
onLaunchpadTokenEvent = async (
|
|
248
|
-
vars: OnLaunchpadTokenEventSubscriptionVariables,
|
|
249
|
-
sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
|
|
208
|
+
onPricesUpdated = async (
|
|
209
|
+
vars: OnPricesUpdatedSubscriptionVariables,
|
|
210
|
+
sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
|
|
250
211
|
) =>
|
|
251
212
|
this.sdk.subscribe(
|
|
252
|
-
`subscription
|
|
253
|
-
|
|
254
|
-
address,
|
|
213
|
+
`subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
|
|
214
|
+
onPricesUpdated (input: $input) {
|
|
215
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
255
216
|
}
|
|
256
217
|
}`,
|
|
257
218
|
vars,
|
|
258
219
|
sink,
|
|
259
220
|
);
|
|
260
|
-
|
|
261
|
-
vars:
|
|
262
|
-
sink: Sink<ExecutionResult<
|
|
221
|
+
onUnconfirmedEventsCreatedByMaker = async (
|
|
222
|
+
vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
|
|
223
|
+
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
|
|
263
224
|
) =>
|
|
264
225
|
this.sdk.subscribe(
|
|
265
|
-
`subscription
|
|
266
|
-
|
|
267
|
-
blockHash, blockNumber,
|
|
226
|
+
`subscription OnUnconfirmedEventsCreatedByMaker($input: OnUnconfirmedEventsCreatedByMakerInput!) {
|
|
227
|
+
onUnconfirmedEventsCreatedByMaker (input: $input) {
|
|
228
|
+
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
|
|
268
229
|
}
|
|
269
230
|
}`,
|
|
270
231
|
vars,
|
|
@@ -283,105 +244,79 @@ export class Subscribe {
|
|
|
283
244
|
vars,
|
|
284
245
|
sink,
|
|
285
246
|
);
|
|
286
|
-
|
|
287
|
-
vars:
|
|
288
|
-
sink: Sink<ExecutionResult<
|
|
289
|
-
) =>
|
|
290
|
-
this.sdk.subscribe(
|
|
291
|
-
`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken) {
|
|
292
|
-
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken) {
|
|
293
|
-
createdAt, enhancedToken0 { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, enhancedToken1 { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, 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
|
|
294
|
-
}
|
|
295
|
-
}`,
|
|
296
|
-
vars,
|
|
297
|
-
sink,
|
|
298
|
-
);
|
|
299
|
-
onEventsCreatedByMaker = async (
|
|
300
|
-
vars: OnEventsCreatedByMakerSubscriptionVariables,
|
|
301
|
-
sink: Sink<ExecutionResult<OnEventsCreatedByMakerSubscription>>,
|
|
302
|
-
) =>
|
|
303
|
-
this.sdk.subscribe(
|
|
304
|
-
`subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
|
|
305
|
-
onEventsCreatedByMaker (input: $input) {
|
|
306
|
-
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
|
|
307
|
-
}
|
|
308
|
-
}`,
|
|
309
|
-
vars,
|
|
310
|
-
sink,
|
|
311
|
-
);
|
|
312
|
-
onTokenEventsCreated = async (
|
|
313
|
-
vars: OnTokenEventsCreatedSubscriptionVariables,
|
|
314
|
-
sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
|
|
247
|
+
onNftAssetsCreated = async (
|
|
248
|
+
vars: OnNftAssetsCreatedSubscriptionVariables,
|
|
249
|
+
sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
|
|
315
250
|
) =>
|
|
316
251
|
this.sdk.subscribe(
|
|
317
|
-
`subscription
|
|
318
|
-
|
|
319
|
-
|
|
252
|
+
`subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
|
|
253
|
+
onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
|
|
254
|
+
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
|
|
320
255
|
}
|
|
321
256
|
}`,
|
|
322
257
|
vars,
|
|
323
258
|
sink,
|
|
324
259
|
);
|
|
325
|
-
|
|
326
|
-
vars:
|
|
327
|
-
sink: Sink<ExecutionResult<
|
|
260
|
+
onDetailedStatsUpdated = async (
|
|
261
|
+
vars: OnDetailedStatsUpdatedSubscriptionVariables,
|
|
262
|
+
sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
|
|
328
263
|
) =>
|
|
329
264
|
this.sdk.subscribe(
|
|
330
|
-
`subscription
|
|
331
|
-
|
|
332
|
-
|
|
265
|
+
`subscription OnDetailedStatsUpdated($pairId: String, $tokenOfInterest: TokenOfInterest) {
|
|
266
|
+
onDetailedStatsUpdated (pairId: $pairId, tokenOfInterest: $tokenOfInterest) {
|
|
267
|
+
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
|
|
333
268
|
}
|
|
334
269
|
}`,
|
|
335
270
|
vars,
|
|
336
271
|
sink,
|
|
337
272
|
);
|
|
338
|
-
|
|
339
|
-
vars:
|
|
340
|
-
sink: Sink<ExecutionResult<
|
|
273
|
+
onTokenBarsUpdated = async (
|
|
274
|
+
vars: OnTokenBarsUpdatedSubscriptionVariables,
|
|
275
|
+
sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
|
|
341
276
|
) =>
|
|
342
277
|
this.sdk.subscribe(
|
|
343
|
-
`subscription
|
|
344
|
-
|
|
345
|
-
|
|
278
|
+
`subscription OnTokenBarsUpdated($networkId: Int, $tokenId: String) {
|
|
279
|
+
onTokenBarsUpdated (networkId: $networkId, tokenId: $tokenId) {
|
|
280
|
+
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
|
|
346
281
|
}
|
|
347
282
|
}`,
|
|
348
283
|
vars,
|
|
349
284
|
sink,
|
|
350
285
|
);
|
|
351
|
-
|
|
352
|
-
vars:
|
|
353
|
-
sink: Sink<ExecutionResult<
|
|
286
|
+
onPriceUpdated = async (
|
|
287
|
+
vars: OnPriceUpdatedSubscriptionVariables,
|
|
288
|
+
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
|
|
354
289
|
) =>
|
|
355
290
|
this.sdk.subscribe(
|
|
356
|
-
`subscription
|
|
357
|
-
|
|
358
|
-
|
|
291
|
+
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
292
|
+
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
293
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
359
294
|
}
|
|
360
295
|
}`,
|
|
361
296
|
vars,
|
|
362
297
|
sink,
|
|
363
298
|
);
|
|
364
|
-
|
|
365
|
-
vars:
|
|
366
|
-
sink: Sink<ExecutionResult<
|
|
299
|
+
onBarsUpdated = async (
|
|
300
|
+
vars: OnBarsUpdatedSubscriptionVariables,
|
|
301
|
+
sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
|
|
367
302
|
) =>
|
|
368
303
|
this.sdk.subscribe(
|
|
369
|
-
`subscription
|
|
370
|
-
|
|
371
|
-
|
|
304
|
+
`subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
305
|
+
onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
306
|
+
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, quoteTokenAddress, statsType, timestamp
|
|
372
307
|
}
|
|
373
308
|
}`,
|
|
374
309
|
vars,
|
|
375
310
|
sink,
|
|
376
311
|
);
|
|
377
|
-
|
|
378
|
-
vars:
|
|
379
|
-
sink: Sink<ExecutionResult<
|
|
312
|
+
onTokenEventsCreated = async (
|
|
313
|
+
vars: OnTokenEventsCreatedSubscriptionVariables,
|
|
314
|
+
sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
|
|
380
315
|
) =>
|
|
381
316
|
this.sdk.subscribe(
|
|
382
|
-
`subscription
|
|
383
|
-
|
|
384
|
-
|
|
317
|
+
`subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
|
|
318
|
+
onTokenEventsCreated (input: $input) {
|
|
319
|
+
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
|
|
385
320
|
}
|
|
386
321
|
}`,
|
|
387
322
|
vars,
|
|
@@ -418,6 +353,19 @@ export class Subscribe {
|
|
|
418
353
|
vars,
|
|
419
354
|
sink,
|
|
420
355
|
);
|
|
356
|
+
onEventsCreatedByMaker = async (
|
|
357
|
+
vars: OnEventsCreatedByMakerSubscriptionVariables,
|
|
358
|
+
sink: Sink<ExecutionResult<OnEventsCreatedByMakerSubscription>>,
|
|
359
|
+
) =>
|
|
360
|
+
this.sdk.subscribe(
|
|
361
|
+
`subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
|
|
362
|
+
onEventsCreatedByMaker (input: $input) {
|
|
363
|
+
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
|
|
364
|
+
}
|
|
365
|
+
}`,
|
|
366
|
+
vars,
|
|
367
|
+
sink,
|
|
368
|
+
);
|
|
421
369
|
onUnconfirmedEventsCreated = async (
|
|
422
370
|
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
423
371
|
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
@@ -431,27 +379,79 @@ export class Subscribe {
|
|
|
431
379
|
vars,
|
|
432
380
|
sink,
|
|
433
381
|
);
|
|
434
|
-
|
|
435
|
-
vars:
|
|
436
|
-
sink: Sink<ExecutionResult<
|
|
382
|
+
onLatestTokens = async (
|
|
383
|
+
vars: OnLatestTokensSubscriptionVariables,
|
|
384
|
+
sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
|
|
437
385
|
) =>
|
|
438
386
|
this.sdk.subscribe(
|
|
439
|
-
`subscription
|
|
440
|
-
|
|
441
|
-
|
|
387
|
+
`subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
|
|
388
|
+
onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
|
|
389
|
+
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
|
|
442
390
|
}
|
|
443
391
|
}`,
|
|
444
392
|
vars,
|
|
445
393
|
sink,
|
|
446
394
|
);
|
|
447
|
-
|
|
448
|
-
vars:
|
|
449
|
-
sink: Sink<ExecutionResult<
|
|
395
|
+
onBalanceUpdated = async (
|
|
396
|
+
vars: OnBalanceUpdatedSubscriptionVariables,
|
|
397
|
+
sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
|
|
450
398
|
) =>
|
|
451
399
|
this.sdk.subscribe(
|
|
452
|
-
`subscription
|
|
453
|
-
|
|
454
|
-
|
|
400
|
+
`subscription OnBalanceUpdated($walletAddress: String!) {
|
|
401
|
+
onBalanceUpdated (walletAddress: $walletAddress) {
|
|
402
|
+
address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, tokenAddress, tokenId, tokenPriceUsd, walletId
|
|
403
|
+
}
|
|
404
|
+
}`,
|
|
405
|
+
vars,
|
|
406
|
+
sink,
|
|
407
|
+
);
|
|
408
|
+
onEventsCreated = async (
|
|
409
|
+
vars: OnEventsCreatedSubscriptionVariables,
|
|
410
|
+
sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
|
|
411
|
+
) =>
|
|
412
|
+
this.sdk.subscribe(
|
|
413
|
+
`subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
|
|
414
|
+
onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
|
|
415
|
+
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
|
|
416
|
+
}
|
|
417
|
+
}`,
|
|
418
|
+
vars,
|
|
419
|
+
sink,
|
|
420
|
+
);
|
|
421
|
+
onNftPoolEventsCreated = async (
|
|
422
|
+
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
423
|
+
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
424
|
+
) =>
|
|
425
|
+
this.sdk.subscribe(
|
|
426
|
+
`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
427
|
+
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
428
|
+
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, nftTokenQuantity }, 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, nftTokenQuantity }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio } }, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
|
|
429
|
+
}
|
|
430
|
+
}`,
|
|
431
|
+
vars,
|
|
432
|
+
sink,
|
|
433
|
+
);
|
|
434
|
+
onHoldersUpdated = async (
|
|
435
|
+
vars: OnHoldersUpdatedSubscriptionVariables,
|
|
436
|
+
sink: Sink<ExecutionResult<OnHoldersUpdatedSubscription>>,
|
|
437
|
+
) =>
|
|
438
|
+
this.sdk.subscribe(
|
|
439
|
+
`subscription OnHoldersUpdated($tokenId: String!) {
|
|
440
|
+
onHoldersUpdated (tokenId: $tokenId) {
|
|
441
|
+
balances { address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, tokenAddress, tokenId, tokenPriceUsd, walletId }, holders, networkId, tokenAddress, tokenId
|
|
442
|
+
}
|
|
443
|
+
}`,
|
|
444
|
+
vars,
|
|
445
|
+
sink,
|
|
446
|
+
);
|
|
447
|
+
onPairMetadataUpdated = async (
|
|
448
|
+
vars: OnPairMetadataUpdatedSubscriptionVariables,
|
|
449
|
+
sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
|
|
450
|
+
) =>
|
|
451
|
+
this.sdk.subscribe(
|
|
452
|
+
`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken) {
|
|
453
|
+
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken) {
|
|
454
|
+
createdAt, enhancedToken0 { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, enhancedToken1 { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, 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
|
|
455
455
|
}
|
|
456
456
|
}`,
|
|
457
457
|
vars,
|