@codex-data/sdk 1.0.6 → 1.0.7
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/generated_queries/FilterPairs.graphql +20 -0
- package/dist/resources/generated_queries/FilterTokens.graphql +20 -0
- package/dist/resources/generated_queries/GetBars.graphql +4 -1
- package/dist/resources/generated_queries/GetCommunityNotes.graphql +2 -0
- package/dist/resources/generated_queries/GetDetailedPairStats.graphql +4 -0
- package/dist/resources/generated_queries/GetDetailedPairsStats.graphql +4 -0
- package/dist/resources/generated_queries/GetTokenEvents.graphql +1 -0
- package/dist/resources/generated_queries/GetTokenEventsForMaker.graphql +1 -0
- package/dist/resources/generated_queries/ListPairsForToken.graphql +4 -0
- package/dist/resources/generated_queries/ListPairsWithMetadataForToken.graphql +8 -0
- package/dist/resources/generated_queries/PairMetadata.graphql +4 -0
- package/dist/resources/generated_queries/Token.graphql +2 -0
- package/dist/resources/generated_queries/Tokens.graphql +2 -0
- package/dist/resources/generated_subscriptions/OnEventsCreated.graphql +1 -0
- package/dist/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +2 -0
- package/dist/resources/generated_subscriptions/OnLaunchpadTokenEventBatch.graphql +91 -0
- package/dist/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +4 -0
- package/dist/resources/generated_subscriptions/OnTokenEventsCreated.graphql +1 -0
- package/dist/resources/graphql.d.ts +167 -8
- package/dist/resources/graphql.d.ts.map +1 -1
- package/dist/resources/graphql.js +33 -0
- package/dist/resources/graphql.js.map +1 -1
- package/dist/resources/graphql.schema.json +918 -14
- package/dist/resources/graphql.ts +167 -8
- package/dist/resources/schema.graphql +250 -8
- package/dist/resources/subscriptions_override/OnLaunchpadTokenEventBatch.graphql +91 -0
- package/dist/scripts/generateGraphql.js +3 -4
- package/dist/scripts/generateGraphql.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 +49 -49
- package/dist/sdk/Query.d.ts.map +1 -1
- package/dist/sdk/Query.js +49 -49
- package/dist/sdk/Query.js.map +1 -1
- package/dist/sdk/Subscribe.d.ts +17 -16
- package/dist/sdk/Subscribe.d.ts.map +1 -1
- package/dist/sdk/Subscribe.js +171 -77
- package/dist/sdk/Subscribe.js.map +1 -1
- package/dist/sdk/generated/gql.d.ts +41 -34
- package/dist/sdk/generated/gql.d.ts.map +1 -1
- package/dist/sdk/generated/gql.js +18 -17
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +355 -9
- package/dist/sdk/generated/graphql.d.ts.map +1 -1
- package/dist/sdk/generated/graphql.js +52 -18
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/package.json +1 -1
- package/src/resources/generated_queries/FilterPairs.graphql +20 -0
- package/src/resources/generated_queries/FilterTokens.graphql +20 -0
- package/src/resources/generated_queries/GetBars.graphql +4 -1
- package/src/resources/generated_queries/GetCommunityNotes.graphql +2 -0
- package/src/resources/generated_queries/GetDetailedPairStats.graphql +4 -0
- package/src/resources/generated_queries/GetDetailedPairsStats.graphql +4 -0
- package/src/resources/generated_queries/GetTokenEvents.graphql +1 -0
- package/src/resources/generated_queries/GetTokenEventsForMaker.graphql +1 -0
- package/src/resources/generated_queries/ListPairsForToken.graphql +4 -0
- package/src/resources/generated_queries/ListPairsWithMetadataForToken.graphql +8 -0
- package/src/resources/generated_queries/PairMetadata.graphql +4 -0
- package/src/resources/generated_queries/Token.graphql +2 -0
- package/src/resources/generated_queries/Tokens.graphql +2 -0
- package/src/resources/generated_subscriptions/OnEventsCreated.graphql +1 -0
- package/src/resources/generated_subscriptions/OnLaunchpadTokenEvent.graphql +2 -0
- package/src/resources/generated_subscriptions/OnLaunchpadTokenEventBatch.graphql +91 -0
- package/src/resources/generated_subscriptions/OnPairMetadataUpdated.graphql +4 -0
- package/src/resources/generated_subscriptions/OnTokenEventsCreated.graphql +1 -0
- package/src/resources/graphql.schema.json +918 -14
- package/src/resources/graphql.ts +167 -8
- package/src/resources/schema.graphql +250 -8
- package/src/resources/subscriptions_override/OnLaunchpadTokenEventBatch.graphql +91 -0
- package/src/scripts/generateGraphql.ts +2 -4
- package/src/sdk/Mutation.ts +2 -2
- package/src/sdk/Query.ts +103 -103
- package/src/sdk/Subscribe.ts +225 -123
- package/src/sdk/generated/gql.ts +39 -34
- package/src/sdk/generated/graphql.ts +207 -42
package/src/sdk/Subscribe.ts
CHANGED
|
@@ -18,6 +18,8 @@ import {
|
|
|
18
18
|
OnLatestPairUpdatedSubscriptionVariables,
|
|
19
19
|
OnLatestTokensSubscription,
|
|
20
20
|
OnLatestTokensSubscriptionVariables,
|
|
21
|
+
OnLaunchpadTokenEventBatchSubscription,
|
|
22
|
+
OnLaunchpadTokenEventBatchSubscriptionVariables,
|
|
21
23
|
OnLaunchpadTokenEventSubscription,
|
|
22
24
|
OnLaunchpadTokenEventSubscriptionVariables,
|
|
23
25
|
OnNftAssetsCreatedSubscription,
|
|
@@ -49,66 +51,40 @@ import { Codex } from "./index";
|
|
|
49
51
|
|
|
50
52
|
export class Subscribe {
|
|
51
53
|
constructor(private sdk: Codex) {}
|
|
52
|
-
|
|
53
|
-
vars:
|
|
54
|
-
sink: Sink<ExecutionResult<
|
|
55
|
-
) =>
|
|
56
|
-
this.sdk.subscribe(
|
|
57
|
-
`subscription OnHoldersUpdated($tokenId: String!) {
|
|
58
|
-
onHoldersUpdated (tokenId: $tokenId) {
|
|
59
|
-
balances { address, balance, firstHeldTimestamp, networkId, shiftedBalance, tokenAddress, tokenId, walletId }, holders, networkId, tokenAddress, tokenId
|
|
60
|
-
}
|
|
61
|
-
}`,
|
|
62
|
-
vars,
|
|
63
|
-
sink,
|
|
64
|
-
);
|
|
65
|
-
onUnconfirmedBarsUpdated = async (
|
|
66
|
-
vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
|
|
67
|
-
sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
|
|
68
|
-
) =>
|
|
69
|
-
this.sdk.subscribe(
|
|
70
|
-
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
71
|
-
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
72
|
-
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
|
|
73
|
-
}
|
|
74
|
-
}`,
|
|
75
|
-
vars,
|
|
76
|
-
sink,
|
|
77
|
-
);
|
|
78
|
-
onUnconfirmedEventsCreated = async (
|
|
79
|
-
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
80
|
-
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
54
|
+
onTokenBarsUpdated = async (
|
|
55
|
+
vars: OnTokenBarsUpdatedSubscriptionVariables,
|
|
56
|
+
sink: Sink<ExecutionResult<OnTokenBarsUpdatedSubscription>>,
|
|
81
57
|
) =>
|
|
82
58
|
this.sdk.subscribe(
|
|
83
|
-
`subscription
|
|
84
|
-
|
|
85
|
-
|
|
59
|
+
`subscription OnTokenBarsUpdated($networkId: Int, $statsType: TokenPairStatisticsType, $tokenId: String) {
|
|
60
|
+
onTokenBarsUpdated (networkId: $networkId, statsType: $statsType, tokenId: $tokenId) {
|
|
61
|
+
aggregates { r1 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r7D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r60 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r240 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r720 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, statsType, timestamp, tokenAddress, tokenId
|
|
86
62
|
}
|
|
87
63
|
}`,
|
|
88
64
|
vars,
|
|
89
65
|
sink,
|
|
90
66
|
);
|
|
91
|
-
|
|
92
|
-
vars:
|
|
93
|
-
sink: Sink<ExecutionResult<
|
|
67
|
+
onLatestTokens = async (
|
|
68
|
+
vars: OnLatestTokensSubscriptionVariables,
|
|
69
|
+
sink: Sink<ExecutionResult<OnLatestTokensSubscription>>,
|
|
94
70
|
) =>
|
|
95
71
|
this.sdk.subscribe(
|
|
96
|
-
`subscription
|
|
97
|
-
|
|
98
|
-
|
|
72
|
+
`subscription OnLatestTokens($id: String, $networkId: Int, $tokenAddress: String) {
|
|
73
|
+
onLatestTokens (id: $id, networkId: $networkId, tokenAddress: $tokenAddress) {
|
|
74
|
+
blockHash, blockNumber, creatorAddress, creatorBalance, decimals, id, networkId, simulationResults { buyGasUsed, buySuccess, buyTax, canRenounceOwnership, canTransferOwnership, isOwnerRenounced, maxBuyAmount, maxSellAmount, openTradingCall, sellGasUsed, sellSuccess, sellTax }, timeCreated, tokenAddress, tokenName, tokenSymbol, totalSupply, traceIndex, transactionHash, transactionIndex
|
|
99
75
|
}
|
|
100
76
|
}`,
|
|
101
77
|
vars,
|
|
102
78
|
sink,
|
|
103
79
|
);
|
|
104
|
-
|
|
105
|
-
vars:
|
|
106
|
-
sink: Sink<ExecutionResult<
|
|
80
|
+
onTokenLifecycleEventsCreated = async (
|
|
81
|
+
vars: OnTokenLifecycleEventsCreatedSubscriptionVariables,
|
|
82
|
+
sink: Sink<ExecutionResult<OnTokenLifecycleEventsCreatedSubscription>>,
|
|
107
83
|
) =>
|
|
108
84
|
this.sdk.subscribe(
|
|
109
|
-
`subscription
|
|
110
|
-
|
|
111
|
-
|
|
85
|
+
`subscription OnTokenLifecycleEventsCreated($address: String, $networkId: Int) {
|
|
86
|
+
onTokenLifecycleEventsCreated (address: $address, networkId: $networkId) {
|
|
87
|
+
events { blockHash, blockNumber, data { ... on TokenBurnEventData { amount, circulatingSupply, totalSupply }, ... on TokenMintEventData { amount, circulatingSupply, totalSupply } }, eventType, id, logIndex, maker, networkId, timestamp, tokenAddress, transactionHash, transactionIndex }, id
|
|
112
88
|
}
|
|
113
89
|
}`,
|
|
114
90
|
vars,
|
|
@@ -145,92 +121,192 @@ export class Subscribe {
|
|
|
145
121
|
vars,
|
|
146
122
|
sink,
|
|
147
123
|
);
|
|
148
|
-
|
|
149
|
-
vars:
|
|
150
|
-
sink: Sink<ExecutionResult<
|
|
124
|
+
onLaunchpadTokenEvent = async (
|
|
125
|
+
vars: OnLaunchpadTokenEventSubscriptionVariables,
|
|
126
|
+
sink: Sink<ExecutionResult<OnLaunchpadTokenEventSubscription>>,
|
|
151
127
|
) =>
|
|
152
128
|
this.sdk.subscribe(
|
|
153
|
-
`subscription
|
|
154
|
-
|
|
155
|
-
|
|
129
|
+
`subscription OnLaunchpadTokenEvent($input: OnLaunchpadTokenEventInput) {
|
|
130
|
+
onLaunchpadTokenEvent (input: $input) {
|
|
131
|
+
address, buyCount1, eventType, holders, marketCap, networkId, price, protocol, sellCount1, token { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, transactions1, volume1
|
|
156
132
|
}
|
|
157
133
|
}`,
|
|
158
134
|
vars,
|
|
159
135
|
sink,
|
|
160
136
|
);
|
|
161
|
-
|
|
162
|
-
vars:
|
|
163
|
-
sink: Sink<ExecutionResult<
|
|
137
|
+
onDetailedStatsUpdated = async (
|
|
138
|
+
vars: OnDetailedStatsUpdatedSubscriptionVariables,
|
|
139
|
+
sink: Sink<ExecutionResult<OnDetailedStatsUpdatedSubscription>>,
|
|
164
140
|
) =>
|
|
165
141
|
this.sdk.subscribe(
|
|
166
|
-
`subscription
|
|
167
|
-
|
|
168
|
-
|
|
142
|
+
`subscription OnDetailedStatsUpdated($pairId: String, $statsType: TokenPairStatisticsType, $tokenOfInterest: TokenOfInterest) {
|
|
143
|
+
onDetailedStatsUpdated (pairId: $pairId, statsType: $statsType, tokenOfInterest: $tokenOfInterest) {
|
|
144
|
+
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
|
|
169
145
|
}
|
|
170
146
|
}`,
|
|
171
147
|
vars,
|
|
172
148
|
sink,
|
|
173
149
|
);
|
|
174
|
-
|
|
175
|
-
vars:
|
|
176
|
-
sink: Sink<ExecutionResult<
|
|
150
|
+
onBalanceUpdated = async (
|
|
151
|
+
vars: OnBalanceUpdatedSubscriptionVariables,
|
|
152
|
+
sink: Sink<ExecutionResult<OnBalanceUpdatedSubscription>>,
|
|
177
153
|
) =>
|
|
178
154
|
this.sdk.subscribe(
|
|
179
|
-
`subscription
|
|
180
|
-
|
|
181
|
-
address,
|
|
155
|
+
`subscription OnBalanceUpdated($walletAddress: String!) {
|
|
156
|
+
onBalanceUpdated (walletAddress: $walletAddress) {
|
|
157
|
+
address, balance, firstHeldTimestamp, networkId, shiftedBalance, tokenAddress, tokenId, walletId
|
|
182
158
|
}
|
|
183
159
|
}`,
|
|
184
160
|
vars,
|
|
185
161
|
sink,
|
|
186
162
|
);
|
|
187
|
-
|
|
188
|
-
vars:
|
|
189
|
-
sink: Sink<ExecutionResult<
|
|
163
|
+
onUnconfirmedBarsUpdated = async (
|
|
164
|
+
vars: OnUnconfirmedBarsUpdatedSubscriptionVariables,
|
|
165
|
+
sink: Sink<ExecutionResult<OnUnconfirmedBarsUpdatedSubscription>>,
|
|
190
166
|
) =>
|
|
191
167
|
this.sdk.subscribe(
|
|
192
|
-
`subscription
|
|
193
|
-
|
|
194
|
-
|
|
168
|
+
`subscription OnUnconfirmedBarsUpdated($pairId: String, $quoteToken: QuoteToken) {
|
|
169
|
+
onUnconfirmedBarsUpdated (pairId: $pairId, quoteToken: $quoteToken) {
|
|
170
|
+
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
|
|
195
171
|
}
|
|
196
172
|
}`,
|
|
197
173
|
vars,
|
|
198
174
|
sink,
|
|
199
175
|
);
|
|
200
|
-
|
|
201
|
-
vars:
|
|
202
|
-
sink: Sink<ExecutionResult<
|
|
176
|
+
onPricesUpdated = async (
|
|
177
|
+
vars: OnPricesUpdatedSubscriptionVariables,
|
|
178
|
+
sink: Sink<ExecutionResult<OnPricesUpdatedSubscription>>,
|
|
203
179
|
) =>
|
|
204
180
|
this.sdk.subscribe(
|
|
205
|
-
`subscription
|
|
206
|
-
|
|
207
|
-
|
|
181
|
+
`subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
|
|
182
|
+
onPricesUpdated (input: $input) {
|
|
183
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
208
184
|
}
|
|
209
185
|
}`,
|
|
210
186
|
vars,
|
|
211
187
|
sink,
|
|
212
188
|
);
|
|
213
|
-
|
|
214
|
-
vars:
|
|
215
|
-
sink: Sink<ExecutionResult<
|
|
189
|
+
onSimulateTokenContract = async (
|
|
190
|
+
vars: OnSimulateTokenContractSubscriptionVariables,
|
|
191
|
+
sink: Sink<ExecutionResult<OnSimulateTokenContractSubscription>>,
|
|
216
192
|
) =>
|
|
217
193
|
this.sdk.subscribe(
|
|
218
|
-
`subscription
|
|
219
|
-
|
|
220
|
-
|
|
194
|
+
`subscription OnSimulateTokenContract($contractAddress: String, $networkId: Int!, $simulationId: String) {
|
|
195
|
+
onSimulateTokenContract (contractAddress: $contractAddress, networkId: $networkId, simulationId: $simulationId) {
|
|
196
|
+
analysisType, blockNumber, contractBalance { tokenContractEthBalance, tokenContractTokenBalance }, contractHashKey, creator { creatorAddress, creatorEthBalance, creatorTokenBalance }, deploy { deploySuccess, tokenMintedToDeployer }, errors { contractBalanceErrors { tokenContractEthBalanceError, tokenContractTokenBalanceError }, creatorErrors { creatorEthBalanceError, creatorTokenBalanceError }, deployErrors { deployError, tokenMintedToDeployerError }, liquidityErrors { addLiquidityError, lpTotalSupplyError, postLiquidityEnableTradingError, preLiquidityEnableTradingError }, ownerErrors { ownerAddressError, ownerEthBalanceError, ownerTokenBalanceError }, simulatorError, swapErrors { buyError, buyErrorEnum, sellError, sellErrorEnum }, tokenErrors { canRenounceOwnershipError, canTransferOwnershipError, decimalsError, tokenNameError, tokenSymbolError, totalSupplyError }, transferErrors { tokenContractApprovalError, tokenTransferredToContractError, userApprovalError } }, id, liquidity { addLiquiditySuccess, liquiditySetByPreLiquidityOpenTradingCall, lpTotalSupply, pairAddress, postLiquidityEnableTradingCall, postLiquidityEnableTradingSuccess, preLiquidityEnableTradingCall, preLiquidityEnableTradingSuccess, preLiquidityEnableTradingSupportsTransfer }, networkId, owner { ownerAddress, ownerEthBalance, ownerTokenBalance }, sortKey, status, swap { buyGasUsed, buySuccess, buyTax, maxBuyAmount, maxSellAmount, sellGasUsed, sellSuccess, sellTax }, timestamp, token { canRenounceOwnership, canTransferOwnership, contractAddress, decimals, isOwnerRenounced, tokenName, tokenSymbol, totalSupply }, transfer { tokenContractApprovalSuccess, tokenTransferredToContractSuccess, userApprovalSuccess }, uuid, uuidHashKey
|
|
221
197
|
}
|
|
222
198
|
}`,
|
|
223
199
|
vars,
|
|
224
200
|
sink,
|
|
225
201
|
);
|
|
226
|
-
|
|
227
|
-
vars:
|
|
228
|
-
sink: Sink<ExecutionResult<
|
|
202
|
+
onLaunchpadTokenEventBatch = async (
|
|
203
|
+
vars: OnLaunchpadTokenEventBatchSubscriptionVariables,
|
|
204
|
+
sink: Sink<ExecutionResult<OnLaunchpadTokenEventBatchSubscription>>,
|
|
229
205
|
) =>
|
|
230
206
|
this.sdk.subscribe(
|
|
231
|
-
`subscription
|
|
232
|
-
|
|
233
|
-
|
|
207
|
+
`subscription OnLaunchpadTokenEventBatch {
|
|
208
|
+
onLaunchpadTokenEventBatch {
|
|
209
|
+
address
|
|
210
|
+
buyCount1
|
|
211
|
+
eventType
|
|
212
|
+
holders
|
|
213
|
+
marketCap
|
|
214
|
+
networkId
|
|
215
|
+
price
|
|
216
|
+
protocol
|
|
217
|
+
sellCount1
|
|
218
|
+
token {
|
|
219
|
+
address
|
|
220
|
+
cmcId
|
|
221
|
+
createBlockNumber
|
|
222
|
+
createTransactionHash
|
|
223
|
+
createdAt
|
|
224
|
+
creatorAddress
|
|
225
|
+
decimals
|
|
226
|
+
exchanges {
|
|
227
|
+
address
|
|
228
|
+
color
|
|
229
|
+
exchangeVersion
|
|
230
|
+
iconUrl
|
|
231
|
+
id
|
|
232
|
+
name
|
|
233
|
+
networkId
|
|
234
|
+
tradeUrl
|
|
235
|
+
}
|
|
236
|
+
freezable
|
|
237
|
+
id
|
|
238
|
+
info {
|
|
239
|
+
address
|
|
240
|
+
circulatingSupply
|
|
241
|
+
cmcId
|
|
242
|
+
description
|
|
243
|
+
id
|
|
244
|
+
imageBannerUrl
|
|
245
|
+
imageLargeUrl
|
|
246
|
+
imageSmallUrl
|
|
247
|
+
imageThumbUrl
|
|
248
|
+
isScam
|
|
249
|
+
name
|
|
250
|
+
networkId
|
|
251
|
+
symbol
|
|
252
|
+
totalSupply
|
|
253
|
+
}
|
|
254
|
+
isScam
|
|
255
|
+
launchpad {
|
|
256
|
+
completed
|
|
257
|
+
completedAt
|
|
258
|
+
completedSlot
|
|
259
|
+
graduationPercent
|
|
260
|
+
launchpadProtocol
|
|
261
|
+
migrated
|
|
262
|
+
migratedAt
|
|
263
|
+
migratedPoolAddress
|
|
264
|
+
migratedSlot
|
|
265
|
+
name
|
|
266
|
+
poolAddress
|
|
267
|
+
}
|
|
268
|
+
mintable
|
|
269
|
+
name
|
|
270
|
+
networkId
|
|
271
|
+
socialLinks {
|
|
272
|
+
bitcointalk
|
|
273
|
+
blog
|
|
274
|
+
coingecko
|
|
275
|
+
coinmarketcap
|
|
276
|
+
discord
|
|
277
|
+
email
|
|
278
|
+
facebook
|
|
279
|
+
github
|
|
280
|
+
instagram
|
|
281
|
+
linkedin
|
|
282
|
+
reddit
|
|
283
|
+
slack
|
|
284
|
+
telegram
|
|
285
|
+
twitch
|
|
286
|
+
twitter
|
|
287
|
+
website
|
|
288
|
+
wechat
|
|
289
|
+
whitepaper
|
|
290
|
+
youtube
|
|
291
|
+
}
|
|
292
|
+
symbol
|
|
293
|
+
}
|
|
294
|
+
transactions1
|
|
295
|
+
volume1
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
`,
|
|
299
|
+
vars,
|
|
300
|
+
sink,
|
|
301
|
+
);
|
|
302
|
+
onNftAssetsCreated = async (
|
|
303
|
+
vars: OnNftAssetsCreatedSubscriptionVariables,
|
|
304
|
+
sink: Sink<ExecutionResult<OnNftAssetsCreatedSubscription>>,
|
|
305
|
+
) =>
|
|
306
|
+
this.sdk.subscribe(
|
|
307
|
+
`subscription OnNftAssetsCreated($address: String, $networkId: Int, $tokenId: String) {
|
|
308
|
+
onNftAssetsCreated (address: $address, networkId: $networkId, tokenId: $tokenId) {
|
|
309
|
+
address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri
|
|
234
310
|
}
|
|
235
311
|
}`,
|
|
236
312
|
vars,
|
|
@@ -256,85 +332,111 @@ export class Subscribe {
|
|
|
256
332
|
this.sdk.subscribe(
|
|
257
333
|
`subscription OnEventsCreated($address: String, $id: String, $networkId: Int, $quoteToken: QuoteToken) {
|
|
258
334
|
onEventsCreated (address: $address, id: $id, networkId: $networkId, quoteToken: $quoteToken) {
|
|
259
|
-
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 }, id, networkId, 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
|
|
260
336
|
}
|
|
261
337
|
}`,
|
|
262
338
|
vars,
|
|
263
339
|
sink,
|
|
264
340
|
);
|
|
265
|
-
|
|
266
|
-
vars:
|
|
267
|
-
sink: Sink<ExecutionResult<
|
|
341
|
+
onNftEventsCreated = async (
|
|
342
|
+
vars: OnNftEventsCreatedSubscriptionVariables,
|
|
343
|
+
sink: Sink<ExecutionResult<OnNftEventsCreatedSubscription>>,
|
|
268
344
|
) =>
|
|
269
345
|
this.sdk.subscribe(
|
|
270
|
-
`subscription
|
|
271
|
-
|
|
272
|
-
|
|
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
|
|
273
349
|
}
|
|
274
350
|
}`,
|
|
275
351
|
vars,
|
|
276
352
|
sink,
|
|
277
353
|
);
|
|
278
|
-
|
|
279
|
-
vars:
|
|
280
|
-
sink: Sink<ExecutionResult<
|
|
354
|
+
onUnconfirmedEventsCreated = async (
|
|
355
|
+
vars: OnUnconfirmedEventsCreatedSubscriptionVariables,
|
|
356
|
+
sink: Sink<ExecutionResult<OnUnconfirmedEventsCreatedSubscription>>,
|
|
281
357
|
) =>
|
|
282
358
|
this.sdk.subscribe(
|
|
283
|
-
`subscription
|
|
284
|
-
|
|
285
|
-
address,
|
|
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
|
|
286
362
|
}
|
|
287
363
|
}`,
|
|
288
364
|
vars,
|
|
289
365
|
sink,
|
|
290
366
|
);
|
|
291
|
-
|
|
292
|
-
vars:
|
|
293
|
-
sink: Sink<ExecutionResult<
|
|
367
|
+
onPriceUpdated = async (
|
|
368
|
+
vars: OnPriceUpdatedSubscriptionVariables,
|
|
369
|
+
sink: Sink<ExecutionResult<OnPriceUpdatedSubscription>>,
|
|
294
370
|
) =>
|
|
295
371
|
this.sdk.subscribe(
|
|
296
|
-
`subscription
|
|
297
|
-
|
|
298
|
-
address,
|
|
372
|
+
`subscription OnPriceUpdated($address: String, $networkId: Int, $sourcePairAddress: String) {
|
|
373
|
+
onPriceUpdated (address: $address, networkId: $networkId, sourcePairAddress: $sourcePairAddress) {
|
|
374
|
+
address, confidence, networkId, poolAddress, priceUsd, timestamp
|
|
299
375
|
}
|
|
300
376
|
}`,
|
|
301
377
|
vars,
|
|
302
378
|
sink,
|
|
303
379
|
);
|
|
304
|
-
|
|
305
|
-
vars:
|
|
306
|
-
sink: Sink<ExecutionResult<
|
|
380
|
+
onNftPoolEventsCreated = async (
|
|
381
|
+
vars: OnNftPoolEventsCreatedSubscriptionVariables,
|
|
382
|
+
sink: Sink<ExecutionResult<OnNftPoolEventsCreatedSubscription>>,
|
|
307
383
|
) =>
|
|
308
384
|
this.sdk.subscribe(
|
|
309
|
-
`subscription
|
|
310
|
-
|
|
311
|
-
|
|
385
|
+
`subscription OnNftPoolEventsCreated($collectionAddress: String, $exchangeAddress: String, $networkId: Int, $poolAddress: String) {
|
|
386
|
+
onNftPoolEventsCreated (collectionAddress: $collectionAddress, exchangeAddress: $exchangeAddress, networkId: $networkId, poolAddress: $poolAddress) {
|
|
387
|
+
collectionAddress, events { blockHash, blockNumber, collectionAddress, collectionId, data { ... on NewPoolEventData { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftTokenBalance, ownerAddress, poolAddress, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NewPoolEventDataV2 { assetRecipientAddress, bondingCurveAddress, bondingCurveType, buyPriceT, collectionAddress, createdAt, delta, feeAmountT, nbtRatio, networkId, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenIds, nftTokenQuantities, ownerAddress, poolAddress, poolNftType, propertyChecker, royalties { percent, recipient }, sellPriceT, startPriceT, tokenAddress, tokenBalanceT, type, usdRatio }, ... on NftPoolAssetRecipientUpdateEventData { newAssetRecipient, type }, ... on NftPoolDeltaUpdateEventData { newDelta, type }, ... on NftPoolFeeUpdateEventData { nbtRatio, newFeeT, type, usdRatio }, ... on NftPoolNftDepositEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftDepositEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventData { nftTokenBalance, nftTokenIds, tokenBalanceT, type }, ... on NftPoolNftWithdrawalEventDataV2 { nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftTokenAmounts, nftTokenIds, tokenBalanceT, type }, ... on NftPoolOwnershipTransferredEventDataV2 { newOwner, type }, ... on NftPoolSpotPriceUpdateEventData { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolSpotPriceUpdateEventDataV2 { nbtRatio, newBuyPriceT, newSellPriceT, newSpotPriceT, type, usdRatio }, ... on NftPoolTokenDepositEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenDepositEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventData { amountT, nbtRatio, nftTokenBalance, tokenBalanceT, type, usdRatio }, ... on NftPoolTokenWithdrawalEventDataV2 { amountT, nbtRatio, tokenBalanceT, type, usdRatio }, ... on SwapNftInPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftInPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventData { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftTokenBalance, nftsTransfered { amountT, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio }, ... on SwapNftOutPoolEventDataV2 { amountT, nbtRatio, newBuyPriceT, newDelta, newSellPriceT, newSpotPriceT, nftAssets { address, attributes { class, css, displayType, maxValue, name, value, valueType }, description, id, media { image, processed, thumbLg, thumbSm }, name, networkId, originalImage, quantity, rawAssetData { animationUrl, externalUrl, imageData, imageUrl }, tokenId, uri }, nftsTransfered { amountT, nftQuantity, nftTokenId }, poolFeeT, protocolFeeT, tokenBalanceT, tokenId, type, usdRatio } }, eventType, exchangeAddress, id, logIndex, maker, networkId, poolAddress, poolType, timestamp, tokenAddress, transactionHash, transactionIndex }, exchangeAddress, id, networkId, poolAddress
|
|
312
388
|
}
|
|
313
389
|
}`,
|
|
314
390
|
vars,
|
|
315
391
|
sink,
|
|
316
392
|
);
|
|
317
|
-
|
|
318
|
-
vars:
|
|
319
|
-
sink: Sink<ExecutionResult<
|
|
393
|
+
onHoldersUpdated = async (
|
|
394
|
+
vars: OnHoldersUpdatedSubscriptionVariables,
|
|
395
|
+
sink: Sink<ExecutionResult<OnHoldersUpdatedSubscription>>,
|
|
320
396
|
) =>
|
|
321
397
|
this.sdk.subscribe(
|
|
322
|
-
`subscription
|
|
323
|
-
|
|
324
|
-
address, balance, firstHeldTimestamp, networkId, shiftedBalance, tokenAddress, tokenId, walletId
|
|
398
|
+
`subscription OnHoldersUpdated($tokenId: String!) {
|
|
399
|
+
onHoldersUpdated (tokenId: $tokenId) {
|
|
400
|
+
balances { address, balance, firstHeldTimestamp, networkId, shiftedBalance, tokenAddress, tokenId, walletId }, holders, networkId, tokenAddress, tokenId
|
|
325
401
|
}
|
|
326
402
|
}`,
|
|
327
403
|
vars,
|
|
328
404
|
sink,
|
|
329
405
|
);
|
|
330
|
-
|
|
331
|
-
vars:
|
|
332
|
-
sink: Sink<ExecutionResult<
|
|
406
|
+
onBarsUpdated = async (
|
|
407
|
+
vars: OnBarsUpdatedSubscriptionVariables,
|
|
408
|
+
sink: Sink<ExecutionResult<OnBarsUpdatedSubscription>>,
|
|
333
409
|
) =>
|
|
334
410
|
this.sdk.subscribe(
|
|
335
|
-
`subscription
|
|
336
|
-
|
|
337
|
-
|
|
411
|
+
`subscription OnBarsUpdated($pairId: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
|
|
412
|
+
onBarsUpdated (pairId: $pairId, quoteToken: $quoteToken, statsType: $statsType) {
|
|
413
|
+
aggregates { r1 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r1S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r5S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r7D { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r15S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r30S { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r60 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r240 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } }, r720 { t, token { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken }, usd { buyVolume, buyers, buys, c, h, l, liquidity, o, sellVolume, sellers, sells, t, traders, transactions, v, volume, volumeNativeToken } } }, eventSortKey, networkId, pairAddress, pairId, quoteToken, quoteTokenAddress, statsType, timestamp
|
|
414
|
+
}
|
|
415
|
+
}`,
|
|
416
|
+
vars,
|
|
417
|
+
sink,
|
|
418
|
+
);
|
|
419
|
+
onTokenEventsCreated = async (
|
|
420
|
+
vars: OnTokenEventsCreatedSubscriptionVariables,
|
|
421
|
+
sink: Sink<ExecutionResult<OnTokenEventsCreatedSubscription>>,
|
|
422
|
+
) =>
|
|
423
|
+
this.sdk.subscribe(
|
|
424
|
+
`subscription OnTokenEventsCreated($input: OnTokenEventsCreatedInput!) {
|
|
425
|
+
onTokenEventsCreated (input: $input) {
|
|
426
|
+
events { address, baseTokenPrice, blockHash, blockNumber, data { ... on BurnEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on MintEventData { amount0, amount0Shifted, amount1, amount1Shifted, tickLower, tickUpper, type }, ... on PoolBalanceChangedEventData { amount0, amount0Shifted, amount1, amount1Shifted, liquidity0, liquidity1, protocolFeeAmount0, protocolFeeAmount1, sender, token0, token1, type }, ... on SwapEventData { amount0, amount0In, amount0Out, amount1, amount1In, amount1Out, amountNonLiquidityToken, priceBaseToken, priceBaseTokenTotal, priceUsd, priceUsdTotal, tick, type } }, eventDisplayType, eventType, id, labels { sandwich { label, sandwichType, token0DrainedAmount, token1DrainedAmount }, washtrade { label } }, liquidityToken, logIndex, maker, networkId, quoteToken, timestamp, token0Address, token0PoolValueUsd, token0SwapValueUsd, token0ValueBase, token1Address, token1PoolValueUsd, token1SwapValueUsd, token1ValueBase, transactionHash, transactionIndex, walletAge }, id
|
|
427
|
+
}
|
|
428
|
+
}`,
|
|
429
|
+
vars,
|
|
430
|
+
sink,
|
|
431
|
+
);
|
|
432
|
+
onPairMetadataUpdated = async (
|
|
433
|
+
vars: OnPairMetadataUpdatedSubscriptionVariables,
|
|
434
|
+
sink: Sink<ExecutionResult<OnPairMetadataUpdatedSubscription>>,
|
|
435
|
+
) =>
|
|
436
|
+
this.sdk.subscribe(
|
|
437
|
+
`subscription OnPairMetadataUpdated($id: String, $quoteToken: QuoteToken, $statsType: TokenPairStatisticsType) {
|
|
438
|
+
onPairMetadataUpdated (id: $id, quoteToken: $quoteToken, statsType: $statsType) {
|
|
439
|
+
createdAt, enhancedToken0 { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, enhancedToken1 { address, cmcId, createBlockNumber, createTransactionHash, createdAt, creatorAddress, decimals, exchanges { address, color, exchangeVersion, iconUrl, id, name, networkId, tradeUrl }, freezable, id, info { address, circulatingSupply, cmcId, description, id, imageBannerUrl, imageLargeUrl, imageSmallUrl, imageThumbUrl, isScam, name, networkId, symbol, totalSupply }, isScam, launchpad { completed, completedAt, completedSlot, graduationPercent, launchpadProtocol, migrated, migratedAt, migratedPoolAddress, migratedSlot, name, poolAddress }, mintable, name, networkId, socialLinks { bitcointalk, blog, coingecko, coinmarketcap, discord, email, facebook, github, instagram, linkedin, reddit, slack, telegram, twitch, twitter, website, wechat, whitepaper, youtube }, symbol }, exchangeId, fee, highPrice1, highPrice1w, highPrice4, highPrice5m, highPrice12, highPrice24, id, liquidity, liquidityToken, lowPrice1, lowPrice1w, lowPrice4, lowPrice5m, lowPrice12, lowPrice24, networkId, nonLiquidityToken, pairAddress, price, priceChange1, priceChange1w, priceChange4, priceChange5m, priceChange12, priceChange24, quoteToken, statsType, tickSpacing, token0 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, token1 { address, decimals, labels { createdAt, subType, type }, name, networkId, pooled, price, symbol }, volume1, volume1w, volume4, volume5m, volume12, volume24
|
|
338
440
|
}
|
|
339
441
|
}`,
|
|
340
442
|
vars,
|