@codex-data/sdk 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/resources/graphql.d.ts +227 -62
  2. package/dist/resources/graphql.d.ts.map +1 -1
  3. package/dist/resources/graphql.js +9 -6
  4. package/dist/resources/graphql.js.map +1 -1
  5. package/dist/sdk/Mutation.d.ts +1 -1
  6. package/dist/sdk/Mutation.d.ts.map +1 -1
  7. package/dist/sdk/Mutation.js +1 -1
  8. package/dist/sdk/Mutation.js.map +1 -1
  9. package/dist/sdk/Query.d.ts +50 -56
  10. package/dist/sdk/Query.d.ts.map +1 -1
  11. package/dist/sdk/Query.js +49 -55
  12. package/dist/sdk/Query.js.map +1 -1
  13. package/dist/sdk/Subscribe.d.ts +18 -18
  14. package/dist/sdk/Subscribe.d.ts.map +1 -1
  15. package/dist/sdk/Subscribe.js +91 -91
  16. package/dist/sdk/Subscribe.js.map +1 -1
  17. package/dist/sdk/generated/gql.d.ts +64 -123
  18. package/dist/sdk/generated/gql.d.ts.map +1 -1
  19. package/dist/sdk/generated/gql.js +32 -38
  20. package/dist/sdk/generated/gql.js.map +1 -1
  21. package/dist/sdk/generated/graphql.d.ts +238 -1384
  22. package/dist/sdk/generated/graphql.d.ts.map +1 -1
  23. package/dist/sdk/generated/graphql.js +44 -47
  24. package/dist/sdk/generated/graphql.js.map +1 -1
  25. package/package.json +2 -2
  26. package/src/resources/generated_queries/Balances.graphql +0 -15
  27. package/src/resources/generated_queries/DetailedWalletStats.graphql +0 -4
  28. package/src/resources/generated_queries/FilterNftPoolCollections.graphql +0 -8
  29. package/src/resources/generated_queries/FilterNftPools.graphql +0 -7
  30. package/src/resources/generated_queries/FilterPairs.graphql +0 -60
  31. package/src/resources/generated_queries/FilterTokenWallets.graphql +0 -15
  32. package/src/resources/generated_queries/FilterTokens.graphql +0 -47
  33. package/src/resources/generated_queries/GetBars.graphql +0 -31
  34. package/src/resources/generated_queries/GetCommunityNotes.graphql +0 -15
  35. package/src/resources/generated_queries/GetDetailedPairStats.graphql +0 -30
  36. package/src/resources/generated_queries/GetDetailedPairsStats.graphql +0 -30
  37. package/src/resources/generated_queries/GetNftEvents.graphql +0 -9
  38. package/src/resources/generated_queries/GetNftPool.graphql +0 -2
  39. package/src/resources/generated_queries/GetNftPoolCollection.graphql +0 -8
  40. package/src/resources/generated_queries/GetNftPoolCollectionsByExchange.graphql +0 -8
  41. package/src/resources/generated_queries/GetNftPoolEvents.graphql +0 -2
  42. package/src/resources/generated_queries/GetNftPoolsByCollectionAndExchange.graphql +0 -2
  43. package/src/resources/generated_queries/GetNftPoolsByOwner.graphql +0 -2
  44. package/src/resources/generated_queries/Holders.graphql +0 -15
  45. package/src/resources/generated_queries/LiquidityLocks.graphql +0 -1
  46. package/src/resources/generated_queries/ListPairsForToken.graphql +0 -30
  47. package/src/resources/generated_queries/ListPairsWithMetadataForToken.graphql +0 -60
  48. package/src/resources/generated_queries/PairMetadata.graphql +0 -30
  49. package/src/resources/generated_queries/PrimeHolders.graphql +0 -15
  50. package/src/resources/generated_queries/Token.graphql +0 -15
  51. package/src/resources/generated_queries/Tokens.graphql +0 -15
  52. package/src/resources/generated_subscriptions/OnBalanceUpdated.graphql +0 -15
  53. package/src/resources/generated_subscriptions/OnHoldersUpdated.graphql +0 -15
  54. package/src/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +0 -15
  55. package/src/resources/generated_subscriptions/OnNftEventsCreated.graphql +0 -9
  56. package/src/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +0 -2
  57. package/src/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +0 -30
  58. package/src/resources/graphql.schema.json +229 -147
  59. package/src/resources/graphql.ts +227 -62
  60. package/src/resources/schema.graphql +101 -85
  61. package/src/sdk/Mutation.ts +2 -2
  62. package/src/sdk/Query.ts +102 -126
  63. package/src/sdk/Subscribe.ts +149 -149
  64. package/src/sdk/generated/gql.ts +64 -94
  65. package/src/sdk/generated/graphql.ts +291 -191
  66. package/src/resources/generated_queries/FilterNetworkWallets.graphql +0 -57
  67. package/src/resources/generated_queries/GetDetailedStats.graphql +0 -338
  68. package/src/resources/generated_queries/GetLatestPairs.graphql +0 -57
  69. package/src/resources/generated_queries/GetLatestTokens.graphql +0 -39
  70. package/src/resources/generated_queries/ListTopTokens.graphql +0 -55
  71. package/src/resources/generated_queries/SearchTokens.graphql +0 -67
@@ -53,66 +53,53 @@ import { Codex } from "./index";
53
53
 
54
54
  export class Subscribe {
55
55
  constructor(private sdk: Codex) {}
56
- onPriceUpdated = async (
57
- vars: OnPriceUpdatedSubscriptionVariables,
58
- sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
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 OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
75
- onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
76
- 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
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
- onBalanceUpdated = async (
83
- vars: OnBalanceUpdatedSubscriptionVariables,
84
- sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
69
+ onNftEventsCreated = async (
70
+ vars: OnNftEventsCreatedSubscriptionVariables,
71
+ sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
85
72
  ) =>
86
73
  this.sdk.subscribe(
87
- `subscription OnBalanceUpdated($walletAddress: String!) {
88
- onBalanceUpdated (walletAddress: $walletAddress) {
89
- 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
74
+ `subscription OnNftEventsCreated($address: String, $networkId: Int) {
75
+ onNftEventsCreated (address: $address, networkId: $networkId) {
76
+ 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
90
77
  }
91
78
  }`,
92
79
  vars,
93
80
  sink,
94
81
  );
95
- onTokenBarsUpdated = async (
96
- vars: OnTokenBarsUpdatedSubscriptionVariables,
97
- sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
82
+ onLaunchpadTokenEvent = async (
83
+ vars: OnLaunchpadTokenEventSubscriptionVariables,
84
+ sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
98
85
  ) =>
99
86
  this.sdk.subscribe(
100
- `subscription OnTokenBarsUpdated($networkId: Int, $tokenId: String) {
101
- onTokenBarsUpdated (networkId: $networkId, tokenId: $tokenId) {
102
- 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
87
+ `subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
88
+ onLaunchpadTokenEvent (input: $input) {
89
+ address, buyCount1, eventType, holders, 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, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, 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
103
90
  }
104
91
  }`,
105
92
  vars,
106
93
  sink,
107
94
  );
108
- onEventsCreated = async (
109
- vars: OnEventsCreatedSubscriptionVariables,
110
- sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
95
+ onUnconfirmedBarsUpdated = async (
96
+ vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
97
+ sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
111
98
  ) =>
112
99
  this.sdk.subscribe(
113
- `subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
114
- onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
115
- 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
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
- onUnconfirmedBarsUpdated = async (
222
- vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
223
- sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
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 OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
253
- onLaunchpadTokenEvent (input: $input) {
254
- 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
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
- onLatestTokens = async (
261
- vars: OnLatestTokensSubscriptionVariables,
262
- sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
221
+ onUnconfirmedEventsCreatedByMaker = async (
222
+ vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
223
+ sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
263
224
  ) =>
264
225
  this.sdk.subscribe(
265
- `subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
266
- onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
267
- 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
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
- onPairMetadataUpdated = async (
287
- vars: OnPairMetadataUpdatedSubscriptionVariables,
288
- sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
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 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
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
- onUnconfirmedEventsCreatedByMaker = async (
326
- vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
327
- sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
260
+ onDetailedStatsUpdated = async (
261
+ vars: OnDetailedStatsUpdatedSubscriptionVariables,
262
+ sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
328
263
  ) =>
329
264
  this.sdk.subscribe(
330
- `subscription OnUnconfirmedEventsCreatedByMaker($input: OnUnconfirmedEventsCreatedByMakerInput!) {
331
- onUnconfirmedEventsCreatedByMaker (input: $input) {
332
- 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
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
- onNftEventsCreated = async (
339
- vars: OnNftEventsCreatedSubscriptionVariables,
340
- sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
273
+ onTokenBarsUpdated = async (
274
+ vars: OnTokenBarsUpdatedSubscriptionVariables,
275
+ sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
341
276
  ) =>
342
277
  this.sdk.subscribe(
343
- `subscription OnNftEventsCreated($address: String, $networkId: Int) {
344
- onNftEventsCreated (address: $address, networkId: $networkId) {
345
- 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
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
- onTokenLifecycleEventsCreated = async (
352
- vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
353
- sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
286
+ onPriceUpdated = async (
287
+ vars: OnPriceUpdatedSubscriptionVariables,
288
+ sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
354
289
  ) =>
355
290
  this.sdk.subscribe(
356
- `subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
357
- onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
358
- events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
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
- onPricesUpdated = async (
365
- vars: OnPricesUpdatedSubscriptionVariables,
366
- sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
299
+ onBarsUpdated = async (
300
+ vars: OnBarsUpdatedSubscriptionVariables,
301
+ sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
367
302
  ) =>
368
303
  this.sdk.subscribe(
369
- `subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
370
- onPricesUpdated (input: $input) {
371
- address, confidence, networkId, poolAddress, priceUsd, timestamp
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
- onHoldersUpdated = async (
378
- vars: OnHoldersUpdatedSubscriptionVariables,
379
- sink: Sink<ExecutionResult<OnHoldersUpdatedSubscription>>,
312
+ onTokenEventsCreated = async (
313
+ vars: OnTokenEventsCreatedSubscriptionVariables,
314
+ sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
380
315
  ) =>
381
316
  this.sdk.subscribe(
382
- `subscription OnHoldersUpdated($tokenId: String!) {
383
- onHoldersUpdated (tokenId: $tokenId) {
384
- 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
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
- onBarsUpdated = async (
435
- vars: OnBarsUpdatedSubscriptionVariables,
436
- sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
382
+ onLatestTokens = async (
383
+ vars: OnLatestTokensSubscriptionVariables,
384
+ sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
437
385
  ) =>
438
386
  this.sdk.subscribe(
439
- `subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
440
- onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
441
- 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
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
- onDetailedStatsUpdated = async (
448
- vars: OnDetailedStatsUpdatedSubscriptionVariables,
449
- sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
395
+ onBalanceUpdated = async (
396
+ vars: OnBalanceUpdatedSubscriptionVariables,
397
+ sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
450
398
  ) =>
451
399
  this.sdk.subscribe(
452
- `subscription OnDetailedStatsUpdated($pairId: String, $tokenOfInterest: TokenOfInterest) {
453
- onDetailedStatsUpdated (pairId: $pairId, tokenOfInterest: $tokenOfInterest) {
454
- 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
400
+ `subscription OnBalanceUpdated($walletAddress: String!) {
401
+ onBalanceUpdated (walletAddress: $walletAddress) {
402
+ 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, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, 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
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 }, 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
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, 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, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, 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
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, 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, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, 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, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, 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
455
455
  }
456
456
  }`,
457
457
  vars,