@codex-data/sdk 1.0.7 → 1.0.8
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 +1173 -12
- package/dist/resources/graphql.d.ts.map +1 -1
- package/dist/resources/graphql.js +191 -1
- 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 +53 -49
- package/dist/sdk/Query.d.ts.map +1 -1
- package/dist/sdk/Query.js +52 -48
- package/dist/sdk/Query.js.map +1 -1
- package/dist/sdk/Subscribe.d.ts +15 -15
- package/dist/sdk/Subscribe.d.ts.map +1 -1
- package/dist/sdk/Subscribe.js +78 -78
- package/dist/sdk/Subscribe.js.map +1 -1
- package/dist/sdk/generated/gql.d.ts +54 -26
- package/dist/sdk/generated/gql.d.ts.map +1 -1
- package/dist/sdk/generated/gql.js +17 -13
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +1678 -39
- package/dist/sdk/generated/graphql.d.ts.map +1 -1
- package/dist/sdk/generated/graphql.js +210 -16
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/index.d.ts +11 -3
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +33 -19
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/index.test.js +2 -2
- package/dist/sdk/index.test.js.map +1 -1
- package/package.json +1 -2
- package/src/resources/generated_queries/DetailedWalletStats.graphql +197 -0
- package/src/resources/generated_queries/FilterPairs.graphql +4 -4
- package/src/resources/generated_queries/FilterTokenWallets.graphql +139 -0
- package/src/resources/generated_queries/FilterTokens.graphql +4 -3
- package/src/resources/generated_queries/FilterWallets.graphql +56 -0
- package/src/resources/generated_queries/GetBars.graphql +2 -2
- package/src/resources/generated_queries/GetCommunityNotes.graphql +1 -1
- package/src/resources/generated_queries/GetDetailedPairStats.graphql +2 -2
- package/src/resources/generated_queries/GetDetailedPairsStats.graphql +2 -2
- package/src/resources/generated_queries/ListPairsForToken.graphql +2 -2
- package/src/resources/generated_queries/ListPairsWithMetadataForToken.graphql +4 -4
- package/src/resources/generated_queries/PairMetadata.graphql +2 -2
- package/src/resources/generated_queries/Token.graphql +1 -1
- package/src/resources/generated_queries/Tokens.graphql +1 -1
- package/src/resources/generated_queries/WalletChart.graphql +19 -0
- package/src/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +1 -1
- package/src/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +2 -2
- package/src/resources/graphql.schema.json +15289 -7880
- package/src/resources/graphql.ts +1215 -12
- package/src/resources/schema.graphql +1694 -79
- package/src/sdk/Mutation.ts +2 -2
- package/src/sdk/Query.ts +119 -103
- package/src/sdk/Subscribe.ts +132 -132
- package/src/sdk/generated/gql.ts +46 -26
- package/src/sdk/generated/graphql.ts +1273 -38
- package/src/sdk/index.test.ts +3 -3
- package/src/sdk/index.ts +69 -18
- package/dist/resources/generated_mutations/CreateApiTokens.graphql +0 -9
- package/dist/resources/generated_mutations/CreateWebhooks.graphql +0 -472
- package/dist/resources/generated_mutations/DeleteApiToken.graphql +0 -3
- package/dist/resources/generated_mutations/DeleteWebhooks.graphql +0 -5
- package/dist/resources/generated_queries/ApiToken.graphql +0 -9
- package/dist/resources/generated_queries/ApiTokens.graphql +0 -9
- package/dist/resources/generated_queries/Balances.graphql +0 -15
- package/dist/resources/generated_queries/ChartUrls.graphql +0 -7
- package/dist/resources/generated_queries/FilterExchanges.graphql +0 -43
- package/dist/resources/generated_queries/FilterNftCollections.graphql +0 -569
- package/dist/resources/generated_queries/FilterNftParallelAssets.graphql +0 -60
- package/dist/resources/generated_queries/FilterNftPoolCollections.graphql +0 -71
- package/dist/resources/generated_queries/FilterNftPools.graphql +0 -124
- package/dist/resources/generated_queries/FilterPairs.graphql +0 -419
- package/dist/resources/generated_queries/FilterTokens.graphql +0 -356
- package/dist/resources/generated_queries/GetBars.graphql +0 -212
- package/dist/resources/generated_queries/GetCommunityNotes.graphql +0 -135
- package/dist/resources/generated_queries/GetDetailedNftStats.graphql +0 -831
- package/dist/resources/generated_queries/GetDetailedPairStats.graphql +0 -970
- package/dist/resources/generated_queries/GetDetailedPairsStats.graphql +0 -954
- package/dist/resources/generated_queries/GetEventLabels.graphql +0 -35
- package/dist/resources/generated_queries/GetExchanges.graphql +0 -12
- package/dist/resources/generated_queries/GetNetworkStats.graphql +0 -20
- package/dist/resources/generated_queries/GetNetworkStatus.graphql +0 -8
- package/dist/resources/generated_queries/GetNetworks.graphql +0 -7
- package/dist/resources/generated_queries/GetNftAssets.graphql +0 -59
- package/dist/resources/generated_queries/GetNftCollectionMetadata.graphql +0 -75
- package/dist/resources/generated_queries/GetNftContracts.graphql +0 -39
- package/dist/resources/generated_queries/GetNftEvents.graphql +0 -100
- package/dist/resources/generated_queries/GetNftPool.graphql +0 -74
- package/dist/resources/generated_queries/GetNftPoolCollection.graphql +0 -33
- package/dist/resources/generated_queries/GetNftPoolCollectionsByExchange.graphql +0 -38
- package/dist/resources/generated_queries/GetNftPoolEvents.graphql +0 -416
- package/dist/resources/generated_queries/GetNftPoolStats.graphql +0 -40
- package/dist/resources/generated_queries/GetNftPoolsByCollectionAndExchange.graphql +0 -89
- package/dist/resources/generated_queries/GetNftPoolsByOwner.graphql +0 -89
- package/dist/resources/generated_queries/GetParallelCardChanges.graphql +0 -57
- package/dist/resources/generated_queries/GetPrimePoolAssets.graphql +0 -32
- package/dist/resources/generated_queries/GetPrimePoolEvents.graphql +0 -156
- package/dist/resources/generated_queries/GetPrimePools.graphql +0 -62
- package/dist/resources/generated_queries/GetSimulateTokenContractResults.graphql +0 -128
- package/dist/resources/generated_queries/GetSymbol.graphql +0 -11
- package/dist/resources/generated_queries/GetTokenEvents.graphql +0 -101
- package/dist/resources/generated_queries/GetTokenEventsForMaker.graphql +0 -101
- package/dist/resources/generated_queries/GetTokenPrices.graphql +0 -10
- package/dist/resources/generated_queries/GetWebhooks.graphql +0 -134
- package/dist/resources/generated_queries/Holders.graphql +0 -18
- package/dist/resources/generated_queries/LiquidityLocks.graphql +0 -26
- package/dist/resources/generated_queries/LiquidityMetadata.graphql +0 -17
- package/dist/resources/generated_queries/ListPairsForToken.graphql +0 -173
- package/dist/resources/generated_queries/ListPairsWithMetadataForToken.graphql +0 -346
- package/dist/resources/generated_queries/ListTopTokens.graphql +0 -55
- package/dist/resources/generated_queries/NftHolders.graphql +0 -12
- package/dist/resources/generated_queries/PairMetadata.graphql +0 -229
- package/dist/resources/generated_queries/PrimeHolders.graphql +0 -16
- package/dist/resources/generated_queries/SearchNfts.graphql +0 -35
- package/dist/resources/generated_queries/Token.graphql +0 -78
- package/dist/resources/generated_queries/TokenLifecycleEvents.graphql +0 -34
- package/dist/resources/generated_queries/TokenSparklines.graphql +0 -10
- package/dist/resources/generated_queries/TokenTopTraders.graphql +0 -26
- package/dist/resources/generated_queries/Tokens.graphql +0 -78
- package/dist/resources/generated_queries/Top10HoldersPercent.graphql +0 -3
- package/dist/resources/generated_queries/WalletNftCollectionAssets.graphql +0 -11
- package/dist/resources/generated_queries/WalletNftCollections.graphql +0 -10
- package/dist/resources/generated_subscriptions/OnBalanceUpdated.graphql +0 -12
- package/dist/resources/generated_subscriptions/OnBarsUpdated.graphql +0 -555
- package/dist/resources/generated_subscriptions/OnDetailedStatsUpdated.graphql +0 -332
- package/dist/resources/generated_subscriptions/OnEventLabelCreated.graphql +0 -22
- package/dist/resources/generated_subscriptions/OnEventsCreated.graphql +0 -104
- package/dist/resources/generated_subscriptions/OnHoldersUpdated.graphql +0 -18
- package/dist/resources/generated_subscriptions/OnLatestPairUpdated.graphql +0 -42
- package/dist/resources/generated_subscriptions/OnLatestTokens.graphql +0 -37
- package/dist/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +0 -91
- package/dist/resources/generated_subscriptions/OnLaunchpadTokenEventBatch.graphql +0 -91
- package/dist/resources/generated_subscriptions/OnNftAssetsCreated.graphql +0 -42
- package/dist/resources/generated_subscriptions/OnNftEventsCreated.graphql +0 -82
- package/dist/resources/generated_subscriptions/OnNftPoolEventsCreated.graphql +0 -412
- package/dist/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +0 -229
- package/dist/resources/generated_subscriptions/OnPriceUpdated.graphql +0 -18
- package/dist/resources/generated_subscriptions/OnPricesUpdated.graphql +0 -10
- package/dist/resources/generated_subscriptions/OnSimulateTokenContract.graphql +0 -121
- package/dist/resources/generated_subscriptions/OnTokenBarsUpdated.graphql +0 -556
- package/dist/resources/generated_subscriptions/OnTokenEventsCreated.graphql +0 -91
- package/dist/resources/generated_subscriptions/OnTokenLifecycleEventsCreated.graphql +0 -30
- package/dist/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +0 -70
- package/dist/resources/generated_subscriptions/OnUnconfirmedEventsCreated.graphql +0 -50
- package/dist/resources/graphql.schema.json +0 -56135
- package/dist/resources/graphql.ts +0 -9024
- package/dist/resources/mutations_override/CreateWebhooks.graphql +0 -472
- package/dist/resources/queries_override/GetEventLabels.graphql +0 -35
- package/dist/resources/queries_override/GetWebhooks.graphql +0 -134
- package/dist/resources/schema.graphql +0 -12013
- package/dist/resources/subscriptions_override/OnEventLabelCreated.graphql +0 -22
- package/dist/resources/subscriptions_override/OnLaunchpadTokenEventBatch.graphql +0 -91
package/src/sdk/Subscribe.ts
CHANGED
|
@@ -51,40 +51,66 @@ import { Codex } from "./index";
|
|
|
51
51
|
|
|
52
52
|
export class Subscribe {
|
|
53
53
|
constructor(private sdk: Codex) {}
|
|
54
|
-
|
|
55
|
-
vars:
|
|
56
|
-
sink: Sink<ExecutionResult<
|
|
54
|
+
onLaunchpadTokenEvent = async (
|
|
55
|
+
vars: OnLaunchpadTokenEventSubscriptionVariables,
|
|
56
|
+
sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
|
|
57
57
|
) =>
|
|
58
58
|
this.sdk.subscribe(
|
|
59
|
-
`subscription
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
`subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
|
|
60
|
+
onLaunchpadTokenEvent (input: $input) {
|
|
61
|
+
address, buyCount1, eventType, holders, marketCap, networkId, price, protocol, sellCount1, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, transactions1, volume1
|
|
62
62
|
}
|
|
63
63
|
}`,
|
|
64
64
|
vars,
|
|
65
65
|
sink,
|
|
66
66
|
);
|
|
67
|
-
|
|
68
|
-
vars:
|
|
69
|
-
sink: Sink<ExecutionResult<
|
|
67
|
+
onNftEventsCreated = async (
|
|
68
|
+
vars: OnNftEventsCreatedSubscriptionVariables,
|
|
69
|
+
sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
|
|
70
70
|
) =>
|
|
71
71
|
this.sdk.subscribe(
|
|
72
|
-
`subscription
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
`subscription OnNftEventsCreated($address: String, $networkId: Int) {
|
|
73
|
+
onNftEventsCreated (address: $address, networkId: $networkId) {
|
|
74
|
+
address, events { aggregatorAddress, blockNumber, contractAddress, eventType, exchangeAddress, fillSource, id, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, logIndex, maker, networkId, numberOfTokens, orderDirection, paymentTokenAddress, poolAddress, priceError, sortKey, taker, timestamp, tokenId, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, tradeOffer { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, tradeReceived { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, transactionHash, transactionIndex }, id, networkId
|
|
75
75
|
}
|
|
76
76
|
}`,
|
|
77
77
|
vars,
|
|
78
78
|
sink,
|
|
79
79
|
);
|
|
80
|
-
|
|
81
|
-
vars:
|
|
82
|
-
sink: Sink<ExecutionResult<
|
|
80
|
+
onNftAssetsCreated = async (
|
|
81
|
+
vars: OnNftAssetsCreatedSubscriptionVariables,
|
|
82
|
+
sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
|
|
83
83
|
) =>
|
|
84
84
|
this.sdk.subscribe(
|
|
85
|
-
`subscription
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
`subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
|
|
86
|
+
onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
|
|
87
|
+
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
|
|
88
|
+
}
|
|
89
|
+
}`,
|
|
90
|
+
vars,
|
|
91
|
+
sink,
|
|
92
|
+
);
|
|
93
|
+
onSimulateTokenContract = async (
|
|
94
|
+
vars: OnSimulateTokenContractSubscriptionVariables,
|
|
95
|
+
sink: Sink<ExecutionResult<OnSimulateTokenContractSubscription>>,
|
|
96
|
+
) =>
|
|
97
|
+
this.sdk.subscribe(
|
|
98
|
+
`subscription OnSimulateTokenContract($contractAddress: String, $networkId: Int!, $simulationId: String) {
|
|
99
|
+
onSimulateTokenContract (contractAddress: $contractAddress, networkId: $networkId, simulationId: $simulationId) {
|
|
100
|
+
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
|
|
101
|
+
}
|
|
102
|
+
}`,
|
|
103
|
+
vars,
|
|
104
|
+
sink,
|
|
105
|
+
);
|
|
106
|
+
onBarsUpdated = async (
|
|
107
|
+
vars: OnBarsUpdatedSubscriptionVariables,
|
|
108
|
+
sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
|
|
109
|
+
) =>
|
|
110
|
+
this.sdk.subscribe(
|
|
111
|
+
`subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
|
|
112
|
+
onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken, statsType: $statsType) {
|
|
113
|
+
aggregates { r1 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r7D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r60 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r240 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r720 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, statsType, timestamp
|
|
88
114
|
}
|
|
89
115
|
}`,
|
|
90
116
|
vars,
|
|
@@ -121,14 +147,14 @@ export class Subscribe {
|
|
|
121
147
|
vars,
|
|
122
148
|
sink,
|
|
123
149
|
);
|
|
124
|
-
|
|
125
|
-
vars:
|
|
126
|
-
sink: Sink<ExecutionResult<
|
|
150
|
+
onNftPoolEventsCreated = async (
|
|
151
|
+
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
152
|
+
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
127
153
|
) =>
|
|
128
154
|
this.sdk.subscribe(
|
|
129
|
-
`subscription
|
|
130
|
-
|
|
131
|
-
|
|
155
|
+
`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
156
|
+
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
157
|
+
collectionAddress, events { blockHash, blockNumber, collectionAddress, collectionId, data { ... on NewPoolEventData { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftTokenBalance, ownerAddress, poolAddress, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NewPoolEventDataV2 { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenIds, nftTokenQuantities, ownerAddress, poolAddress, poolNftType, propertyChecker, royalties { percent, recipient }, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NftPoolAssetRecipientUpdateEventData { newAssetRecipient, type }, ... on NftPoolDeltaUpdateEventData { newDelta, type }, ... on NftPoolFeeUpdateEventData { nbtRatio, newFeeT, type, usdRatio }, ... on NftPoolNftDepositEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftDepositEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolOwnershipTransferredEventDataV2 { newOwner, type }, ... on NftPoolSpotPriceUpdateEventData { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolSpotPriceUpdateEventDataV2 { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolTokenDepositEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenDepositEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on SwapNftInPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftInPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio } }, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
|
|
132
158
|
}
|
|
133
159
|
}`,
|
|
134
160
|
vars,
|
|
@@ -147,14 +173,66 @@ export class Subscribe {
|
|
|
147
173
|
vars,
|
|
148
174
|
sink,
|
|
149
175
|
);
|
|
150
|
-
|
|
151
|
-
vars:
|
|
152
|
-
sink: Sink<ExecutionResult<
|
|
176
|
+
onUnconfirmedEventsCreated = async (
|
|
177
|
+
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
178
|
+
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
153
179
|
) =>
|
|
154
180
|
this.sdk.subscribe(
|
|
155
|
-
`subscription
|
|
156
|
-
|
|
157
|
-
address,
|
|
181
|
+
`subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
|
|
182
|
+
onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
|
|
183
|
+
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
|
|
184
|
+
}
|
|
185
|
+
}`,
|
|
186
|
+
vars,
|
|
187
|
+
sink,
|
|
188
|
+
);
|
|
189
|
+
onLatestPairUpdated = async (
|
|
190
|
+
vars: OnLatestPairUpdatedSubscriptionVariables,
|
|
191
|
+
sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
|
|
192
|
+
) =>
|
|
193
|
+
this.sdk.subscribe(
|
|
194
|
+
`subscription OnLatestPairUpdated($id: String, $networkId: Int) {
|
|
195
|
+
onLatestPairUpdated (id: $id, networkId: $networkId) {
|
|
196
|
+
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
|
|
197
|
+
}
|
|
198
|
+
}`,
|
|
199
|
+
vars,
|
|
200
|
+
sink,
|
|
201
|
+
);
|
|
202
|
+
onTokenBarsUpdated = async (
|
|
203
|
+
vars: OnTokenBarsUpdatedSubscriptionVariables,
|
|
204
|
+
sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
|
|
205
|
+
) =>
|
|
206
|
+
this.sdk.subscribe(
|
|
207
|
+
`subscription OnTokenBarsUpdated($networkId: Int, $statsType: TokenPairStatisticsType, $tokenId: String) {
|
|
208
|
+
onTokenBarsUpdated (networkId: $networkId, statsType: $statsType, tokenId: $tokenId) {
|
|
209
|
+
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
|
|
210
|
+
}
|
|
211
|
+
}`,
|
|
212
|
+
vars,
|
|
213
|
+
sink,
|
|
214
|
+
);
|
|
215
|
+
onPairMetadataUpdated = async (
|
|
216
|
+
vars: OnPairMetadataUpdatedSubscriptionVariables,
|
|
217
|
+
sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
|
|
218
|
+
) =>
|
|
219
|
+
this.sdk.subscribe(
|
|
220
|
+
`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
|
|
221
|
+
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, statsType: $statsType) {
|
|
222
|
+
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
|
|
223
|
+
}
|
|
224
|
+
}`,
|
|
225
|
+
vars,
|
|
226
|
+
sink,
|
|
227
|
+
);
|
|
228
|
+
onEventsCreated = async (
|
|
229
|
+
vars: OnEventsCreatedSubscriptionVariables,
|
|
230
|
+
sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
|
|
231
|
+
) =>
|
|
232
|
+
this.sdk.subscribe(
|
|
233
|
+
`subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
|
|
234
|
+
onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
|
|
235
|
+
address, events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge }, id, networkId, quoteToken
|
|
158
236
|
}
|
|
159
237
|
}`,
|
|
160
238
|
vars,
|
|
@@ -186,14 +264,14 @@ export class Subscribe {
|
|
|
186
264
|
vars,
|
|
187
265
|
sink,
|
|
188
266
|
);
|
|
189
|
-
|
|
190
|
-
vars:
|
|
191
|
-
sink: Sink<ExecutionResult<
|
|
267
|
+
onPriceUpdated = async (
|
|
268
|
+
vars: OnPriceUpdatedSubscriptionVariables,
|
|
269
|
+
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
|
|
192
270
|
) =>
|
|
193
271
|
this.sdk.subscribe(
|
|
194
|
-
`subscription
|
|
195
|
-
|
|
196
|
-
|
|
272
|
+
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
273
|
+
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
274
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
197
275
|
}
|
|
198
276
|
}`,
|
|
199
277
|
vars,
|
|
@@ -299,92 +377,14 @@ export class Subscribe {
|
|
|
299
377
|
vars,
|
|
300
378
|
sink,
|
|
301
379
|
);
|
|
302
|
-
|
|
303
|
-
vars:
|
|
304
|
-
sink: Sink<ExecutionResult<
|
|
305
|
-
) =>
|
|
306
|
-
this.sdk.subscribe(
|
|
307
|
-
`subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
|
|
308
|
-
onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
|
|
309
|
-
address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri
|
|
310
|
-
}
|
|
311
|
-
}`,
|
|
312
|
-
vars,
|
|
313
|
-
sink,
|
|
314
|
-
);
|
|
315
|
-
onLatestPairUpdated = async (
|
|
316
|
-
vars: OnLatestPairUpdatedSubscriptionVariables,
|
|
317
|
-
sink: Sink<ExecutionResult<OnLatestPairUpdatedSubscription>>,
|
|
318
|
-
) =>
|
|
319
|
-
this.sdk.subscribe(
|
|
320
|
-
`subscription OnLatestPairUpdated($id: String, $networkId: Int) {
|
|
321
|
-
onLatestPairUpdated (id: $id, networkId: $networkId) {
|
|
322
|
-
address, exchangeHash, id, initialPriceUsd, liquidAt, liquidity, liquidityToken, networkId, newToken, nonLiquidityToken, oldToken, priceChange, priceUsd, token0 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, token1 { address, currentPoolAmount, decimals, id, initialPoolAmount, name, networkId, pairId, poolVariation, symbol }, transactionHash
|
|
323
|
-
}
|
|
324
|
-
}`,
|
|
325
|
-
vars,
|
|
326
|
-
sink,
|
|
327
|
-
);
|
|
328
|
-
onEventsCreated = async (
|
|
329
|
-
vars: OnEventsCreatedSubscriptionVariables,
|
|
330
|
-
sink: Sink<ExecutionResult<OnEventsCreatedSubscription>>,
|
|
331
|
-
) =>
|
|
332
|
-
this.sdk.subscribe(
|
|
333
|
-
`subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
|
|
334
|
-
onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
|
|
335
|
-
address, events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge }, id, networkId, quoteToken
|
|
336
|
-
}
|
|
337
|
-
}`,
|
|
338
|
-
vars,
|
|
339
|
-
sink,
|
|
340
|
-
);
|
|
341
|
-
onNftEventsCreated = async (
|
|
342
|
-
vars: OnNftEventsCreatedSubscriptionVariables,
|
|
343
|
-
sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
|
|
344
|
-
) =>
|
|
345
|
-
this.sdk.subscribe(
|
|
346
|
-
`subscription OnNftEventsCreated($address: String, $networkId: Int) {
|
|
347
|
-
onNftEventsCreated (address: $address, networkId: $networkId) {
|
|
348
|
-
address, events { aggregatorAddress, blockNumber, contractAddress, eventType, exchangeAddress, fillSource, id, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, logIndex, maker, networkId, numberOfTokens, orderDirection, paymentTokenAddress, poolAddress, priceError, sortKey, taker, timestamp, tokenId, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, tradeOffer { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, tradeReceived { ... on NftEventNftTradeItem { address, amount, recipient, tokenId, type }, ... on NftEventTokenTradeItem { address, amount, individualPriceNetworkBaseToken, individualPriceUsd, individualTradePrice, isPrice, priceError, recipient, totalPriceNetworkBaseToken, totalPriceUsd, totalTradePrice, type } }, transactionHash, transactionIndex }, id, networkId
|
|
349
|
-
}
|
|
350
|
-
}`,
|
|
351
|
-
vars,
|
|
352
|
-
sink,
|
|
353
|
-
);
|
|
354
|
-
onUnconfirmedEventsCreated = async (
|
|
355
|
-
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
356
|
-
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
357
|
-
) =>
|
|
358
|
-
this.sdk.subscribe(
|
|
359
|
-
`subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
|
|
360
|
-
onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
|
|
361
|
-
address, events { address, blockHash, blockNumber, data { ... on UnconfirmedLiquidityChangeEventData { amount0, amount0Shifted, amount1, amount1Shifted, type }, ... on UnconfirmedSwapEventData { amountBaseToken, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, type } }, eventDisplayType, eventType, id, logIndex, maker, networkId, quoteToken, supplementalIndex, timestamp, transactionHash, transactionIndex }, id, networkId, quoteToken
|
|
362
|
-
}
|
|
363
|
-
}`,
|
|
364
|
-
vars,
|
|
365
|
-
sink,
|
|
366
|
-
);
|
|
367
|
-
onPriceUpdated = async (
|
|
368
|
-
vars: OnPriceUpdatedSubscriptionVariables,
|
|
369
|
-
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
|
|
370
|
-
) =>
|
|
371
|
-
this.sdk.subscribe(
|
|
372
|
-
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
373
|
-
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
374
|
-
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
375
|
-
}
|
|
376
|
-
}`,
|
|
377
|
-
vars,
|
|
378
|
-
sink,
|
|
379
|
-
);
|
|
380
|
-
onNftPoolEventsCreated = async (
|
|
381
|
-
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
382
|
-
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
380
|
+
onTokenLifecycleEventsCreated = async (
|
|
381
|
+
vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
|
|
382
|
+
sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
|
|
383
383
|
) =>
|
|
384
384
|
this.sdk.subscribe(
|
|
385
|
-
`subscription
|
|
386
|
-
|
|
387
|
-
|
|
385
|
+
`subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
|
|
386
|
+
onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
|
|
387
|
+
events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
|
|
388
388
|
}
|
|
389
389
|
}`,
|
|
390
390
|
vars,
|
|
@@ -403,14 +403,14 @@ export class Subscribe {
|
|
|
403
403
|
vars,
|
|
404
404
|
sink,
|
|
405
405
|
);
|
|
406
|
-
|
|
407
|
-
vars:
|
|
408
|
-
sink: Sink<ExecutionResult<
|
|
406
|
+
onLatestTokens = async (
|
|
407
|
+
vars: OnLatestTokensSubscriptionVariables,
|
|
408
|
+
sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
|
|
409
409
|
) =>
|
|
410
410
|
this.sdk.subscribe(
|
|
411
|
-
`subscription
|
|
412
|
-
|
|
413
|
-
|
|
411
|
+
`subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
|
|
412
|
+
onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
|
|
413
|
+
blockHash, blockNumber, creatorAddress, creatorBalance, decimals, id, networkId, simulationResults { buyGasUsed, buySuccess, buyTax, canRenounceOwnership, canTransferOwnership, isOwnerRenounced, maxBuyAmount, maxSellAmount, openTradingCall, sellGasUsed, sellSuccess, sellTax }, timeCreated, tokenAddress, tokenName, tokenSymbol, totalSupply, traceIndex, transactionHash, transactionIndex
|
|
414
414
|
}
|
|
415
415
|
}`,
|
|
416
416
|
vars,
|
|
@@ -429,14 +429,14 @@ export class Subscribe {
|
|
|
429
429
|
vars,
|
|
430
430
|
sink,
|
|
431
431
|
);
|
|
432
|
-
|
|
433
|
-
vars:
|
|
434
|
-
sink: Sink<ExecutionResult<
|
|
432
|
+
onBalanceUpdated = async (
|
|
433
|
+
vars: OnBalanceUpdatedSubscriptionVariables,
|
|
434
|
+
sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
|
|
435
435
|
) =>
|
|
436
436
|
this.sdk.subscribe(
|
|
437
|
-
`subscription
|
|
438
|
-
|
|
439
|
-
|
|
437
|
+
`subscription OnBalanceUpdated($walletAddress: String!) {
|
|
438
|
+
onBalanceUpdated (walletAddress: $walletAddress) {
|
|
439
|
+
address, balance, firstHeldTimestamp, networkId, shiftedBalance, tokenAddress, tokenId, walletId
|
|
440
440
|
}
|
|
441
441
|
}`,
|
|
442
442
|
vars,
|