@codex-data/sdk 1.0.9 → 1.0.11
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 +177 -681
- 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 +2 -2
- package/dist/sdk/Mutation.d.ts.map +1 -1
- package/dist/sdk/Mutation.js +2 -2
- package/dist/sdk/Mutation.js.map +1 -1
- package/dist/sdk/Query.d.ts +57 -52
- package/dist/sdk/Query.d.ts.map +1 -1
- package/dist/sdk/Query.js +56 -51
- package/dist/sdk/Query.js.map +1 -1
- package/dist/sdk/Subscribe.d.ts +17 -18
- package/dist/sdk/Subscribe.d.ts.map +1 -1
- package/dist/sdk/Subscribe.js +126 -133
- package/dist/sdk/Subscribe.js.map +1 -1
- package/dist/sdk/generated/gql.d.ts +135 -104
- 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 +1612 -1103
- 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/dist/sdk/index.d.ts +45 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +83 -5
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/index.test.js +232 -7
- package/dist/sdk/index.test.js.map +1 -1
- package/package.json +1 -1
- 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 +457 -5137
- package/src/resources/graphql.ts +183 -743
- package/src/resources/schema.graphql +6752 -11058
- package/src/sdk/Mutation.ts +4 -4
- package/src/sdk/Query.ts +128 -109
- package/src/sdk/Subscribe.ts +208 -223
- package/src/sdk/generated/gql.ts +106 -86
- package/src/sdk/generated/graphql.ts +320 -842
- package/src/sdk/index.test.ts +361 -10
- package/src/sdk/index.ts +89 -6
- 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,40 +53,14 @@ 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 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
|
|
66
|
-
}
|
|
67
|
-
}`,
|
|
68
|
-
vars,
|
|
69
|
-
sink,
|
|
70
|
-
);
|
|
71
|
-
onNftEventsCreated = async (
|
|
72
|
-
vars: OnNftEventsCreatedSubscriptionVariables,
|
|
73
|
-
sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
|
|
74
|
-
) =>
|
|
75
|
-
this.sdk.subscribe(
|
|
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
|
|
79
|
-
}
|
|
80
|
-
}`,
|
|
81
|
-
vars,
|
|
82
|
-
sink,
|
|
83
|
-
);
|
|
84
|
-
onUnconfirmedEventsCreatedByMaker = async (
|
|
85
|
-
vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
|
|
86
|
-
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
|
|
56
|
+
onPriceUpdated = async (
|
|
57
|
+
vars: OnPriceUpdatedSubscriptionVariables,
|
|
58
|
+
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
|
|
87
59
|
) =>
|
|
88
60
|
this.sdk.subscribe(
|
|
89
|
-
`subscription
|
|
90
|
-
|
|
91
|
-
|
|
61
|
+
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
62
|
+
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
63
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
92
64
|
}
|
|
93
65
|
}`,
|
|
94
66
|
vars,
|
|
@@ -107,110 +79,14 @@ export class Subscribe {
|
|
|
107
79
|
vars,
|
|
108
80
|
sink,
|
|
109
81
|
);
|
|
110
|
-
|
|
111
|
-
vars:
|
|
112
|
-
sink: Sink<ExecutionResult<
|
|
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
|
|
131
|
-
}
|
|
132
|
-
}`,
|
|
133
|
-
vars,
|
|
134
|
-
sink,
|
|
135
|
-
);
|
|
136
|
-
onEventLabelCreated = async (
|
|
137
|
-
vars: OnEventLabelCreatedSubscriptionVariables,
|
|
138
|
-
sink: Sink<ExecutionResult<OnEventLabelCreatedSubscription>>,
|
|
139
|
-
) =>
|
|
140
|
-
this.sdk.subscribe(
|
|
141
|
-
`subscription OnEventLabelCreated($id: String) {
|
|
142
|
-
onEventLabelCreated(id: $id) {
|
|
143
|
-
data {
|
|
144
|
-
... on FrontRunLabelData {
|
|
145
|
-
index
|
|
146
|
-
token0DrainedAmount
|
|
147
|
-
token1DrainedAmount
|
|
148
|
-
}
|
|
149
|
-
... on SandwichedLabelData {
|
|
150
|
-
token0DrainedAmountSandwich: token0DrainedAmount
|
|
151
|
-
token1DrainedAmountSandwich: token1DrainedAmount
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
id
|
|
155
|
-
label
|
|
156
|
-
logIndex
|
|
157
|
-
networkId
|
|
158
|
-
timestamp
|
|
159
|
-
transactionHash
|
|
160
|
-
transactionIndex
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
`,
|
|
164
|
-
vars,
|
|
165
|
-
sink,
|
|
166
|
-
);
|
|
167
|
-
onNftPoolEventsCreated = async (
|
|
168
|
-
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
169
|
-
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
170
|
-
) =>
|
|
171
|
-
this.sdk.subscribe(
|
|
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
|
|
175
|
-
}
|
|
176
|
-
}`,
|
|
177
|
-
vars,
|
|
178
|
-
sink,
|
|
179
|
-
);
|
|
180
|
-
onDetailedStatsUpdated = async (
|
|
181
|
-
vars: OnDetailedStatsUpdatedSubscriptionVariables,
|
|
182
|
-
sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
|
|
183
|
-
) =>
|
|
184
|
-
this.sdk.subscribe(
|
|
185
|
-
`subscription OnDetailedStatsUpdated($pairId: String, $statsType: TokenPairStatisticsType, $tokenOfInterest: TokenOfInterest) {
|
|
186
|
-
onDetailedStatsUpdated (pairId: $pairId, statsType: $statsType, tokenOfInterest: $tokenOfInterest) {
|
|
187
|
-
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
|
|
188
|
-
}
|
|
189
|
-
}`,
|
|
190
|
-
vars,
|
|
191
|
-
sink,
|
|
192
|
-
);
|
|
193
|
-
onUnconfirmedEventsCreated = async (
|
|
194
|
-
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
195
|
-
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
196
|
-
) =>
|
|
197
|
-
this.sdk.subscribe(
|
|
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>>,
|
|
82
|
+
onBalanceUpdated = async (
|
|
83
|
+
vars: OnBalanceUpdatedSubscriptionVariables,
|
|
84
|
+
sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
|
|
209
85
|
) =>
|
|
210
86
|
this.sdk.subscribe(
|
|
211
|
-
`subscription
|
|
212
|
-
|
|
213
|
-
address,
|
|
87
|
+
`subscription OnBalanceUpdated($walletAddress: String!) {
|
|
88
|
+
onBalanceUpdated (walletAddress: $walletAddress) {
|
|
89
|
+
address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, tokenAddress, tokenId, tokenPriceUsd, walletId
|
|
214
90
|
}
|
|
215
91
|
}`,
|
|
216
92
|
vars,
|
|
@@ -221,23 +97,10 @@ export class Subscribe {
|
|
|
221
97
|
sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
|
|
222
98
|
) =>
|
|
223
99
|
this.sdk.subscribe(
|
|
224
|
-
`subscription OnTokenBarsUpdated($networkId: Int, $
|
|
225
|
-
onTokenBarsUpdated (networkId: $networkId,
|
|
100
|
+
`subscription OnTokenBarsUpdated($networkId: Int, $tokenId: String) {
|
|
101
|
+
onTokenBarsUpdated (networkId: $networkId, tokenId: $tokenId) {
|
|
226
102
|
aggregates { r1 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r7D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r60 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r240 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r720 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, statsType, timestamp, tokenAddress, tokenId
|
|
227
103
|
}
|
|
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
104
|
}`,
|
|
242
105
|
vars,
|
|
243
106
|
sink,
|
|
@@ -247,62 +110,10 @@ export class Subscribe {
|
|
|
247
110
|
sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
|
|
248
111
|
) =>
|
|
249
112
|
this.sdk.subscribe(
|
|
250
|
-
`subscription OnEventsCreated($address: String, $id: String, $
|
|
251
|
-
onEventsCreated (address: $address, id: $id,
|
|
113
|
+
`subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
|
|
114
|
+
onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
|
|
252
115
|
address, events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, id, networkId, quoteToken
|
|
253
116
|
}
|
|
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
|
|
266
|
-
}
|
|
267
|
-
}`,
|
|
268
|
-
vars,
|
|
269
|
-
sink,
|
|
270
|
-
);
|
|
271
|
-
onUnconfirmedBarsUpdated = async (
|
|
272
|
-
vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
|
|
273
|
-
sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
|
|
274
|
-
) =>
|
|
275
|
-
this.sdk.subscribe(
|
|
276
|
-
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
277
|
-
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
278
|
-
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
|
|
279
|
-
}
|
|
280
|
-
}`,
|
|
281
|
-
vars,
|
|
282
|
-
sink,
|
|
283
|
-
);
|
|
284
|
-
onPricesUpdated = async (
|
|
285
|
-
vars: OnPricesUpdatedSubscriptionVariables,
|
|
286
|
-
sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
|
|
287
|
-
) =>
|
|
288
|
-
this.sdk.subscribe(
|
|
289
|
-
`subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
|
|
290
|
-
onPricesUpdated (input: $input) {
|
|
291
|
-
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
292
|
-
}
|
|
293
|
-
}`,
|
|
294
|
-
vars,
|
|
295
|
-
sink,
|
|
296
|
-
);
|
|
297
|
-
onPriceUpdated = async (
|
|
298
|
-
vars: OnPriceUpdatedSubscriptionVariables,
|
|
299
|
-
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
|
|
300
|
-
) =>
|
|
301
|
-
this.sdk.subscribe(
|
|
302
|
-
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
303
|
-
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
304
|
-
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
305
|
-
}
|
|
306
117
|
}`,
|
|
307
118
|
vars,
|
|
308
119
|
sink,
|
|
@@ -407,27 +218,40 @@ export class Subscribe {
|
|
|
407
218
|
vars,
|
|
408
219
|
sink,
|
|
409
220
|
);
|
|
410
|
-
|
|
411
|
-
vars:
|
|
412
|
-
sink: Sink<ExecutionResult<
|
|
221
|
+
onUnconfirmedBarsUpdated = async (
|
|
222
|
+
vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
|
|
223
|
+
sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
|
|
413
224
|
) =>
|
|
414
225
|
this.sdk.subscribe(
|
|
415
|
-
`subscription
|
|
416
|
-
|
|
417
|
-
|
|
226
|
+
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
227
|
+
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
228
|
+
aggregates { r1 { c, h, l, o, t, v, volume }, r1S { c, h, l, o, t, v, volume }, r5 { c, h, l, o, t, v, volume }, r5S { c, h, l, o, t, v, volume }, r15 { c, h, l, o, t, v, volume }, r15S { c, h, l, o, t, v, volume } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, timestamp
|
|
418
229
|
}
|
|
419
230
|
}`,
|
|
420
231
|
vars,
|
|
421
232
|
sink,
|
|
422
233
|
);
|
|
423
|
-
|
|
424
|
-
vars:
|
|
425
|
-
sink: Sink<ExecutionResult<
|
|
234
|
+
onNftPoolEventsCreated = async (
|
|
235
|
+
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
236
|
+
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
426
237
|
) =>
|
|
427
238
|
this.sdk.subscribe(
|
|
428
|
-
`subscription
|
|
429
|
-
|
|
430
|
-
|
|
239
|
+
`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
240
|
+
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
241
|
+
collectionAddress, events { blockHash, blockNumber, collectionAddress, collectionId, data { ... on NewPoolEventData { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftTokenBalance, ownerAddress, poolAddress, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NewPoolEventDataV2 { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenIds, nftTokenQuantities, ownerAddress, poolAddress, poolNftType, propertyChecker, royalties { percent, recipient }, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NftPoolAssetRecipientUpdateEventData { newAssetRecipient, type }, ... on NftPoolDeltaUpdateEventData { newDelta, type }, ... on NftPoolFeeUpdateEventData { nbtRatio, newFeeT, type, usdRatio }, ... on NftPoolNftDepositEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftDepositEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolOwnershipTransferredEventDataV2 { newOwner, type }, ... on NftPoolSpotPriceUpdateEventData { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolSpotPriceUpdateEventDataV2 { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolTokenDepositEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenDepositEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on SwapNftInPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftInPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId, nftTokenQuantity }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId, nftTokenQuantity }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio } }, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
|
|
242
|
+
}
|
|
243
|
+
}`,
|
|
244
|
+
vars,
|
|
245
|
+
sink,
|
|
246
|
+
);
|
|
247
|
+
onLaunchpadTokenEvent = async (
|
|
248
|
+
vars: OnLaunchpadTokenEventSubscriptionVariables,
|
|
249
|
+
sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
|
|
250
|
+
) =>
|
|
251
|
+
this.sdk.subscribe(
|
|
252
|
+
`subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
|
|
253
|
+
onLaunchpadTokenEvent (input: $input) {
|
|
254
|
+
address, buyCount1, eventType, holders, marketCap, networkId, price, protocol, sellCount1, token { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, transactions1, volume1
|
|
431
255
|
}
|
|
432
256
|
}`,
|
|
433
257
|
vars,
|
|
@@ -442,6 +266,45 @@ export class Subscribe {
|
|
|
442
266
|
onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
|
|
443
267
|
blockHash, blockNumber, creatorAddress, creatorBalance, decimals, id, networkId, simulationResults { buyGasUsed, buySuccess, buyTax, canRenounceOwnership, canTransferOwnership, isOwnerRenounced, maxBuyAmount, maxSellAmount, openTradingCall, sellGasUsed, sellSuccess, sellTax }, timeCreated, tokenAddress, tokenName, tokenSymbol, totalSupply, traceIndex, transactionHash, transactionIndex
|
|
444
268
|
}
|
|
269
|
+
}`,
|
|
270
|
+
vars,
|
|
271
|
+
sink,
|
|
272
|
+
);
|
|
273
|
+
onLatestPairUpdated = async (
|
|
274
|
+
vars: OnLatestPairUpdatedSubscriptionVariables,
|
|
275
|
+
sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
|
|
276
|
+
) =>
|
|
277
|
+
this.sdk.subscribe(
|
|
278
|
+
`subscription OnLatestPairUpdated($id: String, $networkId: Int) {
|
|
279
|
+
onLatestPairUpdated (id: $id, networkId: $networkId) {
|
|
280
|
+
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
|
|
281
|
+
}
|
|
282
|
+
}`,
|
|
283
|
+
vars,
|
|
284
|
+
sink,
|
|
285
|
+
);
|
|
286
|
+
onPairMetadataUpdated = async (
|
|
287
|
+
vars: OnPairMetadataUpdatedSubscriptionVariables,
|
|
288
|
+
sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
|
|
289
|
+
) =>
|
|
290
|
+
this.sdk.subscribe(
|
|
291
|
+
`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken) {
|
|
292
|
+
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken) {
|
|
293
|
+
createdAt, enhancedToken0 { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, enhancedToken1 { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, exchangeId, fee, highPrice1, highPrice1w, highPrice4, highPrice5m, highPrice12, highPrice24, id, liquidity, liquidityToken, lowPrice1, lowPrice1w, lowPrice4, lowPrice5m, lowPrice12, lowPrice24, networkId, nonLiquidityToken, pairAddress, price, priceChange1, priceChange1w, priceChange4, priceChange5m, priceChange12, priceChange24, quoteToken, statsType, tickSpacing, token0 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, token1 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, volume1, volume1w, volume4, volume5m, volume12, volume24
|
|
294
|
+
}
|
|
295
|
+
}`,
|
|
296
|
+
vars,
|
|
297
|
+
sink,
|
|
298
|
+
);
|
|
299
|
+
onEventsCreatedByMaker = async (
|
|
300
|
+
vars: OnEventsCreatedByMakerSubscriptionVariables,
|
|
301
|
+
sink: Sink<ExecutionResult<OnEventsCreatedByMakerSubscription>>,
|
|
302
|
+
) =>
|
|
303
|
+
this.sdk.subscribe(
|
|
304
|
+
`subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
|
|
305
|
+
onEventsCreatedByMaker (input: $input) {
|
|
306
|
+
events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge, walletLabels }, makerAddress
|
|
307
|
+
}
|
|
445
308
|
}`,
|
|
446
309
|
vars,
|
|
447
310
|
sink,
|
|
@@ -459,14 +322,136 @@ export class Subscribe {
|
|
|
459
322
|
vars,
|
|
460
323
|
sink,
|
|
461
324
|
);
|
|
462
|
-
|
|
463
|
-
vars:
|
|
464
|
-
sink: Sink<ExecutionResult<
|
|
325
|
+
onUnconfirmedEventsCreatedByMaker = async (
|
|
326
|
+
vars: OnUnconfirmedEventsCreatedByMakerSubscriptionVariables,
|
|
327
|
+
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedByMakerSubscription>>,
|
|
465
328
|
) =>
|
|
466
329
|
this.sdk.subscribe(
|
|
467
|
-
`subscription
|
|
468
|
-
|
|
469
|
-
|
|
330
|
+
`subscription OnUnconfirmedEventsCreatedByMaker($input: OnUnconfirmedEventsCreatedByMakerInput!) {
|
|
331
|
+
onUnconfirmedEventsCreatedByMaker (input: $input) {
|
|
332
|
+
events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, makerAddress
|
|
333
|
+
}
|
|
334
|
+
}`,
|
|
335
|
+
vars,
|
|
336
|
+
sink,
|
|
337
|
+
);
|
|
338
|
+
onNftEventsCreated = async (
|
|
339
|
+
vars: OnNftEventsCreatedSubscriptionVariables,
|
|
340
|
+
sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
|
|
341
|
+
) =>
|
|
342
|
+
this.sdk.subscribe(
|
|
343
|
+
`subscription OnNftEventsCreated($address: String, $networkId: Int) {
|
|
344
|
+
onNftEventsCreated (address: $address, networkId: $networkId) {
|
|
345
|
+
address, events { aggregatorAddress, baseTokenAddress, baseTokenPrice, blockNumber, contractAddress, eventType, exchangeAddress, fillSource, id, individualBaseTokenPrice, individualNetworkBaseTokenPrice, individualPrice, individualPriceNetworkBaseToken, individualPriceUsd, individualTokenPrice, individualTradePrice, logIndex, maker, networkBaseTokenPrice, networkId, numberOfTokens, orderDirection, paymentTokenAddress, poolAddress, priceError, sortKey, taker, timestamp, tokenId, tokenPrice, totalPrice, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, tradeOffer { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, tradeReceived { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, transactionHash, transactionIndex }, id, networkId
|
|
346
|
+
}
|
|
347
|
+
}`,
|
|
348
|
+
vars,
|
|
349
|
+
sink,
|
|
350
|
+
);
|
|
351
|
+
onTokenLifecycleEventsCreated = async (
|
|
352
|
+
vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
|
|
353
|
+
sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
|
|
354
|
+
) =>
|
|
355
|
+
this.sdk.subscribe(
|
|
356
|
+
`subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
|
|
357
|
+
onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
|
|
358
|
+
events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
|
|
359
|
+
}
|
|
360
|
+
}`,
|
|
361
|
+
vars,
|
|
362
|
+
sink,
|
|
363
|
+
);
|
|
364
|
+
onPricesUpdated = async (
|
|
365
|
+
vars: OnPricesUpdatedSubscriptionVariables,
|
|
366
|
+
sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
|
|
367
|
+
) =>
|
|
368
|
+
this.sdk.subscribe(
|
|
369
|
+
`subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
|
|
370
|
+
onPricesUpdated (input: $input) {
|
|
371
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
372
|
+
}
|
|
373
|
+
}`,
|
|
374
|
+
vars,
|
|
375
|
+
sink,
|
|
376
|
+
);
|
|
377
|
+
onHoldersUpdated = async (
|
|
378
|
+
vars: OnHoldersUpdatedSubscriptionVariables,
|
|
379
|
+
sink: Sink<ExecutionResult<OnHoldersUpdatedSubscription>>,
|
|
380
|
+
) =>
|
|
381
|
+
this.sdk.subscribe(
|
|
382
|
+
`subscription OnHoldersUpdated($tokenId: String!) {
|
|
383
|
+
onHoldersUpdated (tokenId: $tokenId) {
|
|
384
|
+
balances { address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, circulatingSupply, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, explorerData { blueCheckmark, description, divisor, id, tokenPriceUSD, tokenType }, freezable, id, imageLargeUrl, imageSmallUrl, imageThumbUrl, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, pooled, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol, totalSupply }, tokenAddress, tokenId, tokenPriceUsd, walletId }, holders, networkId, tokenAddress, tokenId
|
|
385
|
+
}
|
|
386
|
+
}`,
|
|
387
|
+
vars,
|
|
388
|
+
sink,
|
|
389
|
+
);
|
|
390
|
+
onEventLabelCreated = async (
|
|
391
|
+
vars: OnEventLabelCreatedSubscriptionVariables,
|
|
392
|
+
sink: Sink<ExecutionResult<OnEventLabelCreatedSubscription>>,
|
|
393
|
+
) =>
|
|
394
|
+
this.sdk.subscribe(
|
|
395
|
+
`subscription OnEventLabelCreated($id: String) {
|
|
396
|
+
onEventLabelCreated(id: $id) {
|
|
397
|
+
data {
|
|
398
|
+
... on FrontRunLabelData {
|
|
399
|
+
index
|
|
400
|
+
token0DrainedAmount
|
|
401
|
+
token1DrainedAmount
|
|
402
|
+
}
|
|
403
|
+
... on SandwichedLabelData {
|
|
404
|
+
token0DrainedAmountSandwich: token0DrainedAmount
|
|
405
|
+
token1DrainedAmountSandwich: token1DrainedAmount
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
id
|
|
409
|
+
label
|
|
410
|
+
logIndex
|
|
411
|
+
networkId
|
|
412
|
+
timestamp
|
|
413
|
+
transactionHash
|
|
414
|
+
transactionIndex
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
`,
|
|
418
|
+
vars,
|
|
419
|
+
sink,
|
|
420
|
+
);
|
|
421
|
+
onUnconfirmedEventsCreated = async (
|
|
422
|
+
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
423
|
+
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
424
|
+
) =>
|
|
425
|
+
this.sdk.subscribe(
|
|
426
|
+
`subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
|
|
427
|
+
onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
|
|
428
|
+
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
|
|
429
|
+
}
|
|
430
|
+
}`,
|
|
431
|
+
vars,
|
|
432
|
+
sink,
|
|
433
|
+
);
|
|
434
|
+
onBarsUpdated = async (
|
|
435
|
+
vars: OnBarsUpdatedSubscriptionVariables,
|
|
436
|
+
sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
|
|
437
|
+
) =>
|
|
438
|
+
this.sdk.subscribe(
|
|
439
|
+
`subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
440
|
+
onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
441
|
+
aggregates { r1 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r7D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r60 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r240 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r720 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, statsType, timestamp
|
|
442
|
+
}
|
|
443
|
+
}`,
|
|
444
|
+
vars,
|
|
445
|
+
sink,
|
|
446
|
+
);
|
|
447
|
+
onDetailedStatsUpdated = async (
|
|
448
|
+
vars: OnDetailedStatsUpdatedSubscriptionVariables,
|
|
449
|
+
sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
|
|
450
|
+
) =>
|
|
451
|
+
this.sdk.subscribe(
|
|
452
|
+
`subscription OnDetailedStatsUpdated($pairId: String, $tokenOfInterest: TokenOfInterest) {
|
|
453
|
+
onDetailedStatsUpdated (pairId: $pairId, tokenOfInterest: $tokenOfInterest) {
|
|
454
|
+
bucketCount, pairId, queryTimestamp, statsType, stats_day1 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour1 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour4 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_hour12 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, stats_min5 { buckets { end, start }, buyVolume { buckets, change, currentValue, previousValue }, buyers { buckets, change, currentValue, previousValue }, buys { buckets, change, currentValue, previousValue }, endTimestamp, sellVolume { buckets, change, currentValue, previousValue }, sellers { buckets, change, currentValue, previousValue }, sells { buckets, change, currentValue, previousValue }, timestamp, traders { buckets, change, currentValue, previousValue }, transactions { buckets, change, currentValue, previousValue }, volume { buckets, change, currentValue, previousValue }, windowSize }, tokenOfInterest
|
|
470
455
|
}
|
|
471
456
|
}`,
|
|
472
457
|
vars,
|