@codex-data/sdk 1.0.40 → 1.1.0-beta.1
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/README.md +137 -39
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -26
- package/dist/index.mjs +4 -0
- package/dist/sdk/Mutation.d.ts +3 -3
- package/dist/sdk/Mutation.js +2 -2
- package/dist/sdk/Mutation.mjs +13 -0
- package/dist/sdk/Query.d.ts +53 -54
- package/dist/sdk/Query.js +53 -54
- package/dist/sdk/Query.mjs +74 -0
- package/dist/sdk/Subscribe.d.ts +17 -18
- package/dist/sdk/Subscribe.js +84 -184
- package/dist/sdk/Subscribe.mjs +138 -0
- package/dist/sdk/generated/gql.d.ts +47 -43
- package/dist/sdk/generated/gql.js +22 -22
- package/dist/sdk/generated/gql.mjs +103 -0
- package/dist/sdk/generated/graphql.d.ts +213 -16
- package/dist/sdk/generated/graphql.js +33 -25
- package/dist/sdk/generated/graphql.mjs +1739 -0
- package/dist/sdk/generated/index.d.ts +0 -2
- package/dist/sdk/generated/index.js +0 -2
- package/dist/sdk/generated/index.mjs +1 -0
- package/dist/sdk/index.d.ts +0 -1
- package/dist/sdk/index.js +0 -1
- package/dist/sdk/index.mjs +150 -0
- package/dist/sdk/invariant.d.ts +0 -1
- package/dist/sdk/invariant.js +0 -1
- package/dist/sdk/invariant.mjs +26 -0
- package/package.json +54 -26
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/resources/graphql.d.ts +0 -9875
- package/dist/resources/graphql.d.ts.map +0 -1
- package/dist/resources/graphql.js +0 -1640
- package/dist/resources/graphql.js.map +0 -1
- package/dist/sdk/Mutation.d.ts.map +0 -1
- package/dist/sdk/Mutation.js.map +0 -1
- package/dist/sdk/Query.d.ts.map +0 -1
- package/dist/sdk/Query.js.map +0 -1
- package/dist/sdk/Subscribe.d.ts.map +0 -1
- package/dist/sdk/Subscribe.js.map +0 -1
- package/dist/sdk/generated/fragment-masking.d.ts +0 -20
- package/dist/sdk/generated/fragment-masking.d.ts.map +0 -1
- package/dist/sdk/generated/fragment-masking.js +0 -22
- package/dist/sdk/generated/fragment-masking.js.map +0 -1
- package/dist/sdk/generated/gql.d.ts.map +0 -1
- package/dist/sdk/generated/gql.js.map +0 -1
- package/dist/sdk/generated/graphql.d.ts.map +0 -1
- package/dist/sdk/generated/graphql.js.map +0 -1
- package/dist/sdk/generated/index.d.ts.map +0 -1
- package/dist/sdk/generated/index.js.map +0 -1
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/index.js.map +0 -1
- package/dist/sdk/index.test.d.ts +0 -2
- package/dist/sdk/index.test.d.ts.map +0 -1
- package/dist/sdk/index.test.js +0 -321
- package/dist/sdk/index.test.js.map +0 -1
- package/dist/sdk/invariant.d.ts.map +0 -1
- package/dist/sdk/invariant.js.map +0 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export class Subscribe {
|
|
2
|
+
constructor(sdk) {
|
|
3
|
+
this.sdk = sdk;
|
|
4
|
+
this.onBalanceUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnBalanceUpdated($walletAddress: String!) {
|
|
5
|
+
onBalanceUpdated (walletAddress: $walletAddress) {
|
|
6
|
+
address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply, videoExternalUrl }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, tokenAddress, tokenId, tokenPriceUsd, walletId
|
|
7
|
+
}
|
|
8
|
+
}`, vars, sink);
|
|
9
|
+
this.onBarsUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
10
|
+
onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
11
|
+
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
|
|
12
|
+
}
|
|
13
|
+
}`, vars, sink);
|
|
14
|
+
this.onDetailedStatsUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnDetailedStatsUpdated($pairId: String, $tokenOfInterest: TokenOfInterest) {
|
|
15
|
+
onDetailedStatsUpdated (pairId: $pairId, tokenOfInterest: $tokenOfInterest) {
|
|
16
|
+
pairId, 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
|
|
17
|
+
}
|
|
18
|
+
}`, vars, sink);
|
|
19
|
+
this.onEventLabelCreated = (vars, sink) => this.sdk.subscribe(`subscription OnEventLabelCreated($id: String) {
|
|
20
|
+
onEventLabelCreated(id: $id) {
|
|
21
|
+
data {
|
|
22
|
+
... on FrontRunLabelData {
|
|
23
|
+
index
|
|
24
|
+
token0DrainedAmount
|
|
25
|
+
token1DrainedAmount
|
|
26
|
+
}
|
|
27
|
+
... on SandwichedLabelData {
|
|
28
|
+
token0DrainedAmountSandwich: token0DrainedAmount
|
|
29
|
+
token1DrainedAmountSandwich: token1DrainedAmount
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
id
|
|
33
|
+
label
|
|
34
|
+
logIndex
|
|
35
|
+
networkId
|
|
36
|
+
timestamp
|
|
37
|
+
transactionHash
|
|
38
|
+
transactionIndex
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`, vars, sink);
|
|
42
|
+
this.onEventsCreated = (vars, sink) => this.sdk.subscribe(`subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
|
|
43
|
+
onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
|
|
44
|
+
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
|
|
45
|
+
}
|
|
46
|
+
}`, vars, sink);
|
|
47
|
+
this.onEventsCreatedByMaker = (vars, sink) => this.sdk.subscribe(`subscription OnEventsCreatedByMaker($input: OnEventsCreatedByMakerInput!) {
|
|
48
|
+
onEventsCreatedByMaker (input: $input) {
|
|
49
|
+
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
|
|
50
|
+
}
|
|
51
|
+
}`, vars, sink);
|
|
52
|
+
this.onHoldersUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnHoldersUpdated($tokenId: String!) {
|
|
53
|
+
onHoldersUpdated (tokenId: $tokenId) {
|
|
54
|
+
balances { address, balance, balanceUsd, firstHeldTimestamp, networkId, shiftedBalance, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply, videoExternalUrl }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, launchpadName, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, tokenAddress, tokenId, tokenPriceUsd, walletId }, holders, networkId, tokenAddress, tokenId
|
|
55
|
+
}
|
|
56
|
+
}`, vars, sink);
|
|
57
|
+
this.onLatestPairUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnLatestPairUpdated($id: String, $networkId: Int) {
|
|
58
|
+
onLatestPairUpdated (id: $id, networkId: $networkId) {
|
|
59
|
+
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
|
|
60
|
+
}
|
|
61
|
+
}`, vars, sink);
|
|
62
|
+
this.onLatestTokens = (vars, sink) => this.sdk.subscribe(`subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
|
|
63
|
+
onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
|
|
64
|
+
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
|
|
65
|
+
}
|
|
66
|
+
}`, vars, sink);
|
|
67
|
+
this.onLaunchpadTokenEvent = (vars, sink) => this.sdk.subscribe(`subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
|
|
68
|
+
onLaunchpadTokenEvent (input: $input) {
|
|
69
|
+
address, bundlerCount, bundlerHeldPercentage, buyCount1, devHeldPercentage, eventType, holders, insiderCount, insiderHeldPercentage, launchpadName, liquidity, marketCap, networkId, price, protocol, sellCount1, sniperCount, sniperHeldPercentage, 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, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply, videoExternalUrl }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, 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
|
|
70
|
+
}
|
|
71
|
+
}`, vars, sink);
|
|
72
|
+
this.onLaunchpadTokenEventBatch = (vars, sink) => this.sdk.subscribe(`subscription OnLaunchpadTokenEventBatch($input: OnLaunchpadTokenEventBatchInput) {
|
|
73
|
+
onLaunchpadTokenEventBatch (input: $input) {
|
|
74
|
+
address, bundlerCount, bundlerHeldPercentage, buyCount1, devHeldPercentage, eventType, holders, insiderCount, insiderHeldPercentage, launchpadName, liquidity, marketCap, networkId, price, protocol, sellCount1, sniperCount, sniperHeldPercentage, 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, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply, videoExternalUrl }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, 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
|
|
75
|
+
}
|
|
76
|
+
}`, vars, sink);
|
|
77
|
+
this.onNftAssetsCreated = (vars, sink) => this.sdk.subscribe(`subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
|
|
78
|
+
onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
|
|
79
|
+
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
|
|
80
|
+
}
|
|
81
|
+
}`, vars, sink);
|
|
82
|
+
this.onNftEventsCreated = (vars, sink) => this.sdk.subscribe(`subscription OnNftEventsCreated($address: String, $networkId: Int) {
|
|
83
|
+
onNftEventsCreated (address: $address, networkId: $networkId) {
|
|
84
|
+
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
|
|
85
|
+
}
|
|
86
|
+
}`, vars, sink);
|
|
87
|
+
this.onNftPoolEventsCreated = (vars, sink) => this.sdk.subscribe(`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
88
|
+
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
89
|
+
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
|
|
90
|
+
}
|
|
91
|
+
}`, vars, sink);
|
|
92
|
+
this.onPairMetadataUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $useNonLiquidityTokenAsQuoteToken: Boolean) {
|
|
93
|
+
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, useNonLiquidityTokenAsQuoteToken: $useNonLiquidityTokenAsQuoteToken) {
|
|
94
|
+
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, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply, videoExternalUrl }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, 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, imageThumbHash, imageThumbUrl, isScam, name, networkId, symbol, totalSupply, videoExternalUrl }, isFreezableValid, isMintableValid, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadIconUrl, 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, highPrice4, highPrice5m, highPrice12, highPrice24, id, liquidity, liquidityToken, lowPrice1, lowPrice4, lowPrice5m, lowPrice12, lowPrice24, networkId, nonLiquidityToken, pairAddress, price, priceChange1, priceChange4, priceChange5m, priceChange12, priceChange24, priceNonQuoteToken, 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, volume4, volume5m, volume12, volume24
|
|
95
|
+
}
|
|
96
|
+
}`, vars, sink);
|
|
97
|
+
this.onPriceUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
98
|
+
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
99
|
+
address, blockNumber, networkId, priceUsd, timestamp
|
|
100
|
+
}
|
|
101
|
+
}`, vars, sink);
|
|
102
|
+
this.onPricesUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
|
|
103
|
+
onPricesUpdated (input: $input) {
|
|
104
|
+
address, blockNumber, networkId, priceUsd, timestamp
|
|
105
|
+
}
|
|
106
|
+
}`, vars, sink);
|
|
107
|
+
this.onTokenBarsUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnTokenBarsUpdated($networkId: Int, $tokenId: String) {
|
|
108
|
+
onTokenBarsUpdated (networkId: $networkId, tokenId: $tokenId) {
|
|
109
|
+
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, statsType, timestamp, tokenAddress, tokenId
|
|
110
|
+
}
|
|
111
|
+
}`, vars, sink);
|
|
112
|
+
this.onTokenEventsCreated = (vars, sink) => this.sdk.subscribe(`subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
|
|
113
|
+
onTokenEventsCreated (input: $input) {
|
|
114
|
+
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
|
|
115
|
+
}
|
|
116
|
+
}`, vars, sink);
|
|
117
|
+
this.onTokenLifecycleEventsCreated = (vars, sink) => this.sdk.subscribe(`subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
|
|
118
|
+
onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
|
|
119
|
+
events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
|
|
120
|
+
}
|
|
121
|
+
}`, vars, sink);
|
|
122
|
+
this.onUnconfirmedBarsUpdated = (vars, sink) => this.sdk.subscribe(`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
123
|
+
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
124
|
+
aggregates { r1 { c, h, l, o, t, v, volume }, r1D { 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 }, r7D { c, h, l, o, t, v, volume }, r15 { c, h, l, o, t, v, volume }, r15S { c, h, l, o, t, v, volume }, r60 { c, h, l, o, t, v, volume }, r240 { c, h, l, o, t, v, volume }, r720 { c, h, l, o, t, v, volume } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, timestamp
|
|
125
|
+
}
|
|
126
|
+
}`, vars, sink);
|
|
127
|
+
this.onUnconfirmedEventsCreated = (vars, sink) => this.sdk.subscribe(`subscription OnUnconfirmedEventsCreated($address: String, $id: String, $quoteToken: QuoteToken) {
|
|
128
|
+
onUnconfirmedEventsCreated (address: $address, id: $id, quoteToken: $quoteToken) {
|
|
129
|
+
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
|
|
130
|
+
}
|
|
131
|
+
}`, vars, sink);
|
|
132
|
+
this.onUnconfirmedEventsCreatedByMaker = (vars, sink) => this.sdk.subscribe(`subscription OnUnconfirmedEventsCreatedByMaker($input: OnUnconfirmedEventsCreatedByMakerInput!) {
|
|
133
|
+
onUnconfirmedEventsCreatedByMaker (input: $input) {
|
|
134
|
+
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
|
|
135
|
+
}
|
|
136
|
+
}`, vars, sink);
|
|
137
|
+
}
|
|
138
|
+
}
|