@codex-data/sdk 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/dist/resources/graphql.d.ts +1346 -16
  2. package/dist/resources/graphql.d.ts.map +1 -1
  3. package/dist/resources/graphql.js +198 -2
  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 +53 -49
  10. package/dist/sdk/Query.d.ts.map +1 -1
  11. package/dist/sdk/Query.js +52 -48
  12. package/dist/sdk/Query.js.map +1 -1
  13. package/dist/sdk/Subscribe.d.ts +18 -16
  14. package/dist/sdk/Subscribe.d.ts.map +1 -1
  15. package/dist/sdk/Subscribe.js +94 -80
  16. package/dist/sdk/Subscribe.js.map +1 -1
  17. package/dist/sdk/generated/gql.d.ts +98 -52
  18. package/dist/sdk/generated/gql.d.ts.map +1 -1
  19. package/dist/sdk/generated/gql.js +30 -24
  20. package/dist/sdk/generated/gql.js.map +1 -1
  21. package/dist/sdk/generated/graphql.d.ts +2582 -225
  22. package/dist/sdk/generated/graphql.d.ts.map +1 -1
  23. package/dist/sdk/generated/graphql.js +230 -28
  24. package/dist/sdk/generated/graphql.js.map +1 -1
  25. package/dist/sdk/index.d.ts +11 -3
  26. package/dist/sdk/index.d.ts.map +1 -1
  27. package/dist/sdk/index.js +33 -19
  28. package/dist/sdk/index.js.map +1 -1
  29. package/dist/sdk/index.test.js +2 -2
  30. package/dist/sdk/index.test.js.map +1 -1
  31. package/package.json +1 -2
  32. package/src/resources/generated_queries/Balances.graphql +78 -0
  33. package/src/resources/generated_queries/DetailedWalletStats.graphql +197 -0
  34. package/src/resources/generated_queries/FilterPairs.graphql +4 -4
  35. package/src/resources/generated_queries/FilterTokenWallets.graphql +139 -0
  36. package/src/resources/generated_queries/FilterTokens.graphql +4 -3
  37. package/src/resources/generated_queries/FilterWallets.graphql +56 -0
  38. package/src/resources/generated_queries/GetBars.graphql +2 -2
  39. package/src/resources/generated_queries/GetCommunityNotes.graphql +1 -1
  40. package/src/resources/generated_queries/GetDetailedPairStats.graphql +2 -2
  41. package/src/resources/generated_queries/GetDetailedPairsStats.graphql +2 -2
  42. package/src/resources/generated_queries/GetTokenEvents.graphql +1 -0
  43. package/src/resources/generated_queries/GetTokenEventsForMaker.graphql +1 -0
  44. package/src/resources/generated_queries/Holders.graphql +78 -0
  45. package/src/resources/generated_queries/LiquidityLocks.graphql +7 -1
  46. package/src/resources/generated_queries/LiquidityMetadataByToken.graphql +19 -0
  47. package/src/resources/generated_queries/ListPairsForToken.graphql +2 -2
  48. package/src/resources/generated_queries/ListPairsWithMetadataForToken.graphql +4 -4
  49. package/src/resources/generated_queries/PairMetadata.graphql +2 -2
  50. package/src/resources/generated_queries/PrimeHolders.graphql +78 -0
  51. package/src/resources/generated_queries/Token.graphql +1 -1
  52. package/src/resources/generated_queries/Tokens.graphql +1 -1
  53. package/src/resources/generated_queries/WalletChart.graphql +19 -0
  54. package/src/resources/generated_subscriptions/OnBalanceUpdated.graphql +78 -0
  55. package/src/resources/generated_subscriptions/OnEventsCreated.graphql +3 -0
  56. package/{dist/resources/generated_subscriptions/OnTokenEventsCreated.graphql → src/resources/generated_subscriptions/OnEventsCreatedByMaker.graphql} +4 -3
  57. package/src/resources/generated_subscriptions/OnHoldersUpdated.graphql +78 -0
  58. package/src/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +1 -1
  59. package/src/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +2 -2
  60. package/src/resources/generated_subscriptions/OnTokenEventsCreated.graphql +1 -0
  61. package/{dist/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql → src/resources/generated_subscriptions/OnUnconfirmedEventsCreatedByMaker.graphql} +4 -13
  62. package/src/resources/graphql.schema.json +13537 -5050
  63. package/src/resources/graphql.ts +1406 -16
  64. package/src/resources/schema.graphql +1942 -85
  65. package/src/sdk/Mutation.ts +2 -2
  66. package/src/sdk/Query.ts +122 -105
  67. package/src/sdk/Subscribe.ts +164 -134
  68. package/src/sdk/generated/gql.ts +78 -48
  69. package/src/sdk/generated/graphql.ts +1512 -73
  70. package/src/sdk/index.test.ts +3 -3
  71. package/src/sdk/index.ts +69 -18
  72. package/dist/resources/generated_mutations/CreateApiTokens.graphql +0 -9
  73. package/dist/resources/generated_mutations/CreateWebhooks.graphql +0 -472
  74. package/dist/resources/generated_mutations/DeleteApiToken.graphql +0 -3
  75. package/dist/resources/generated_mutations/DeleteWebhooks.graphql +0 -5
  76. package/dist/resources/generated_queries/ApiToken.graphql +0 -9
  77. package/dist/resources/generated_queries/ApiTokens.graphql +0 -9
  78. package/dist/resources/generated_queries/Balances.graphql +0 -15
  79. package/dist/resources/generated_queries/ChartUrls.graphql +0 -7
  80. package/dist/resources/generated_queries/FilterExchanges.graphql +0 -43
  81. package/dist/resources/generated_queries/FilterNftCollections.graphql +0 -569
  82. package/dist/resources/generated_queries/FilterNftParallelAssets.graphql +0 -60
  83. package/dist/resources/generated_queries/FilterNftPoolCollections.graphql +0 -71
  84. package/dist/resources/generated_queries/FilterNftPools.graphql +0 -124
  85. package/dist/resources/generated_queries/FilterPairs.graphql +0 -419
  86. package/dist/resources/generated_queries/FilterTokens.graphql +0 -356
  87. package/dist/resources/generated_queries/GetBars.graphql +0 -212
  88. package/dist/resources/generated_queries/GetCommunityNotes.graphql +0 -135
  89. package/dist/resources/generated_queries/GetDetailedNftStats.graphql +0 -831
  90. package/dist/resources/generated_queries/GetDetailedPairStats.graphql +0 -970
  91. package/dist/resources/generated_queries/GetDetailedPairsStats.graphql +0 -954
  92. package/dist/resources/generated_queries/GetEventLabels.graphql +0 -35
  93. package/dist/resources/generated_queries/GetExchanges.graphql +0 -12
  94. package/dist/resources/generated_queries/GetNetworkStats.graphql +0 -20
  95. package/dist/resources/generated_queries/GetNetworkStatus.graphql +0 -8
  96. package/dist/resources/generated_queries/GetNetworks.graphql +0 -7
  97. package/dist/resources/generated_queries/GetNftAssets.graphql +0 -59
  98. package/dist/resources/generated_queries/GetNftCollectionMetadata.graphql +0 -75
  99. package/dist/resources/generated_queries/GetNftContracts.graphql +0 -39
  100. package/dist/resources/generated_queries/GetNftEvents.graphql +0 -100
  101. package/dist/resources/generated_queries/GetNftPool.graphql +0 -74
  102. package/dist/resources/generated_queries/GetNftPoolCollection.graphql +0 -33
  103. package/dist/resources/generated_queries/GetNftPoolCollectionsByExchange.graphql +0 -38
  104. package/dist/resources/generated_queries/GetNftPoolEvents.graphql +0 -416
  105. package/dist/resources/generated_queries/GetNftPoolStats.graphql +0 -40
  106. package/dist/resources/generated_queries/GetNftPoolsByCollectionAndExchange.graphql +0 -89
  107. package/dist/resources/generated_queries/GetNftPoolsByOwner.graphql +0 -89
  108. package/dist/resources/generated_queries/GetParallelCardChanges.graphql +0 -57
  109. package/dist/resources/generated_queries/GetPrimePoolAssets.graphql +0 -32
  110. package/dist/resources/generated_queries/GetPrimePoolEvents.graphql +0 -156
  111. package/dist/resources/generated_queries/GetPrimePools.graphql +0 -62
  112. package/dist/resources/generated_queries/GetSimulateTokenContractResults.graphql +0 -128
  113. package/dist/resources/generated_queries/GetSymbol.graphql +0 -11
  114. package/dist/resources/generated_queries/GetTokenEvents.graphql +0 -101
  115. package/dist/resources/generated_queries/GetTokenEventsForMaker.graphql +0 -101
  116. package/dist/resources/generated_queries/GetTokenPrices.graphql +0 -10
  117. package/dist/resources/generated_queries/GetWebhooks.graphql +0 -134
  118. package/dist/resources/generated_queries/Holders.graphql +0 -18
  119. package/dist/resources/generated_queries/LiquidityLocks.graphql +0 -26
  120. package/dist/resources/generated_queries/LiquidityMetadata.graphql +0 -17
  121. package/dist/resources/generated_queries/ListPairsForToken.graphql +0 -173
  122. package/dist/resources/generated_queries/ListPairsWithMetadataForToken.graphql +0 -346
  123. package/dist/resources/generated_queries/ListTopTokens.graphql +0 -55
  124. package/dist/resources/generated_queries/NftHolders.graphql +0 -12
  125. package/dist/resources/generated_queries/PairMetadata.graphql +0 -229
  126. package/dist/resources/generated_queries/PrimeHolders.graphql +0 -16
  127. package/dist/resources/generated_queries/SearchNfts.graphql +0 -35
  128. package/dist/resources/generated_queries/Token.graphql +0 -78
  129. package/dist/resources/generated_queries/TokenLifecycleEvents.graphql +0 -34
  130. package/dist/resources/generated_queries/TokenSparklines.graphql +0 -10
  131. package/dist/resources/generated_queries/TokenTopTraders.graphql +0 -26
  132. package/dist/resources/generated_queries/Tokens.graphql +0 -78
  133. package/dist/resources/generated_queries/Top10HoldersPercent.graphql +0 -3
  134. package/dist/resources/generated_queries/WalletNftCollectionAssets.graphql +0 -11
  135. package/dist/resources/generated_queries/WalletNftCollections.graphql +0 -10
  136. package/dist/resources/generated_subscriptions/OnBalanceUpdated.graphql +0 -12
  137. package/dist/resources/generated_subscriptions/OnBarsUpdated.graphql +0 -555
  138. package/dist/resources/generated_subscriptions/OnDetailedStatsUpdated.graphql +0 -332
  139. package/dist/resources/generated_subscriptions/OnEventLabelCreated.graphql +0 -22
  140. package/dist/resources/generated_subscriptions/OnEventsCreated.graphql +0 -104
  141. package/dist/resources/generated_subscriptions/OnHoldersUpdated.graphql +0 -18
  142. package/dist/resources/generated_subscriptions/OnLatestPairUpdated.graphql +0 -42
  143. package/dist/resources/generated_subscriptions/OnLatestTokens.graphql +0 -37
  144. package/dist/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +0 -91
  145. package/dist/resources/generated_subscriptions/OnLaunchpadTokenEventBatch.graphql +0 -91
  146. package/dist/resources/generated_subscriptions/OnNftAssetsCreated.graphql +0 -42
  147. package/dist/resources/generated_subscriptions/OnNftEventsCreated.graphql +0 -82
  148. package/dist/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +0 -412
  149. package/dist/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +0 -229
  150. package/dist/resources/generated_subscriptions/OnPriceUpdated.graphql +0 -18
  151. package/dist/resources/generated_subscriptions/OnPricesUpdated.graphql +0 -10
  152. package/dist/resources/generated_subscriptions/OnSimulateTokenContract.graphql +0 -121
  153. package/dist/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +0 -556
  154. package/dist/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +0 -30
  155. package/dist/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +0 -70
  156. package/dist/resources/graphql.schema.json +0 -56135
  157. package/dist/resources/graphql.ts +0 -9024
  158. package/dist/resources/mutations_override/CreateWebhooks.graphql +0 -472
  159. package/dist/resources/queries_override/GetEventLabels.graphql +0 -35
  160. package/dist/resources/queries_override/GetWebhooks.graphql +0 -134
  161. package/dist/resources/schema.graphql +0 -12013
  162. package/dist/resources/subscriptions_override/OnEventLabelCreated.graphql +0 -22
  163. package/dist/resources/subscriptions_override/OnLaunchpadTokenEventBatch.graphql +0 -91
  164. package/src/resources/generated_queries/ListTopTokens.graphql +0 -55
@@ -10,6 +10,8 @@ import {
10
10
  OnDetailedStatsUpdatedSubscriptionVariables,
11
11
  OnEventLabelCreatedSubscription,
12
12
  OnEventLabelCreatedSubscriptionVariables,
13
+ OnEventsCreatedByMakerSubscription,
14
+ OnEventsCreatedByMakerSubscriptionVariables,
13
15
  OnEventsCreatedSubscription,
14
16
  OnEventsCreatedSubscriptionVariables,
15
17
  OnHoldersUpdatedSubscription,
@@ -44,6 +46,8 @@ import {
44
46
  OnTokenLifecycleEventsCreatedSubscriptionVariables,
45
47
  OnUnconfirmedBarsUpdatedSubscription,
46
48
  OnUnconfirmedBarsUpdatedSubscriptionVariables,
49
+ OnUnconfirmedEventsCreatedByMakerSubscription,
50
+ OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
47
51
  OnUnconfirmedEventsCreatedSubscription,
48
52
  OnUnconfirmedEventsCreatedSubscriptionVariables,
49
53
  } from "./generated/graphql";
@@ -51,40 +55,79 @@ import { Codex } from "./index";
51
55
 
52
56
  export class Subscribe {
53
57
  constructor(private sdk: Codex) {}
54
- onTokenBarsUpdated = async (
55
- vars: OnTokenBarsUpdatedSubscriptionVariables,
56
- sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
58
+ onLaunchpadTokenEvent = async (
59
+ vars: OnLaunchpadTokenEventSubscriptionVariables,
60
+ sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
57
61
  ) =>
58
62
  this.sdk.subscribe(
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
63
+ `subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
64
+ onLaunchpadTokenEvent (input: $input) {
65
+ 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
62
66
  }
63
67
  }`,
64
68
  vars,
65
69
  sink,
66
70
  );
67
- onLatestTokens = async (
68
- vars: OnLatestTokensSubscriptionVariables,
69
- sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
71
+ onNftEventsCreated = async (
72
+ vars: OnNftEventsCreatedSubscriptionVariables,
73
+ sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
70
74
  ) =>
71
75
  this.sdk.subscribe(
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
76
+ `subscription OnNftEventsCreated($address: String, $networkId: Int) {
77
+ onNftEventsCreated (address: $address, networkId: $networkId) {
78
+ 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
75
79
  }
76
80
  }`,
77
81
  vars,
78
82
  sink,
79
83
  );
80
- onTokenLifecycleEventsCreated = async (
81
- vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
82
- sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
84
+ onUnconfirmedEventsCreatedByMaker = async (
85
+ vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
86
+ sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
83
87
  ) =>
84
88
  this.sdk.subscribe(
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
89
+ `subscription OnUnconfirmedEventsCreatedByMaker($input: OnUnconfirmedEventsCreatedByMakerInput!) {
90
+ onUnconfirmedEventsCreatedByMaker (input: $input) {
91
+ 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
92
+ }
93
+ }`,
94
+ vars,
95
+ sink,
96
+ );
97
+ onNftAssetsCreated = async (
98
+ vars: OnNftAssetsCreatedSubscriptionVariables,
99
+ sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
100
+ ) =>
101
+ this.sdk.subscribe(
102
+ `subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
103
+ onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
104
+ 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
105
+ }
106
+ }`,
107
+ vars,
108
+ sink,
109
+ );
110
+ onSimulateTokenContract = async (
111
+ vars: OnSimulateTokenContractSubscriptionVariables,
112
+ sink: Sink<ExecutionResult<OnSimulateTokenContractSubscription>>,
113
+ ) =>
114
+ this.sdk.subscribe(
115
+ `subscription OnSimulateTokenContract($contractAddress: String, $networkId: Int!, $simulationId: String) {
116
+ onSimulateTokenContract (contractAddress: $contractAddress, networkId: $networkId, simulationId: $simulationId) {
117
+ 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
118
+ }
119
+ }`,
120
+ vars,
121
+ sink,
122
+ );
123
+ onBarsUpdated = async (
124
+ vars: OnBarsUpdatedSubscriptionVariables,
125
+ sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
126
+ ) =>
127
+ this.sdk.subscribe(
128
+ `subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
129
+ onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken, statsType: $statsType) {
130
+ 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
88
131
  }
89
132
  }`,
90
133
  vars,
@@ -121,14 +164,14 @@ export class Subscribe {
121
164
  vars,
122
165
  sink,
123
166
  );
124
- onLaunchpadTokenEvent = async (
125
- vars: OnLaunchpadTokenEventSubscriptionVariables,
126
- sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
167
+ onNftPoolEventsCreated = async (
168
+ vars: OnNftPoolEventsCreatedSubscriptionVariables,
169
+ sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
127
170
  ) =>
128
171
  this.sdk.subscribe(
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
172
+ `subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
173
+ onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
174
+ 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
132
175
  }
133
176
  }`,
134
177
  vars,
@@ -147,14 +190,79 @@ export class Subscribe {
147
190
  vars,
148
191
  sink,
149
192
  );
150
- onBalanceUpdated = async (
151
- vars: OnBalanceUpdatedSubscriptionVariables,
152
- sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
193
+ onUnconfirmedEventsCreated = async (
194
+ vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
195
+ sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
153
196
  ) =>
154
197
  this.sdk.subscribe(
155
- `subscription OnBalanceUpdated($walletAddress: String!) {
156
- onBalanceUpdated (walletAddress: $walletAddress) {
157
- address, balance, firstHeldTimestamp, networkId, shiftedBalance, tokenAddress, tokenId, walletId
198
+ `subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
199
+ onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
200
+ 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
201
+ }
202
+ }`,
203
+ vars,
204
+ sink,
205
+ );
206
+ onLatestPairUpdated = async (
207
+ vars: OnLatestPairUpdatedSubscriptionVariables,
208
+ sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
209
+ ) =>
210
+ this.sdk.subscribe(
211
+ `subscription OnLatestPairUpdated($id: String, $networkId: Int) {
212
+ onLatestPairUpdated (id: $id, networkId: $networkId) {
213
+ address, exchangeHash, id, initialPriceUsd, liquidAt, liquidity, liquidityToken, networkId, newToken, nonLiquidityToken, oldToken, priceChange, priceUsd, token0 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, token1 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, transactionHash
214
+ }
215
+ }`,
216
+ vars,
217
+ sink,
218
+ );
219
+ onTokenBarsUpdated = async (
220
+ vars: OnTokenBarsUpdatedSubscriptionVariables,
221
+ sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
222
+ ) =>
223
+ this.sdk.subscribe(
224
+ `subscription OnTokenBarsUpdated($networkId: Int, $statsType: TokenPairStatisticsType, $tokenId: String) {
225
+ onTokenBarsUpdated (networkId: $networkId, statsType: $statsType, tokenId: $tokenId) {
226
+ 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
227
+ }
228
+ }`,
229
+ vars,
230
+ sink,
231
+ );
232
+ onPairMetadataUpdated = async (
233
+ vars: OnPairMetadataUpdatedSubscriptionVariables,
234
+ sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
235
+ ) =>
236
+ this.sdk.subscribe(
237
+ `subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
238
+ onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, statsType: $statsType) {
239
+ 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
240
+ }
241
+ }`,
242
+ vars,
243
+ sink,
244
+ );
245
+ onEventsCreated = async (
246
+ vars: OnEventsCreatedSubscriptionVariables,
247
+ sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
248
+ ) =>
249
+ this.sdk.subscribe(
250
+ `subscription OnEventsCreated($address: String, $id: String, $maker: String, $networkId: Int, $quoteToken: QuoteToken) {
251
+ onEventsCreated (address: $address, id: $id, maker: $maker, networkId: $networkId, quoteToken: $quoteToken) {
252
+ 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
253
+ }
254
+ }`,
255
+ vars,
256
+ sink,
257
+ );
258
+ onEventsCreatedByMaker = async (
259
+ vars: OnEventsCreatedByMakerSubscriptionVariables,
260
+ sink: Sink<ExecutionResult<OnEventsCreatedByMakerSubscription>>,
261
+ ) =>
262
+ this.sdk.subscribe(
263
+ `subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
264
+ onEventsCreatedByMaker (input: $input) {
265
+ 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
158
266
  }
159
267
  }`,
160
268
  vars,
@@ -186,14 +294,14 @@ export class Subscribe {
186
294
  vars,
187
295
  sink,
188
296
  );
189
- onSimulateTokenContract = async (
190
- vars: OnSimulateTokenContractSubscriptionVariables,
191
- sink: Sink<ExecutionResult<OnSimulateTokenContractSubscription>>,
297
+ onPriceUpdated = async (
298
+ vars: OnPriceUpdatedSubscriptionVariables,
299
+ sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
192
300
  ) =>
193
301
  this.sdk.subscribe(
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
302
+ `subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
303
+ onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
304
+ address, confidence, networkId, poolAddress, priceUsd, timestamp
197
305
  }
198
306
  }`,
199
307
  vars,
@@ -299,92 +407,14 @@ export class Subscribe {
299
407
  vars,
300
408
  sink,
301
409
  );
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
310
- }
311
- }`,
312
- vars,
313
- sink,
314
- );
315
- onLatestPairUpdated = async (
316
- vars: OnLatestPairUpdatedSubscriptionVariables,
317
- sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
318
- ) =>
319
- this.sdk.subscribe(
320
- `subscription OnLatestPairUpdated($id: String, $networkId: Int) {
321
- onLatestPairUpdated (id: $id, networkId: $networkId) {
322
- address, exchangeHash, id, initialPriceUsd, liquidAt, liquidity, liquidityToken, networkId, newToken, nonLiquidityToken, oldToken, priceChange, priceUsd, token0 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, token1 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, transactionHash
323
- }
324
- }`,
325
- vars,
326
- sink,
327
- );
328
- onEventsCreated = async (
329
- vars: OnEventsCreatedSubscriptionVariables,
330
- sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
331
- ) =>
332
- this.sdk.subscribe(
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
336
- }
337
- }`,
338
- vars,
339
- sink,
340
- );
341
- onNftEventsCreated = async (
342
- vars: OnNftEventsCreatedSubscriptionVariables,
343
- sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
344
- ) =>
345
- this.sdk.subscribe(
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
349
- }
350
- }`,
351
- vars,
352
- sink,
353
- );
354
- onUnconfirmedEventsCreated = async (
355
- vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
356
- sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
357
- ) =>
358
- this.sdk.subscribe(
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
362
- }
363
- }`,
364
- vars,
365
- sink,
366
- );
367
- onPriceUpdated = async (
368
- vars: OnPriceUpdatedSubscriptionVariables,
369
- sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
370
- ) =>
371
- this.sdk.subscribe(
372
- `subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
373
- onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
374
- address, confidence, networkId, poolAddress, priceUsd, timestamp
375
- }
376
- }`,
377
- vars,
378
- sink,
379
- );
380
- onNftPoolEventsCreated = async (
381
- vars: OnNftPoolEventsCreatedSubscriptionVariables,
382
- sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
410
+ onTokenLifecycleEventsCreated = async (
411
+ vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
412
+ sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
383
413
  ) =>
384
414
  this.sdk.subscribe(
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
415
+ `subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
416
+ onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
417
+ events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
388
418
  }
389
419
  }`,
390
420
  vars,
@@ -397,20 +427,20 @@ export class Subscribe {
397
427
  this.sdk.subscribe(
398
428
  `subscription OnHoldersUpdated($tokenId: String!) {
399
429
  onHoldersUpdated (tokenId: $tokenId) {
400
- balances { address, balance, firstHeldTimestamp, networkId, shiftedBalance, tokenAddress, tokenId, walletId }, holders, networkId, tokenAddress, tokenId
430
+ 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
401
431
  }
402
432
  }`,
403
433
  vars,
404
434
  sink,
405
435
  );
406
- onBarsUpdated = async (
407
- vars: OnBarsUpdatedSubscriptionVariables,
408
- sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
436
+ onLatestTokens = async (
437
+ vars: OnLatestTokensSubscriptionVariables,
438
+ sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
409
439
  ) =>
410
440
  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
441
+ `subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
442
+ onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
443
+ 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
414
444
  }
415
445
  }`,
416
446
  vars,
@@ -423,20 +453,20 @@ export class Subscribe {
423
453
  this.sdk.subscribe(
424
454
  `subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
425
455
  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
456
+ 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
427
457
  }
428
458
  }`,
429
459
  vars,
430
460
  sink,
431
461
  );
432
- onPairMetadataUpdated = async (
433
- vars: OnPairMetadataUpdatedSubscriptionVariables,
434
- sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
462
+ onBalanceUpdated = async (
463
+ vars: OnBalanceUpdatedSubscriptionVariables,
464
+ sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
435
465
  ) =>
436
466
  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
467
+ `subscription OnBalanceUpdated($walletAddress: String!) {
468
+ onBalanceUpdated (walletAddress: $walletAddress) {
469
+ 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
440
470
  }
441
471
  }`,
442
472
  vars,