@codex-data/sdk 1.0.0-rc3 → 1.0.0
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/GetTokenPrices.graphql +1 -0
- package/dist/resources/generated_subscriptions/OnPriceUpdated.graphql +1 -0
- package/dist/resources/generated_subscriptions/OnPricesUpdated.graphql +1 -0
- package/dist/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +70 -0
- package/dist/resources/graphql.d.ts +67 -0
- package/dist/resources/graphql.d.ts.map +1 -1
- package/dist/resources/graphql.js.map +1 -1
- package/dist/resources/graphql.schema.json +406 -1
- package/dist/resources/graphql.ts +72 -0
- package/dist/resources/schema.graphql +93 -1
- package/dist/sdk/Subscribe.d.ts +2 -1
- package/dist/sdk/Subscribe.d.ts.map +1 -1
- package/dist/sdk/Subscribe.js +9 -2
- package/dist/sdk/Subscribe.js.map +1 -1
- package/dist/sdk/generated/gql.d.ts +14 -6
- package/dist/sdk/generated/gql.d.ts.map +1 -1
- package/dist/sdk/generated/gql.js +4 -3
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +154 -0
- package/dist/sdk/generated/graphql.d.ts.map +1 -1
- package/dist/sdk/generated/graphql.js +5 -4
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/package.json +2 -2
- package/src/resources/generated_queries/GetTokenPrices.graphql +1 -0
- package/src/resources/generated_subscriptions/OnPriceUpdated.graphql +1 -0
- package/src/resources/generated_subscriptions/OnPricesUpdated.graphql +1 -0
- package/src/resources/generated_subscriptions/OnUnconfirmedBarsUpdated.graphql +70 -0
- package/src/resources/graphql.schema.json +406 -1
- package/src/resources/graphql.ts +72 -0
- package/src/resources/schema.graphql +93 -1
- package/src/sdk/Subscribe.ts +17 -2
- package/src/sdk/generated/gql.ts +11 -6
- package/src/sdk/generated/graphql.ts +87 -6
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
subscription OnUnconfirmedBarsUpdated(
|
|
2
|
+
$pairId: String
|
|
3
|
+
$quoteToken: QuoteToken
|
|
4
|
+
) {
|
|
5
|
+
onUnconfirmedBarsUpdated(pairId: $pairId, quoteToken: $quoteToken) {
|
|
6
|
+
aggregates {
|
|
7
|
+
r1 {
|
|
8
|
+
c
|
|
9
|
+
h
|
|
10
|
+
l
|
|
11
|
+
o
|
|
12
|
+
t
|
|
13
|
+
v
|
|
14
|
+
volume
|
|
15
|
+
}
|
|
16
|
+
r1S {
|
|
17
|
+
c
|
|
18
|
+
h
|
|
19
|
+
l
|
|
20
|
+
o
|
|
21
|
+
t
|
|
22
|
+
v
|
|
23
|
+
volume
|
|
24
|
+
}
|
|
25
|
+
r5 {
|
|
26
|
+
c
|
|
27
|
+
h
|
|
28
|
+
l
|
|
29
|
+
o
|
|
30
|
+
t
|
|
31
|
+
v
|
|
32
|
+
volume
|
|
33
|
+
}
|
|
34
|
+
r5S {
|
|
35
|
+
c
|
|
36
|
+
h
|
|
37
|
+
l
|
|
38
|
+
o
|
|
39
|
+
t
|
|
40
|
+
v
|
|
41
|
+
volume
|
|
42
|
+
}
|
|
43
|
+
r15 {
|
|
44
|
+
c
|
|
45
|
+
h
|
|
46
|
+
l
|
|
47
|
+
o
|
|
48
|
+
t
|
|
49
|
+
v
|
|
50
|
+
volume
|
|
51
|
+
}
|
|
52
|
+
r15S {
|
|
53
|
+
c
|
|
54
|
+
h
|
|
55
|
+
l
|
|
56
|
+
o
|
|
57
|
+
t
|
|
58
|
+
v
|
|
59
|
+
volume
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
eventSortKey
|
|
63
|
+
networkId
|
|
64
|
+
pairAddress
|
|
65
|
+
pairId
|
|
66
|
+
quoteToken
|
|
67
|
+
quoteTokenAddress
|
|
68
|
+
timestamp
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -1208,6 +1208,8 @@ export type GetPriceInput = {
|
|
|
1208
1208
|
maxDeviations?: InputMaybe<Scalars['Float']['input']>;
|
|
1209
1209
|
/** The network ID the token is deployed on. */
|
|
1210
1210
|
networkId: Scalars['Int']['input'];
|
|
1211
|
+
/** The address of the pool, when omitted the top pool is used. */
|
|
1212
|
+
poolAddress?: InputMaybe<Scalars['String']['input']>;
|
|
1211
1213
|
/** The unix timestamp for the price. */
|
|
1212
1214
|
timestamp?: InputMaybe<Scalars['Int']['input']>;
|
|
1213
1215
|
};
|
|
@@ -4201,6 +4203,29 @@ export type OnTokenEventsCreatedInput = {
|
|
|
4201
4203
|
networkId: Scalars['Int']['input'];
|
|
4202
4204
|
tokenAddress: Scalars['String']['input'];
|
|
4203
4205
|
};
|
|
4206
|
+
/** Response returned by `onUnconfirmedBarsUpdated`. */
|
|
4207
|
+
export type OnUnconfirmedBarsUpdated = {
|
|
4208
|
+
__typename?: 'OnUnconfirmedBarsUpdated';
|
|
4209
|
+
/** Price data broken down by resolution. */
|
|
4210
|
+
aggregates: UnconfirmedResolutionBarData;
|
|
4211
|
+
/**
|
|
4212
|
+
* The sortKey for the bar (`blockNumber`#`transactionIndex`#`logIndex`, zero padded).
|
|
4213
|
+
* For example, `0000000016414564#00000224#00000413`.
|
|
4214
|
+
*/
|
|
4215
|
+
eventSortKey: Scalars['String']['output'];
|
|
4216
|
+
/** The network ID the pair is deployed on. */
|
|
4217
|
+
networkId: Scalars['Int']['output'];
|
|
4218
|
+
/** The contract address for the pair. */
|
|
4219
|
+
pairAddress: Scalars['String']['output'];
|
|
4220
|
+
/** The ID for the pair (`pairAddress`:`networkId`). */
|
|
4221
|
+
pairId: Scalars['String']['output'];
|
|
4222
|
+
/** The quote token within the pair. */
|
|
4223
|
+
quoteToken?: Maybe<QuoteToken>;
|
|
4224
|
+
/** The address of the token being quoted */
|
|
4225
|
+
quoteTokenAddress: Scalars['String']['output'];
|
|
4226
|
+
/** The unix timestamp for the new bar. */
|
|
4227
|
+
timestamp: Scalars['Int']['output'];
|
|
4228
|
+
};
|
|
4204
4229
|
export type OneOfNumberCondition = {
|
|
4205
4230
|
__typename?: 'OneOfNumberCondition';
|
|
4206
4231
|
oneOf: Array<Scalars['Int']['output']>;
|
|
@@ -4963,6 +4988,8 @@ export type Price = {
|
|
|
4963
4988
|
confidence?: Maybe<Scalars['Float']['output']>;
|
|
4964
4989
|
/** The network ID the token is deployed on. */
|
|
4965
4990
|
networkId: Scalars['Int']['output'];
|
|
4991
|
+
/** The pool that emitted the swap generating this price */
|
|
4992
|
+
poolAddress: Scalars['String']['output'];
|
|
4966
4993
|
/** The token price in USD. */
|
|
4967
4994
|
priceUsd: Scalars['Float']['output'];
|
|
4968
4995
|
/** The unix timestamp for the price. */
|
|
@@ -6425,6 +6452,8 @@ export type Subscription = {
|
|
|
6425
6452
|
onTokenEventsCreated: AddTokenEventsOutput;
|
|
6426
6453
|
/** Live-streamed token lifecycle events (mints and burns) */
|
|
6427
6454
|
onTokenLifecycleEventsCreated: AddTokenLifecycleEventsOutput;
|
|
6455
|
+
/** Unconfirmed live-streamed bar chart data to track price changes over time. (Solana only) */
|
|
6456
|
+
onUnconfirmedBarsUpdated?: Maybe<OnUnconfirmedBarsUpdated>;
|
|
6428
6457
|
/** Live-streamed unconfirmed transactions for a token. (Solana only) */
|
|
6429
6458
|
onUnconfirmedEventsCreated?: Maybe<AddUnconfirmedEventsOutput>;
|
|
6430
6459
|
};
|
|
@@ -6498,6 +6527,10 @@ export type SubscriptionOnTokenLifecycleEventsCreatedArgs = {
|
|
|
6498
6527
|
address?: InputMaybe<Scalars['String']['input']>;
|
|
6499
6528
|
networkId?: InputMaybe<Scalars['Int']['input']>;
|
|
6500
6529
|
};
|
|
6530
|
+
export type SubscriptionOnUnconfirmedBarsUpdatedArgs = {
|
|
6531
|
+
pairId?: InputMaybe<Scalars['String']['input']>;
|
|
6532
|
+
quoteToken?: InputMaybe<QuoteToken>;
|
|
6533
|
+
};
|
|
6501
6534
|
export type SubscriptionOnUnconfirmedEventsCreatedArgs = {
|
|
6502
6535
|
address?: InputMaybe<Scalars['String']['input']>;
|
|
6503
6536
|
id?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -7286,6 +7319,24 @@ export type UnconfirmedEvent = {
|
|
|
7286
7319
|
transactionIndex: Scalars['Int']['output'];
|
|
7287
7320
|
};
|
|
7288
7321
|
export type UnconfirmedEventData = UnconfirmedLiquidityChangeEventData | UnconfirmedSwapEventData;
|
|
7322
|
+
/** Unconfirmed bar chart data. */
|
|
7323
|
+
export type UnconfirmedIndividualBarData = {
|
|
7324
|
+
__typename?: 'UnconfirmedIndividualBarData';
|
|
7325
|
+
/** The closing price. */
|
|
7326
|
+
c: Scalars['Float']['output'];
|
|
7327
|
+
/** The high price. */
|
|
7328
|
+
h: Scalars['Float']['output'];
|
|
7329
|
+
/** The low price. */
|
|
7330
|
+
l: Scalars['Float']['output'];
|
|
7331
|
+
/** The opening price. */
|
|
7332
|
+
o: Scalars['Float']['output'];
|
|
7333
|
+
/** The timestamp for the bar. */
|
|
7334
|
+
t: Scalars['Int']['output'];
|
|
7335
|
+
/** The volume. */
|
|
7336
|
+
v?: Maybe<Scalars['Int']['output']>;
|
|
7337
|
+
/** The volume with higher precision. */
|
|
7338
|
+
volume: Scalars['String']['output'];
|
|
7339
|
+
};
|
|
7289
7340
|
export type UnconfirmedLiquidityChangeEventData = {
|
|
7290
7341
|
__typename?: 'UnconfirmedLiquidityChangeEventData';
|
|
7291
7342
|
/** The amount of `token0` added or removed from the pair. */
|
|
@@ -7299,6 +7350,22 @@ export type UnconfirmedLiquidityChangeEventData = {
|
|
|
7299
7350
|
/** The type of token event, `Mint` or 'Burn'. */
|
|
7300
7351
|
type: EventType;
|
|
7301
7352
|
};
|
|
7353
|
+
/** Unconfirmed price data for each supported resolution. */
|
|
7354
|
+
export type UnconfirmedResolutionBarData = {
|
|
7355
|
+
__typename?: 'UnconfirmedResolutionBarData';
|
|
7356
|
+
/** 1 minute resolution. */
|
|
7357
|
+
r1?: Maybe<UnconfirmedIndividualBarData>;
|
|
7358
|
+
/** 1 second resolution. */
|
|
7359
|
+
r1S?: Maybe<UnconfirmedIndividualBarData>;
|
|
7360
|
+
/** 5 minute resolution. */
|
|
7361
|
+
r5?: Maybe<UnconfirmedIndividualBarData>;
|
|
7362
|
+
/** 5 second resolution. */
|
|
7363
|
+
r5S?: Maybe<UnconfirmedIndividualBarData>;
|
|
7364
|
+
/** 15 minute resolution. */
|
|
7365
|
+
r15?: Maybe<UnconfirmedIndividualBarData>;
|
|
7366
|
+
/** 15 second resolution. */
|
|
7367
|
+
r15S?: Maybe<UnconfirmedIndividualBarData>;
|
|
7368
|
+
};
|
|
7302
7369
|
export type UnconfirmedSwapEventData = {
|
|
7303
7370
|
__typename?: 'UnconfirmedSwapEventData';
|
|
7304
7371
|
/** The amount of `quoteToken` involved in the swap. For example, if `quoteToken` is USDC for a USDC/WETH pair, `amountNonLiquidityToken` would be the amount of USDC involved in the swap. */
|