@codex-data/sdk 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/resources/graphql.d.ts +179 -683
- package/dist/resources/graphql.d.ts.map +1 -1
- package/dist/resources/graphql.js +67 -79
- package/dist/resources/graphql.js.map +1 -1
- package/dist/sdk/Mutation.d.ts +1 -1
- package/dist/sdk/Mutation.d.ts.map +1 -1
- package/dist/sdk/Mutation.js +1 -1
- package/dist/sdk/Mutation.js.map +1 -1
- package/dist/sdk/Query.d.ts +56 -51
- package/dist/sdk/Query.d.ts.map +1 -1
- package/dist/sdk/Query.js +55 -50
- package/dist/sdk/Query.js.map +1 -1
- package/dist/sdk/Subscribe.d.ts +19 -20
- package/dist/sdk/Subscribe.d.ts.map +1 -1
- package/dist/sdk/Subscribe.js +91 -98
- package/dist/sdk/Subscribe.js.map +1 -1
- package/dist/sdk/generated/gql.d.ts +135 -101
- package/dist/sdk/generated/gql.d.ts.map +1 -1
- package/dist/sdk/generated/gql.js +44 -40
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +1614 -1105
- package/dist/sdk/generated/graphql.d.ts.map +1 -1
- package/dist/sdk/generated/graphql.js +113 -121
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/package.json +2 -2
- package/src/resources/generated_queries/Balances.graphql +15 -0
- package/src/resources/generated_queries/DetailedWalletStats.graphql +4 -0
- package/src/resources/generated_queries/FilterNetworkWallets.graphql +57 -0
- package/src/resources/generated_queries/FilterNftPoolCollections.graphql +8 -0
- package/src/resources/generated_queries/FilterNftPools.graphql +7 -0
- package/src/resources/generated_queries/FilterPairs.graphql +60 -0
- package/src/resources/generated_queries/FilterTokenWallets.graphql +16 -0
- package/src/resources/generated_queries/FilterTokens.graphql +47 -0
- package/src/resources/generated_queries/FilterWallets.graphql +1 -0
- package/src/resources/generated_queries/GetBars.graphql +31 -0
- package/src/resources/generated_queries/GetCommunityNotes.graphql +16 -0
- package/src/resources/generated_queries/GetDetailedPairStats.graphql +30 -0
- package/src/resources/generated_queries/GetDetailedPairsStats.graphql +30 -0
- package/src/resources/generated_queries/GetDetailedStats.graphql +338 -0
- package/src/resources/generated_queries/GetLatestPairs.graphql +57 -0
- package/src/resources/generated_queries/GetLatestTokens.graphql +39 -0
- package/src/resources/generated_queries/GetNftEvents.graphql +9 -0
- package/src/resources/generated_queries/GetNftPool.graphql +2 -0
- package/src/resources/generated_queries/GetNftPoolCollection.graphql +8 -0
- package/src/resources/generated_queries/GetNftPoolCollectionsByExchange.graphql +8 -0
- package/src/resources/generated_queries/GetNftPoolEvents.graphql +2 -0
- package/src/resources/generated_queries/GetNftPoolsByCollectionAndExchange.graphql +2 -0
- package/src/resources/generated_queries/GetNftPoolsByOwner.graphql +2 -0
- package/src/resources/generated_queries/Holders.graphql +15 -0
- package/src/resources/generated_queries/LiquidityLocks.graphql +1 -0
- package/src/resources/generated_queries/ListPairsForToken.graphql +30 -0
- package/src/resources/generated_queries/ListPairsWithMetadataForToken.graphql +60 -0
- package/src/resources/generated_queries/ListTopTokens.graphql +55 -0
- package/src/resources/generated_queries/PairMetadata.graphql +30 -0
- package/src/resources/generated_queries/PrimeHolders.graphql +15 -0
- package/src/resources/generated_queries/SearchTokens.graphql +67 -0
- package/src/resources/generated_queries/Token.graphql +15 -0
- package/src/resources/generated_queries/Tokens.graphql +15 -0
- package/src/resources/generated_queries/WalletChart.graphql +1 -0
- package/src/resources/generated_subscriptions/OnBalanceUpdated.graphql +15 -0
- package/src/resources/generated_subscriptions/OnBarsUpdated.graphql +2 -10
- package/src/resources/generated_subscriptions/OnDetailedStatsUpdated.graphql +1 -6
- package/src/resources/generated_subscriptions/OnEventsCreated.graphql +0 -2
- package/src/resources/generated_subscriptions/OnHoldersUpdated.graphql +15 -0
- package/src/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +15 -0
- package/src/resources/generated_subscriptions/OnNftEventsCreated.graphql +9 -0
- package/src/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +2 -0
- package/src/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +32 -10
- package/src/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +2 -10
- package/src/resources/graphql.schema.json +522 -5208
- package/src/resources/graphql.ts +185 -745
- package/src/resources/schema.graphql +6755 -11061
- package/src/sdk/Mutation.ts +2 -2
- package/src/sdk/Query.ts +126 -107
- package/src/sdk/Subscribe.ts +149 -164
- package/src/sdk/generated/gql.ts +106 -86
- package/src/sdk/generated/graphql.ts +322 -844
- package/src/resources/generated_queries/GetSimulateTokenContractResults.graphql +0 -128
- package/src/resources/generated_subscriptions/OnSimulateTokenContract.graphql +0 -121
package/src/sdk/Subscribe.ts
CHANGED
|
@@ -36,8 +36,6 @@ import {
|
|
|
36
36
|
OnPricesUpdatedSubscriptionVariables,
|
|
37
37
|
OnPriceUpdatedSubscription,
|
|
38
38
|
OnPriceUpdatedSubscriptionVariables,
|
|
39
|
-
OnSimulateTokenContractSubscription,
|
|
40
|
-
OnSimulateTokenContractSubscriptionVariables,
|
|
41
39
|
OnTokenBarsUpdatedSubscription,
|
|
42
40
|
OnTokenBarsUpdatedSubscriptionVariables,
|
|
43
41
|
OnTokenEventsCreatedSubscription,
|
|
@@ -55,66 +53,53 @@ import { Codex } from "./index";
|
|
|
55
53
|
|
|
56
54
|
export class Subscribe {
|
|
57
55
|
constructor(private sdk: Codex) {}
|
|
58
|
-
|
|
59
|
-
vars:
|
|
60
|
-
sink: Sink<ExecutionResult<
|
|
61
|
-
) =>
|
|
62
|
-
this.sdk.subscribe(
|
|
63
|
-
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
64
|
-
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
65
|
-
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
66
|
-
}
|
|
67
|
-
}`,
|
|
68
|
-
vars,
|
|
69
|
-
sink,
|
|
70
|
-
);
|
|
71
|
-
onNftAssetsCreated = async (
|
|
72
|
-
vars: OnNftAssetsCreatedSubscriptionVariables,
|
|
73
|
-
sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
|
|
56
|
+
onTokenLifecycleEventsCreated = async (
|
|
57
|
+
vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
|
|
58
|
+
sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
|
|
74
59
|
) =>
|
|
75
60
|
this.sdk.subscribe(
|
|
76
|
-
`subscription
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
`subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
|
|
62
|
+
onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
|
|
63
|
+
events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
|
|
79
64
|
}
|
|
80
65
|
}`,
|
|
81
66
|
vars,
|
|
82
67
|
sink,
|
|
83
68
|
);
|
|
84
|
-
|
|
85
|
-
vars:
|
|
86
|
-
sink: Sink<ExecutionResult<
|
|
69
|
+
onNftEventsCreated = async (
|
|
70
|
+
vars: OnNftEventsCreatedSubscriptionVariables,
|
|
71
|
+
sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
|
|
87
72
|
) =>
|
|
88
73
|
this.sdk.subscribe(
|
|
89
|
-
`subscription
|
|
90
|
-
|
|
91
|
-
address,
|
|
74
|
+
`subscription OnNftEventsCreated($address: String, $networkId: Int) {
|
|
75
|
+
onNftEventsCreated (address: $address, networkId: $networkId) {
|
|
76
|
+
address, events { aggregatorAddress, baseTokenAddress, baseTokenPrice, blockNumber, contractAddress, eventType, exchangeAddress, fillSource, id, individualBaseTokenPrice, individualNetworkBaseTokenPrice, individualPrice, individualPriceNetworkBaseToken, individualPriceUsd, individualTokenPrice, individualTradePrice, logIndex, maker, networkBaseTokenPrice, networkId, numberOfTokens, orderDirection, paymentTokenAddress, poolAddress, priceError, sortKey, taker, timestamp, tokenId, tokenPrice, totalPrice, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, tradeOffer { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, tradeReceived { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, transactionHash, transactionIndex }, id, networkId
|
|
92
77
|
}
|
|
93
78
|
}`,
|
|
94
79
|
vars,
|
|
95
80
|
sink,
|
|
96
81
|
);
|
|
97
|
-
|
|
98
|
-
vars:
|
|
99
|
-
sink: Sink<ExecutionResult<
|
|
82
|
+
onLaunchpadTokenEvent = async (
|
|
83
|
+
vars: OnLaunchpadTokenEventSubscriptionVariables,
|
|
84
|
+
sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
|
|
100
85
|
) =>
|
|
101
86
|
this.sdk.subscribe(
|
|
102
|
-
`subscription
|
|
103
|
-
|
|
104
|
-
|
|
87
|
+
`subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
|
|
88
|
+
onLaunchpadTokenEvent (input: $input) {
|
|
89
|
+
address, buyCount1, eventType, holders, marketCap, networkId, price, protocol, sellCount1, token { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, transactions1, volume1
|
|
105
90
|
}
|
|
106
91
|
}`,
|
|
107
92
|
vars,
|
|
108
93
|
sink,
|
|
109
94
|
);
|
|
110
|
-
|
|
111
|
-
vars:
|
|
112
|
-
sink: Sink<ExecutionResult<
|
|
95
|
+
onUnconfirmedBarsUpdated = async (
|
|
96
|
+
vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
|
|
97
|
+
sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
|
|
113
98
|
) =>
|
|
114
99
|
this.sdk.subscribe(
|
|
115
|
-
`subscription
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
101
|
+
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
102
|
+
aggregates { r1 { c, h, l, o, t, v, volume }, r1S { c, h, l, o, t, v, volume }, r5 { c, h, l, o, t, v, volume }, r5S { c, h, l, o, t, v, volume }, r15 { c, h, l, o, t, v, volume }, r15S { c, h, l, o, t, v, volume } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, timestamp
|
|
118
103
|
}
|
|
119
104
|
}`,
|
|
120
105
|
vars,
|
|
@@ -220,53 +205,27 @@ export class Subscribe {
|
|
|
220
205
|
vars,
|
|
221
206
|
sink,
|
|
222
207
|
);
|
|
223
|
-
|
|
224
|
-
vars:
|
|
225
|
-
sink: Sink<ExecutionResult<
|
|
226
|
-
) =>
|
|
227
|
-
this.sdk.subscribe(
|
|
228
|
-
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
229
|
-
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
230
|
-
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
|
|
231
|
-
}
|
|
232
|
-
}`,
|
|
233
|
-
vars,
|
|
234
|
-
sink,
|
|
235
|
-
);
|
|
236
|
-
onNftPoolEventsCreated = async (
|
|
237
|
-
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
238
|
-
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
239
|
-
) =>
|
|
240
|
-
this.sdk.subscribe(
|
|
241
|
-
`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
242
|
-
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
243
|
-
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
|
|
244
|
-
}
|
|
245
|
-
}`,
|
|
246
|
-
vars,
|
|
247
|
-
sink,
|
|
248
|
-
);
|
|
249
|
-
onLaunchpadTokenEvent = async (
|
|
250
|
-
vars: OnLaunchpadTokenEventSubscriptionVariables,
|
|
251
|
-
sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
|
|
208
|
+
onPricesUpdated = async (
|
|
209
|
+
vars: OnPricesUpdatedSubscriptionVariables,
|
|
210
|
+
sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
|
|
252
211
|
) =>
|
|
253
212
|
this.sdk.subscribe(
|
|
254
|
-
`subscription
|
|
255
|
-
|
|
256
|
-
address,
|
|
213
|
+
`subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
|
|
214
|
+
onPricesUpdated (input: $input) {
|
|
215
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
257
216
|
}
|
|
258
217
|
}`,
|
|
259
218
|
vars,
|
|
260
219
|
sink,
|
|
261
220
|
);
|
|
262
|
-
|
|
263
|
-
vars:
|
|
264
|
-
sink: Sink<ExecutionResult<
|
|
221
|
+
onUnconfirmedEventsCreatedByMaker = async (
|
|
222
|
+
vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
|
|
223
|
+
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
|
|
265
224
|
) =>
|
|
266
225
|
this.sdk.subscribe(
|
|
267
|
-
`subscription
|
|
268
|
-
|
|
269
|
-
blockHash, blockNumber,
|
|
226
|
+
`subscription OnUnconfirmedEventsCreatedByMaker($input: OnUnconfirmedEventsCreatedByMakerInput!) {
|
|
227
|
+
onUnconfirmedEventsCreatedByMaker (input: $input) {
|
|
228
|
+
events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, makerAddress
|
|
270
229
|
}
|
|
271
230
|
}`,
|
|
272
231
|
vars,
|
|
@@ -285,118 +244,79 @@ export class Subscribe {
|
|
|
285
244
|
vars,
|
|
286
245
|
sink,
|
|
287
246
|
);
|
|
288
|
-
|
|
289
|
-
vars:
|
|
290
|
-
sink: Sink<ExecutionResult<
|
|
291
|
-
) =>
|
|
292
|
-
this.sdk.subscribe(
|
|
293
|
-
`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
|
|
294
|
-
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, statsType: $statsType) {
|
|
295
|
-
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
|
|
296
|
-
}
|
|
297
|
-
}`,
|
|
298
|
-
vars,
|
|
299
|
-
sink,
|
|
300
|
-
);
|
|
301
|
-
onEventsCreatedByMaker = async (
|
|
302
|
-
vars: OnEventsCreatedByMakerSubscriptionVariables,
|
|
303
|
-
sink: Sink<ExecutionResult<OnEventsCreatedByMakerSubscription>>,
|
|
304
|
-
) =>
|
|
305
|
-
this.sdk.subscribe(
|
|
306
|
-
`subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
|
|
307
|
-
onEventsCreatedByMaker (input: $input) {
|
|
308
|
-
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
|
|
309
|
-
}
|
|
310
|
-
}`,
|
|
311
|
-
vars,
|
|
312
|
-
sink,
|
|
313
|
-
);
|
|
314
|
-
onTokenEventsCreated = async (
|
|
315
|
-
vars: OnTokenEventsCreatedSubscriptionVariables,
|
|
316
|
-
sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
|
|
317
|
-
) =>
|
|
318
|
-
this.sdk.subscribe(
|
|
319
|
-
`subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
|
|
320
|
-
onTokenEventsCreated (input: $input) {
|
|
321
|
-
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
|
|
322
|
-
}
|
|
323
|
-
}`,
|
|
324
|
-
vars,
|
|
325
|
-
sink,
|
|
326
|
-
);
|
|
327
|
-
onUnconfirmedEventsCreatedByMaker = async (
|
|
328
|
-
vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
|
|
329
|
-
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
|
|
247
|
+
onNftAssetsCreated = async (
|
|
248
|
+
vars: OnNftAssetsCreatedSubscriptionVariables,
|
|
249
|
+
sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
|
|
330
250
|
) =>
|
|
331
251
|
this.sdk.subscribe(
|
|
332
|
-
`subscription
|
|
333
|
-
|
|
334
|
-
|
|
252
|
+
`subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
|
|
253
|
+
onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
|
|
254
|
+
address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri
|
|
335
255
|
}
|
|
336
256
|
}`,
|
|
337
257
|
vars,
|
|
338
258
|
sink,
|
|
339
259
|
);
|
|
340
|
-
|
|
341
|
-
vars:
|
|
342
|
-
sink: Sink<ExecutionResult<
|
|
260
|
+
onDetailedStatsUpdated = async (
|
|
261
|
+
vars: OnDetailedStatsUpdatedSubscriptionVariables,
|
|
262
|
+
sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
|
|
343
263
|
) =>
|
|
344
264
|
this.sdk.subscribe(
|
|
345
|
-
`subscription
|
|
346
|
-
|
|
347
|
-
|
|
265
|
+
`subscription OnDetailedStatsUpdated($pairId: String, $tokenOfInterest: TokenOfInterest) {
|
|
266
|
+
onDetailedStatsUpdated (pairId: $pairId, tokenOfInterest: $tokenOfInterest) {
|
|
267
|
+
bucketCount, pairId, queryTimestamp, statsType, stats_day1 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour1 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour4 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour12 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_min5 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, tokenOfInterest
|
|
348
268
|
}
|
|
349
269
|
}`,
|
|
350
270
|
vars,
|
|
351
271
|
sink,
|
|
352
272
|
);
|
|
353
|
-
|
|
354
|
-
vars:
|
|
355
|
-
sink: Sink<ExecutionResult<
|
|
273
|
+
onTokenBarsUpdated = async (
|
|
274
|
+
vars: OnTokenBarsUpdatedSubscriptionVariables,
|
|
275
|
+
sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
|
|
356
276
|
) =>
|
|
357
277
|
this.sdk.subscribe(
|
|
358
|
-
`subscription
|
|
359
|
-
|
|
360
|
-
|
|
278
|
+
`subscription OnTokenBarsUpdated($networkId: Int, $tokenId: String) {
|
|
279
|
+
onTokenBarsUpdated (networkId: $networkId, tokenId: $tokenId) {
|
|
280
|
+
aggregates { r1 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r7D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r60 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r240 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r720 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, statsType, timestamp, tokenAddress, tokenId
|
|
361
281
|
}
|
|
362
282
|
}`,
|
|
363
283
|
vars,
|
|
364
284
|
sink,
|
|
365
285
|
);
|
|
366
|
-
|
|
367
|
-
vars:
|
|
368
|
-
sink: Sink<ExecutionResult<
|
|
286
|
+
onPriceUpdated = async (
|
|
287
|
+
vars: OnPriceUpdatedSubscriptionVariables,
|
|
288
|
+
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
|
|
369
289
|
) =>
|
|
370
290
|
this.sdk.subscribe(
|
|
371
|
-
`subscription
|
|
372
|
-
|
|
373
|
-
|
|
291
|
+
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
292
|
+
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
293
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
374
294
|
}
|
|
375
295
|
}`,
|
|
376
296
|
vars,
|
|
377
297
|
sink,
|
|
378
298
|
);
|
|
379
|
-
|
|
380
|
-
vars:
|
|
381
|
-
sink: Sink<ExecutionResult<
|
|
299
|
+
onBarsUpdated = async (
|
|
300
|
+
vars: OnBarsUpdatedSubscriptionVariables,
|
|
301
|
+
sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
|
|
382
302
|
) =>
|
|
383
303
|
this.sdk.subscribe(
|
|
384
|
-
`subscription
|
|
385
|
-
|
|
386
|
-
|
|
304
|
+
`subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
305
|
+
onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
306
|
+
aggregates { r1 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r7D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r60 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r240 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r720 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, statsType, timestamp
|
|
387
307
|
}
|
|
388
308
|
}`,
|
|
389
309
|
vars,
|
|
390
310
|
sink,
|
|
391
311
|
);
|
|
392
|
-
|
|
393
|
-
vars:
|
|
394
|
-
sink: Sink<ExecutionResult<
|
|
312
|
+
onTokenEventsCreated = async (
|
|
313
|
+
vars: OnTokenEventsCreatedSubscriptionVariables,
|
|
314
|
+
sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
|
|
395
315
|
) =>
|
|
396
316
|
this.sdk.subscribe(
|
|
397
|
-
`subscription
|
|
398
|
-
|
|
399
|
-
|
|
317
|
+
`subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
|
|
318
|
+
onTokenEventsCreated (input: $input) {
|
|
319
|
+
events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, id
|
|
400
320
|
}
|
|
401
321
|
}`,
|
|
402
322
|
vars,
|
|
@@ -433,6 +353,19 @@ export class Subscribe {
|
|
|
433
353
|
vars,
|
|
434
354
|
sink,
|
|
435
355
|
);
|
|
356
|
+
onEventsCreatedByMaker = async (
|
|
357
|
+
vars: OnEventsCreatedByMakerSubscriptionVariables,
|
|
358
|
+
sink: Sink<ExecutionResult<OnEventsCreatedByMakerSubscription>>,
|
|
359
|
+
) =>
|
|
360
|
+
this.sdk.subscribe(
|
|
361
|
+
`subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
|
|
362
|
+
onEventsCreatedByMaker (input: $input) {
|
|
363
|
+
events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, makerAddress
|
|
364
|
+
}
|
|
365
|
+
}`,
|
|
366
|
+
vars,
|
|
367
|
+
sink,
|
|
368
|
+
);
|
|
436
369
|
onUnconfirmedEventsCreated = async (
|
|
437
370
|
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
438
371
|
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
@@ -446,27 +379,79 @@ export class Subscribe {
|
|
|
446
379
|
vars,
|
|
447
380
|
sink,
|
|
448
381
|
);
|
|
449
|
-
|
|
450
|
-
vars:
|
|
451
|
-
sink: Sink<ExecutionResult<
|
|
382
|
+
onLatestTokens = async (
|
|
383
|
+
vars: OnLatestTokensSubscriptionVariables,
|
|
384
|
+
sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
|
|
452
385
|
) =>
|
|
453
386
|
this.sdk.subscribe(
|
|
454
|
-
`subscription
|
|
455
|
-
|
|
456
|
-
|
|
387
|
+
`subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
|
|
388
|
+
onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
|
|
389
|
+
blockHash, blockNumber, creatorAddress, creatorBalance, decimals, id, networkId, simulationResults { buyGasUsed, buySuccess, buyTax, canRenounceOwnership, canTransferOwnership, isOwnerRenounced, maxBuyAmount, maxSellAmount, openTradingCall, sellGasUsed, sellSuccess, sellTax }, timeCreated, tokenAddress, tokenName, tokenSymbol, totalSupply, traceIndex, transactionHash, transactionIndex
|
|
457
390
|
}
|
|
458
391
|
}`,
|
|
459
392
|
vars,
|
|
460
393
|
sink,
|
|
461
394
|
);
|
|
462
|
-
|
|
463
|
-
vars:
|
|
464
|
-
sink: Sink<ExecutionResult<
|
|
395
|
+
onBalanceUpdated = async (
|
|
396
|
+
vars: OnBalanceUpdatedSubscriptionVariables,
|
|
397
|
+
sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
|
|
465
398
|
) =>
|
|
466
399
|
this.sdk.subscribe(
|
|
467
|
-
`subscription
|
|
468
|
-
|
|
469
|
-
|
|
400
|
+
`subscription OnBalanceUpdated($walletAddress: String!) {
|
|
401
|
+
onBalanceUpdated (walletAddress: $walletAddress) {
|
|
402
|
+
address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, tokenAddress, tokenId, tokenPriceUsd, walletId
|
|
403
|
+
}
|
|
404
|
+
}`,
|
|
405
|
+
vars,
|
|
406
|
+
sink,
|
|
407
|
+
);
|
|
408
|
+
onEventsCreated = async (
|
|
409
|
+
vars: OnEventsCreatedSubscriptionVariables,
|
|
410
|
+
sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
|
|
411
|
+
) =>
|
|
412
|
+
this.sdk.subscribe(
|
|
413
|
+
`subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
|
|
414
|
+
onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
|
|
415
|
+
address, events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, id, networkId, quoteToken
|
|
416
|
+
}
|
|
417
|
+
}`,
|
|
418
|
+
vars,
|
|
419
|
+
sink,
|
|
420
|
+
);
|
|
421
|
+
onNftPoolEventsCreated = async (
|
|
422
|
+
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
423
|
+
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
424
|
+
) =>
|
|
425
|
+
this.sdk.subscribe(
|
|
426
|
+
`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
427
|
+
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
428
|
+
collectionAddress, events { blockHash, blockNumber, collectionAddress, collectionId, data { ... on NewPoolEventData { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftTokenBalance, ownerAddress, poolAddress, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NewPoolEventDataV2 { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenIds, nftTokenQuantities, ownerAddress, poolAddress, poolNftType, propertyChecker, royalties { percent, recipient }, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NftPoolAssetRecipientUpdateEventData { newAssetRecipient, type }, ... on NftPoolDeltaUpdateEventData { newDelta, type }, ... on NftPoolFeeUpdateEventData { nbtRatio, newFeeT, type, usdRatio }, ... on NftPoolNftDepositEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftDepositEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolOwnershipTransferredEventDataV2 { newOwner, type }, ... on NftPoolSpotPriceUpdateEventData { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolSpotPriceUpdateEventDataV2 { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolTokenDepositEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenDepositEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on SwapNftInPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftInPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId, nftTokenQuantity }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId, nftTokenQuantity }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio } }, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
|
|
429
|
+
}
|
|
430
|
+
}`,
|
|
431
|
+
vars,
|
|
432
|
+
sink,
|
|
433
|
+
);
|
|
434
|
+
onHoldersUpdated = async (
|
|
435
|
+
vars: OnHoldersUpdatedSubscriptionVariables,
|
|
436
|
+
sink: Sink<ExecutionResult<OnHoldersUpdatedSubscription>>,
|
|
437
|
+
) =>
|
|
438
|
+
this.sdk.subscribe(
|
|
439
|
+
`subscription OnHoldersUpdated($tokenId: String!) {
|
|
440
|
+
onHoldersUpdated (tokenId: $tokenId) {
|
|
441
|
+
balances { address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, tokenAddress, tokenId, tokenPriceUsd, walletId }, holders, networkId, tokenAddress, tokenId
|
|
442
|
+
}
|
|
443
|
+
}`,
|
|
444
|
+
vars,
|
|
445
|
+
sink,
|
|
446
|
+
);
|
|
447
|
+
onPairMetadataUpdated = async (
|
|
448
|
+
vars: OnPairMetadataUpdatedSubscriptionVariables,
|
|
449
|
+
sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
|
|
450
|
+
) =>
|
|
451
|
+
this.sdk.subscribe(
|
|
452
|
+
`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken) {
|
|
453
|
+
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken) {
|
|
454
|
+
createdAt, enhancedToken0 { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, enhancedToken1 { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, exchangeId, fee, highPrice1, highPrice1w, highPrice4, highPrice5m, highPrice12, highPrice24, id, liquidity, liquidityToken, lowPrice1, lowPrice1w, lowPrice4, lowPrice5m, lowPrice12, lowPrice24, networkId, nonLiquidityToken, pairAddress, price, priceChange1, priceChange1w, priceChange4, priceChange5m, priceChange12, priceChange24, quoteToken, statsType, tickSpacing, token0 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, token1 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, volume1, volume1w, volume4, volume5m, volume12, volume24
|
|
470
455
|
}
|
|
471
456
|
}`,
|
|
472
457
|
vars,
|