@codex-data/sdk 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/resources/generated_queries/Balances.graphql +1 -0
  2. package/dist/resources/generated_queries/FilterPairs.graphql +64 -0
  3. package/dist/resources/generated_queries/FilterTokens.graphql +53 -0
  4. package/dist/resources/generated_queries/GetBars.graphql +26 -1
  5. package/dist/resources/generated_queries/GetCommunityNotes.graphql +13 -0
  6. package/dist/resources/generated_queries/GetDetailedPairStats.graphql +26 -0
  7. package/dist/resources/generated_queries/GetDetailedPairsStats.graphql +26 -0
  8. package/dist/resources/generated_queries/GetNetworkStats.graphql +7 -0
  9. package/dist/resources/generated_queries/GetTokenEvents.graphql +1 -0
  10. package/dist/resources/generated_queries/GetTokenEventsForMaker.graphql +1 -0
  11. package/dist/resources/generated_queries/Holders.graphql +1 -0
  12. package/dist/resources/generated_queries/LiquidityLocks.graphql +1 -1
  13. package/dist/resources/generated_queries/ListPairsForToken.graphql +26 -0
  14. package/dist/resources/generated_queries/ListPairsWithMetadataForToken.graphql +52 -0
  15. package/dist/resources/generated_queries/PairMetadata.graphql +26 -0
  16. package/dist/resources/generated_queries/PrimeHolders.graphql +1 -0
  17. package/dist/resources/generated_queries/Token.graphql +13 -0
  18. package/dist/resources/generated_queries/TokenTopTraders.graphql +26 -0
  19. package/dist/resources/generated_queries/Tokens.graphql +13 -0
  20. package/dist/resources/generated_subscriptions/OnBalanceUpdated.graphql +12 -0
  21. package/dist/resources/generated_subscriptions/OnEventsCreated.graphql +8 -1
  22. package/dist/resources/generated_subscriptions/OnHoldersUpdated.graphql +1 -0
  23. package/dist/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +91 -0
  24. package/dist/resources/generated_subscriptions/OnLaunchpadTokenEventBatch.graphql +91 -0
  25. package/dist/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +26 -0
  26. package/dist/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +6 -1
  27. package/dist/resources/generated_subscriptions/OnTokenEventsCreated.graphql +1 -0
  28. package/dist/resources/graphql.d.ts +402 -11
  29. package/dist/resources/graphql.d.ts.map +1 -1
  30. package/dist/resources/graphql.js +64 -2
  31. package/dist/resources/graphql.js.map +1 -1
  32. package/dist/resources/graphql.schema.json +2536 -23
  33. package/dist/resources/graphql.ts +418 -11
  34. package/dist/resources/schema.graphql +555 -10
  35. package/dist/resources/subscriptions_override/OnLaunchpadTokenEventBatch.graphql +91 -0
  36. package/dist/scripts/generateGraphql.js +3 -4
  37. package/dist/scripts/generateGraphql.js.map +1 -1
  38. package/dist/sdk/Mutation.d.ts +1 -1
  39. package/dist/sdk/Mutation.d.ts.map +1 -1
  40. package/dist/sdk/Mutation.js +1 -1
  41. package/dist/sdk/Mutation.js.map +1 -1
  42. package/dist/sdk/Query.d.ts +50 -50
  43. package/dist/sdk/Query.d.ts.map +1 -1
  44. package/dist/sdk/Query.js +49 -49
  45. package/dist/sdk/Query.js.map +1 -1
  46. package/dist/sdk/Subscribe.d.ts +17 -14
  47. package/dist/sdk/Subscribe.d.ts.map +1 -1
  48. package/dist/sdk/Subscribe.js +179 -71
  49. package/dist/sdk/Subscribe.js.map +1 -1
  50. package/dist/sdk/generated/gql.d.ts +76 -55
  51. package/dist/sdk/generated/gql.d.ts.map +1 -1
  52. package/dist/sdk/generated/gql.js +27 -24
  53. package/dist/sdk/generated/gql.js.map +1 -1
  54. package/dist/sdk/generated/graphql.d.ts +1075 -62
  55. package/dist/sdk/generated/graphql.d.ts.map +1 -1
  56. package/dist/sdk/generated/graphql.js +93 -28
  57. package/dist/sdk/generated/graphql.js.map +1 -1
  58. package/package.json +2 -2
  59. package/src/resources/generated_queries/Balances.graphql +1 -0
  60. package/src/resources/generated_queries/FilterPairs.graphql +64 -0
  61. package/src/resources/generated_queries/FilterTokens.graphql +53 -0
  62. package/src/resources/generated_queries/GetBars.graphql +26 -1
  63. package/src/resources/generated_queries/GetCommunityNotes.graphql +13 -0
  64. package/src/resources/generated_queries/GetDetailedPairStats.graphql +26 -0
  65. package/src/resources/generated_queries/GetDetailedPairsStats.graphql +26 -0
  66. package/src/resources/generated_queries/GetNetworkStats.graphql +7 -0
  67. package/src/resources/generated_queries/GetTokenEvents.graphql +1 -0
  68. package/src/resources/generated_queries/GetTokenEventsForMaker.graphql +1 -0
  69. package/src/resources/generated_queries/Holders.graphql +1 -0
  70. package/src/resources/generated_queries/LiquidityLocks.graphql +1 -1
  71. package/src/resources/generated_queries/ListPairsForToken.graphql +26 -0
  72. package/src/resources/generated_queries/ListPairsWithMetadataForToken.graphql +52 -0
  73. package/src/resources/generated_queries/PairMetadata.graphql +26 -0
  74. package/src/resources/generated_queries/PrimeHolders.graphql +1 -0
  75. package/src/resources/generated_queries/Token.graphql +13 -0
  76. package/src/resources/generated_queries/TokenTopTraders.graphql +26 -0
  77. package/src/resources/generated_queries/Tokens.graphql +13 -0
  78. package/src/resources/generated_subscriptions/OnBalanceUpdated.graphql +12 -0
  79. package/src/resources/generated_subscriptions/OnEventsCreated.graphql +8 -1
  80. package/src/resources/generated_subscriptions/OnHoldersUpdated.graphql +1 -0
  81. package/src/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +91 -0
  82. package/src/resources/generated_subscriptions/OnLaunchpadTokenEventBatch.graphql +91 -0
  83. package/src/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +26 -0
  84. package/src/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +6 -1
  85. package/src/resources/generated_subscriptions/OnTokenEventsCreated.graphql +1 -0
  86. package/src/resources/graphql.schema.json +2536 -23
  87. package/src/resources/graphql.ts +418 -11
  88. package/src/resources/schema.graphql +555 -10
  89. package/src/resources/subscriptions_override/OnLaunchpadTokenEventBatch.graphql +91 -0
  90. package/src/scripts/generateGraphql.ts +2 -4
  91. package/src/sdk/Mutation.ts +2 -2
  92. package/src/sdk/Query.ts +105 -105
  93. package/src/sdk/Subscribe.ts +245 -113
  94. package/src/sdk/generated/gql.ts +66 -51
  95. package/src/sdk/generated/graphql.ts +495 -66
  96. package/dist/resources/generated_queries/GetLatestTokens.graphql +0 -39
  97. package/src/resources/generated_queries/GetLatestTokens.graphql +0 -39
@@ -2,6 +2,8 @@
2
2
  import { ExecutionResult, Sink } from "graphql-ws";
3
3
 
4
4
  import {
5
+ OnBalanceUpdatedSubscription,
6
+ OnBalanceUpdatedSubscriptionVariables,
5
7
  OnBarsUpdatedSubscription,
6
8
  OnBarsUpdatedSubscriptionVariables,
7
9
  OnDetailedStatsUpdatedSubscription,
@@ -16,6 +18,10 @@ import {
16
18
  OnLatestPairUpdatedSubscriptionVariables,
17
19
  OnLatestTokensSubscription,
18
20
  OnLatestTokensSubscriptionVariables,
21
+ OnLaunchpadTokenEventBatchSubscription,
22
+ OnLaunchpadTokenEventBatchSubscriptionVariables,
23
+ OnLaunchpadTokenEventSubscription,
24
+ OnLaunchpadTokenEventSubscriptionVariables,
19
25
  OnNftAssetsCreatedSubscription,
20
26
  OnNftAssetsCreatedSubscriptionVariables,
21
27
  OnNftEventsCreatedSubscription,
@@ -45,66 +51,40 @@ import { Codex } from "./index";
45
51
 
46
52
  export class Subscribe {
47
53
  constructor(private sdk: Codex) {}
48
- onHoldersUpdated = async (
49
- vars: OnHoldersUpdatedSubscriptionVariables,
50
- sink: Sink<ExecutionResult<OnHoldersUpdatedSubscription>>,
51
- ) =>
52
- this.sdk.subscribe(
53
- `subscription OnHoldersUpdated($tokenId: String!) {
54
- onHoldersUpdated (tokenId: $tokenId) {
55
- balances { address, balance, firstHeldTimestamp, shiftedBalance, tokenAddress, tokenId, walletId }, holders, networkId, tokenAddress, tokenId
56
- }
57
- }`,
58
- vars,
59
- sink,
60
- );
61
- onUnconfirmedBarsUpdated = async (
62
- vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
63
- sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
64
- ) =>
65
- this.sdk.subscribe(
66
- `subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
67
- onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
68
- 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
69
- }
70
- }`,
71
- vars,
72
- sink,
73
- );
74
- onUnconfirmedEventsCreated = async (
75
- vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
76
- sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
54
+ onTokenBarsUpdated = async (
55
+ vars: OnTokenBarsUpdatedSubscriptionVariables,
56
+ sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
77
57
  ) =>
78
58
  this.sdk.subscribe(
79
- `subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
80
- onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
81
- address, events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, id, networkId, quoteToken
59
+ `subscription OnTokenBarsUpdated($networkId: Int, $statsType: TokenPairStatisticsType, $tokenId: String) {
60
+ onTokenBarsUpdated (networkId: $networkId, statsType: $statsType, tokenId: $tokenId) {
61
+ 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
82
62
  }
83
63
  }`,
84
64
  vars,
85
65
  sink,
86
66
  );
87
- onTokenBarsUpdated = async (
88
- vars: OnTokenBarsUpdatedSubscriptionVariables,
89
- sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
67
+ onLatestTokens = async (
68
+ vars: OnLatestTokensSubscriptionVariables,
69
+ sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
90
70
  ) =>
91
71
  this.sdk.subscribe(
92
- `subscription OnTokenBarsUpdated($statsType: TokenPairStatisticsType, $tokenId: String) {
93
- onTokenBarsUpdated (statsType: $statsType, tokenId: $tokenId) {
94
- 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
72
+ `subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
73
+ onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
74
+ 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
95
75
  }
96
76
  }`,
97
77
  vars,
98
78
  sink,
99
79
  );
100
- onNftPoolEventsCreated = async (
101
- vars: OnNftPoolEventsCreatedSubscriptionVariables,
102
- sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
80
+ onTokenLifecycleEventsCreated = async (
81
+ vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
82
+ sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
103
83
  ) =>
104
84
  this.sdk.subscribe(
105
- `subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
106
- onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
107
- 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
85
+ `subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
86
+ onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
87
+ events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
108
88
  }
109
89
  }`,
110
90
  vars,
@@ -141,92 +121,192 @@ export class Subscribe {
141
121
  vars,
142
122
  sink,
143
123
  );
144
- onTokenLifecycleEventsCreated = async (
145
- vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
146
- sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
124
+ onLaunchpadTokenEvent = async (
125
+ vars: OnLaunchpadTokenEventSubscriptionVariables,
126
+ sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
147
127
  ) =>
148
128
  this.sdk.subscribe(
149
- `subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
150
- onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
151
- events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
129
+ `subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
130
+ onLaunchpadTokenEvent (input: $input) {
131
+ 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, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, 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
152
132
  }
153
133
  }`,
154
134
  vars,
155
135
  sink,
156
136
  );
157
- onTokenEventsCreated = async (
158
- vars: OnTokenEventsCreatedSubscriptionVariables,
159
- sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
137
+ onDetailedStatsUpdated = async (
138
+ vars: OnDetailedStatsUpdatedSubscriptionVariables,
139
+ sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
160
140
  ) =>
161
141
  this.sdk.subscribe(
162
- `subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
163
- onTokenEventsCreated (input: $input) {
164
- 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 }, id
142
+ `subscription OnDetailedStatsUpdated($pairId: String, $statsType: TokenPairStatisticsType, $tokenOfInterest: TokenOfInterest) {
143
+ onDetailedStatsUpdated (pairId: $pairId, statsType: $statsType, tokenOfInterest: $tokenOfInterest) {
144
+ 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
165
145
  }
166
146
  }`,
167
147
  vars,
168
148
  sink,
169
149
  );
170
- onNftEventsCreated = async (
171
- vars: OnNftEventsCreatedSubscriptionVariables,
172
- sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
150
+ onBalanceUpdated = async (
151
+ vars: OnBalanceUpdatedSubscriptionVariables,
152
+ sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
173
153
  ) =>
174
154
  this.sdk.subscribe(
175
- `subscription OnNftEventsCreated($address: String, $networkId: Int) {
176
- onNftEventsCreated (address: $address, networkId: $networkId) {
177
- 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
155
+ `subscription OnBalanceUpdated($walletAddress: String!) {
156
+ onBalanceUpdated (walletAddress: $walletAddress) {
157
+ address, balance, firstHeldTimestamp, networkId, shiftedBalance, tokenAddress, tokenId, walletId
178
158
  }
179
159
  }`,
180
160
  vars,
181
161
  sink,
182
162
  );
183
- onPriceUpdated = async (
184
- vars: OnPriceUpdatedSubscriptionVariables,
185
- sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
163
+ onUnconfirmedBarsUpdated = async (
164
+ vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
165
+ sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
186
166
  ) =>
187
167
  this.sdk.subscribe(
188
- `subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
189
- onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
190
- address, confidence, networkId, poolAddress, priceUsd, timestamp
168
+ `subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
169
+ onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
170
+ 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
191
171
  }
192
172
  }`,
193
173
  vars,
194
174
  sink,
195
175
  );
196
- onLatestTokens = async (
197
- vars: OnLatestTokensSubscriptionVariables,
198
- sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
176
+ onPricesUpdated = async (
177
+ vars: OnPricesUpdatedSubscriptionVariables,
178
+ sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
199
179
  ) =>
200
180
  this.sdk.subscribe(
201
- `subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
202
- onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
203
- 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
181
+ `subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
182
+ onPricesUpdated (input: $input) {
183
+ address, confidence, networkId, poolAddress, priceUsd, timestamp
204
184
  }
205
185
  }`,
206
186
  vars,
207
187
  sink,
208
188
  );
209
- onPairMetadataUpdated = async (
210
- vars: OnPairMetadataUpdatedSubscriptionVariables,
211
- sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
189
+ onSimulateTokenContract = async (
190
+ vars: OnSimulateTokenContractSubscriptionVariables,
191
+ sink: Sink<ExecutionResult<OnSimulateTokenContractSubscription>>,
212
192
  ) =>
213
193
  this.sdk.subscribe(
214
- `subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
215
- onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, statsType: $statsType) {
216
- 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, 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, 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
194
+ `subscription OnSimulateTokenContract($contractAddress: String, $networkId: Int!, $simulationId: String) {
195
+ onSimulateTokenContract (contractAddress: $contractAddress, networkId: $networkId, simulationId: $simulationId) {
196
+ analysisType, blockNumber, contractBalance { tokenContractEthBalance, tokenContractTokenBalance }, contractHashKey, creator { creatorAddress, creatorEthBalance, creatorTokenBalance }, deploy { deploySuccess, tokenMintedToDeployer }, errors { contractBalanceErrors { tokenContractEthBalanceError, tokenContractTokenBalanceError }, creatorErrors { creatorEthBalanceError, creatorTokenBalanceError }, deployErrors { deployError, tokenMintedToDeployerError }, liquidityErrors { addLiquidityError, lpTotalSupplyError, postLiquidityEnableTradingError, preLiquidityEnableTradingError }, ownerErrors { ownerAddressError, ownerEthBalanceError, ownerTokenBalanceError }, simulatorError, swapErrors { buyError, buyErrorEnum, sellError, sellErrorEnum }, tokenErrors { canRenounceOwnershipError, canTransferOwnershipError, decimalsError, tokenNameError, tokenSymbolError, totalSupplyError }, transferErrors { tokenContractApprovalError, tokenTransferredToContractError, userApprovalError } }, id, liquidity { addLiquiditySuccess, liquiditySetByPreLiquidityOpenTradingCall, lpTotalSupply, pairAddress, postLiquidityEnableTradingCall, postLiquidityEnableTradingSuccess, preLiquidityEnableTradingCall, preLiquidityEnableTradingSuccess, preLiquidityEnableTradingSupportsTransfer }, networkId, owner { ownerAddress, ownerEthBalance, ownerTokenBalance }, sortKey, status, swap { buyGasUsed, buySuccess, buyTax, maxBuyAmount, maxSellAmount, sellGasUsed, sellSuccess, sellTax }, timestamp, token { canRenounceOwnership, canTransferOwnership, contractAddress, decimals, isOwnerRenounced, tokenName, tokenSymbol, totalSupply }, transfer { tokenContractApprovalSuccess, tokenTransferredToContractSuccess, userApprovalSuccess }, uuid, uuidHashKey
217
197
  }
218
198
  }`,
219
199
  vars,
220
200
  sink,
221
201
  );
222
- onSimulateTokenContract = async (
223
- vars: OnSimulateTokenContractSubscriptionVariables,
224
- sink: Sink<ExecutionResult<OnSimulateTokenContractSubscription>>,
202
+ onLaunchpadTokenEventBatch = async (
203
+ vars: OnLaunchpadTokenEventBatchSubscriptionVariables,
204
+ sink: Sink<ExecutionResult<OnLaunchpadTokenEventBatchSubscription>>,
225
205
  ) =>
226
206
  this.sdk.subscribe(
227
- `subscription OnSimulateTokenContract($contractAddress: String, $networkId: Int!, $simulationId: String) {
228
- onSimulateTokenContract (contractAddress: $contractAddress, networkId: $networkId, simulationId: $simulationId) {
229
- analysisType, blockNumber, contractBalance { tokenContractEthBalance, tokenContractTokenBalance }, contractHashKey, creator { creatorAddress, creatorEthBalance, creatorTokenBalance }, deploy { deploySuccess, tokenMintedToDeployer }, errors { contractBalanceErrors { tokenContractEthBalanceError, tokenContractTokenBalanceError }, creatorErrors { creatorEthBalanceError, creatorTokenBalanceError }, deployErrors { deployError, tokenMintedToDeployerError }, liquidityErrors { addLiquidityError, lpTotalSupplyError, postLiquidityEnableTradingError, preLiquidityEnableTradingError }, ownerErrors { ownerAddressError, ownerEthBalanceError, ownerTokenBalanceError }, simulatorError, swapErrors { buyError, buyErrorEnum, sellError, sellErrorEnum }, tokenErrors { canRenounceOwnershipError, canTransferOwnershipError, decimalsError, tokenNameError, tokenSymbolError, totalSupplyError }, transferErrors { tokenContractApprovalError, tokenTransferredToContractError, userApprovalError } }, id, liquidity { addLiquiditySuccess, liquiditySetByPreLiquidityOpenTradingCall, lpTotalSupply, pairAddress, postLiquidityEnableTradingCall, postLiquidityEnableTradingSuccess, preLiquidityEnableTradingCall, preLiquidityEnableTradingSuccess, preLiquidityEnableTradingSupportsTransfer }, networkId, owner { ownerAddress, ownerEthBalance, ownerTokenBalance }, sortKey, status, swap { buyGasUsed, buySuccess, buyTax, maxBuyAmount, maxSellAmount, sellGasUsed, sellSuccess, sellTax }, timestamp, token { canRenounceOwnership, canTransferOwnership, contractAddress, decimals, isOwnerRenounced, tokenName, tokenSymbol, totalSupply }, transfer { tokenContractApprovalSuccess, tokenTransferredToContractSuccess, userApprovalSuccess }, uuid, uuidHashKey
207
+ `subscription OnLaunchpadTokenEventBatch {
208
+ onLaunchpadTokenEventBatch {
209
+ address
210
+ buyCount1
211
+ eventType
212
+ holders
213
+ marketCap
214
+ networkId
215
+ price
216
+ protocol
217
+ sellCount1
218
+ token {
219
+ address
220
+ cmcId
221
+ createBlockNumber
222
+ createTransactionHash
223
+ createdAt
224
+ creatorAddress
225
+ decimals
226
+ exchanges {
227
+ address
228
+ color
229
+ exchangeVersion
230
+ iconUrl
231
+ id
232
+ name
233
+ networkId
234
+ tradeUrl
235
+ }
236
+ freezable
237
+ id
238
+ info {
239
+ address
240
+ circulatingSupply
241
+ cmcId
242
+ description
243
+ id
244
+ imageBannerUrl
245
+ imageLargeUrl
246
+ imageSmallUrl
247
+ imageThumbUrl
248
+ isScam
249
+ name
250
+ networkId
251
+ symbol
252
+ totalSupply
253
+ }
254
+ isScam
255
+ launchpad {
256
+ completed
257
+ completedAt
258
+ completedSlot
259
+ graduationPercent
260
+ launchpadProtocol
261
+ migrated
262
+ migratedAt
263
+ migratedPoolAddress
264
+ migratedSlot
265
+ name
266
+ poolAddress
267
+ }
268
+ mintable
269
+ name
270
+ networkId
271
+ socialLinks {
272
+ bitcointalk
273
+ blog
274
+ coingecko
275
+ coinmarketcap
276
+ discord
277
+ email
278
+ facebook
279
+ github
280
+ instagram
281
+ linkedin
282
+ reddit
283
+ slack
284
+ telegram
285
+ twitch
286
+ twitter
287
+ website
288
+ wechat
289
+ whitepaper
290
+ youtube
291
+ }
292
+ symbol
293
+ }
294
+ transactions1
295
+ volume1
296
+ }
297
+ }
298
+ `,
299
+ vars,
300
+ sink,
301
+ );
302
+ onNftAssetsCreated = async (
303
+ vars: OnNftAssetsCreatedSubscriptionVariables,
304
+ sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
305
+ ) =>
306
+ this.sdk.subscribe(
307
+ `subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
308
+ onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
309
+ 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
230
310
  }
231
311
  }`,
232
312
  vars,
@@ -250,61 +330,113 @@ export class Subscribe {
250
330
  sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
251
331
  ) =>
252
332
  this.sdk.subscribe(
253
- `subscription OnEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
254
- onEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
255
- 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 }, id, networkId, quoteToken
333
+ `subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
334
+ onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
335
+ 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 }, id, networkId, quoteToken
256
336
  }
257
337
  }`,
258
338
  vars,
259
339
  sink,
260
340
  );
261
- onBarsUpdated = async (
262
- vars: OnBarsUpdatedSubscriptionVariables,
263
- sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
341
+ onNftEventsCreated = async (
342
+ vars: OnNftEventsCreatedSubscriptionVariables,
343
+ sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
264
344
  ) =>
265
345
  this.sdk.subscribe(
266
- `subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
267
- onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken, statsType: $statsType) {
268
- 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
346
+ `subscription OnNftEventsCreated($address: String, $networkId: Int) {
347
+ onNftEventsCreated (address: $address, networkId: $networkId) {
348
+ 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
269
349
  }
270
350
  }`,
271
351
  vars,
272
352
  sink,
273
353
  );
274
- onNftAssetsCreated = async (
275
- vars: OnNftAssetsCreatedSubscriptionVariables,
276
- sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
354
+ onUnconfirmedEventsCreated = async (
355
+ vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
356
+ sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
277
357
  ) =>
278
358
  this.sdk.subscribe(
279
- `subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
280
- onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
281
- 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
359
+ `subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
360
+ onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
361
+ address, events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, id, networkId, quoteToken
282
362
  }
283
363
  }`,
284
364
  vars,
285
365
  sink,
286
366
  );
287
- onDetailedStatsUpdated = async (
288
- vars: OnDetailedStatsUpdatedSubscriptionVariables,
289
- sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
367
+ onPriceUpdated = async (
368
+ vars: OnPriceUpdatedSubscriptionVariables,
369
+ sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
290
370
  ) =>
291
371
  this.sdk.subscribe(
292
- `subscription OnDetailedStatsUpdated($pairId: String, $statsType: TokenPairStatisticsType, $tokenOfInterest: TokenOfInterest) {
293
- onDetailedStatsUpdated (pairId: $pairId, statsType: $statsType, tokenOfInterest: $tokenOfInterest) {
294
- 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
372
+ `subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
373
+ onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
374
+ address, confidence, networkId, poolAddress, priceUsd, timestamp
295
375
  }
296
376
  }`,
297
377
  vars,
298
378
  sink,
299
379
  );
300
- onPricesUpdated = async (
301
- vars: OnPricesUpdatedSubscriptionVariables,
302
- sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
380
+ onNftPoolEventsCreated = async (
381
+ vars: OnNftPoolEventsCreatedSubscriptionVariables,
382
+ sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
303
383
  ) =>
304
384
  this.sdk.subscribe(
305
- `subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
306
- onPricesUpdated (input: $input) {
307
- address, confidence, networkId, poolAddress, priceUsd, timestamp
385
+ `subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
386
+ onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
387
+ 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
388
+ }
389
+ }`,
390
+ vars,
391
+ sink,
392
+ );
393
+ onHoldersUpdated = async (
394
+ vars: OnHoldersUpdatedSubscriptionVariables,
395
+ sink: Sink<ExecutionResult<OnHoldersUpdatedSubscription>>,
396
+ ) =>
397
+ this.sdk.subscribe(
398
+ `subscription OnHoldersUpdated($tokenId: String!) {
399
+ onHoldersUpdated (tokenId: $tokenId) {
400
+ balances { address, balance, firstHeldTimestamp, networkId, shiftedBalance, tokenAddress, tokenId, walletId }, holders, networkId, tokenAddress, tokenId
401
+ }
402
+ }`,
403
+ vars,
404
+ sink,
405
+ );
406
+ onBarsUpdated = async (
407
+ vars: OnBarsUpdatedSubscriptionVariables,
408
+ sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
409
+ ) =>
410
+ this.sdk.subscribe(
411
+ `subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
412
+ onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken, statsType: $statsType) {
413
+ 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
414
+ }
415
+ }`,
416
+ vars,
417
+ sink,
418
+ );
419
+ onTokenEventsCreated = async (
420
+ vars: OnTokenEventsCreatedSubscriptionVariables,
421
+ sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
422
+ ) =>
423
+ this.sdk.subscribe(
424
+ `subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
425
+ onTokenEventsCreated (input: $input) {
426
+ 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 }, id
427
+ }
428
+ }`,
429
+ vars,
430
+ sink,
431
+ );
432
+ onPairMetadataUpdated = async (
433
+ vars: OnPairMetadataUpdatedSubscriptionVariables,
434
+ sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
435
+ ) =>
436
+ this.sdk.subscribe(
437
+ `subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
438
+ onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, statsType: $statsType) {
439
+ 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, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, 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, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, 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
308
440
  }
309
441
  }`,
310
442
  vars,