@gmx-io/sdk 1.5.0-alpha-13 → 1.5.0-alpha-14

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.
Files changed (37) hide show
  1. package/build/cjs/src/clients/v2/__tests__/decrease.spec.js +12 -12
  2. package/build/cjs/src/codegen/prebuilt/hashedKinkModelMarketRatesKeys.json +16 -0
  3. package/build/cjs/src/codegen/prebuilt/hashedMarketConfigKeys.json +122 -0
  4. package/build/cjs/src/codegen/prebuilt/hashedMarketValuesKeys.json +30 -0
  5. package/build/cjs/src/codegen/subsquid.js +24 -0
  6. package/build/cjs/src/configs/marketHours.js +14 -0
  7. package/build/cjs/src/configs/markets.js +14 -0
  8. package/build/cjs/src/configs/tokens.js +18 -0
  9. package/build/cjs/src/utils/markets/utils.js +5 -1
  10. package/build/cjs/src/utils/orderTransactions/utils.js +2 -2
  11. package/build/cjs/src/utils/orderTransactions/validateTypedData.js +3 -3
  12. package/build/cjs/src/utils/swap/__tests__/swapRouting.spec.js +1 -1
  13. package/build/cjs/src/utils/trade/trade.js +0 -7
  14. package/build/cjs/src/utils/tradeHistory/utils.js +1 -0
  15. package/build/cjs/src/utils/twap/index.js +4 -10
  16. package/build/esm/src/clients/v2/__tests__/decrease.spec.js +12 -12
  17. package/build/esm/src/codegen/prebuilt/hashedKinkModelMarketRatesKeys.json +16 -0
  18. package/build/esm/src/codegen/prebuilt/hashedMarketConfigKeys.json +122 -0
  19. package/build/esm/src/codegen/prebuilt/hashedMarketValuesKeys.json +30 -0
  20. package/build/esm/src/codegen/subsquid.js +24 -0
  21. package/build/esm/src/configs/marketHours.js +14 -0
  22. package/build/esm/src/configs/markets.js +14 -0
  23. package/build/esm/src/configs/tokens.js +18 -0
  24. package/build/esm/src/utils/markets/utils.js +4 -1
  25. package/build/esm/src/utils/orderTransactions/utils.js +2 -2
  26. package/build/esm/src/utils/orderTransactions/validateTypedData.js +3 -3
  27. package/build/esm/src/utils/subaccount/index.js +2 -2
  28. package/build/esm/src/utils/swap/__tests__/swapRouting.spec.js +1 -1
  29. package/build/esm/src/utils/trade/trade.js +0 -7
  30. package/build/esm/src/utils/tradeHistory/utils.js +1 -0
  31. package/build/esm/src/utils/twap/index.js +4 -10
  32. package/build/types/src/codegen/prebuilt/index.d.ts +168 -0
  33. package/build/types/src/codegen/subsquid.d.ts +61 -0
  34. package/build/types/src/utils/markets/utils.d.ts +1 -0
  35. package/build/types/src/utils/subaccount/index.d.ts +2 -2
  36. package/build/types/src/utils/tradeHistory/types.d.ts +1 -0
  37. package/package.json +1 -1
@@ -92,6 +92,21 @@ export declare const HASHED_MARKET_VALUES_KEYS: {
92
92
  shortInterestInTokensUsingLongToken: string;
93
93
  shortInterestInTokensUsingShortToken: string;
94
94
  };
95
+ "0x1b997cb4841c4cb360E384192fFd7fb26eb10e5f": {
96
+ longPoolAmount: string;
97
+ shortPoolAmount: string;
98
+ positionImpactPoolAmount: string;
99
+ swapImpactPoolAmountLong: string;
100
+ swapImpactPoolAmountShort: string;
101
+ longInterestUsingLongToken: string;
102
+ longInterestUsingShortToken: string;
103
+ shortInterestUsingLongToken: string;
104
+ shortInterestUsingShortToken: string;
105
+ longInterestInTokensUsingLongToken: string;
106
+ longInterestInTokensUsingShortToken: string;
107
+ shortInterestInTokensUsingLongToken: string;
108
+ shortInterestInTokensUsingShortToken: string;
109
+ };
95
110
  "0xc5c9B5E23810565763De41144741477eeCB25e2e": {
96
111
  longPoolAmount: string;
97
112
  shortPoolAmount: string;
@@ -2089,6 +2104,21 @@ export declare const HASHED_MARKET_VALUES_KEYS: {
2089
2104
  shortInterestInTokensUsingLongToken: string;
2090
2105
  shortInterestInTokensUsingShortToken: string;
2091
2106
  };
2107
+ "0xE26E7b91143f367445f1c0a5dCf4f4aC8EaDcDb1": {
2108
+ longPoolAmount: string;
2109
+ shortPoolAmount: string;
2110
+ positionImpactPoolAmount: string;
2111
+ swapImpactPoolAmountLong: string;
2112
+ swapImpactPoolAmountShort: string;
2113
+ longInterestUsingLongToken: string;
2114
+ longInterestUsingShortToken: string;
2115
+ shortInterestUsingLongToken: string;
2116
+ shortInterestUsingShortToken: string;
2117
+ longInterestInTokensUsingLongToken: string;
2118
+ longInterestInTokensUsingShortToken: string;
2119
+ shortInterestInTokensUsingLongToken: string;
2120
+ shortInterestInTokensUsingShortToken: string;
2121
+ };
2092
2122
  };
2093
2123
  "43113": {
2094
2124
  "0xD996ff47A1F763E1e55415BC4437c59292D1F415": {
@@ -3202,6 +3232,67 @@ export declare const HASHED_MARKET_CONFIG_KEYS: {
3202
3232
  virtualLongTokenId: string;
3203
3233
  virtualShortTokenId: string;
3204
3234
  };
3235
+ "0x1b997cb4841c4cb360E384192fFd7fb26eb10e5f": {
3236
+ isDisabled: string;
3237
+ maxLongPoolAmount: string;
3238
+ maxShortPoolAmount: string;
3239
+ maxLongPoolUsdForDeposit: string;
3240
+ maxShortPoolUsdForDeposit: string;
3241
+ reserveFactorLong: string;
3242
+ reserveFactorShort: string;
3243
+ openInterestReserveFactorLong: string;
3244
+ openInterestReserveFactorShort: string;
3245
+ maxOpenInterestLong: string;
3246
+ maxOpenInterestShort: string;
3247
+ minPositionImpactPoolAmount: string;
3248
+ positionImpactPoolDistributionRate: string;
3249
+ borrowingFactorLong: string;
3250
+ borrowingFactorShort: string;
3251
+ borrowingExponentFactorLong: string;
3252
+ borrowingExponentFactorShort: string;
3253
+ fundingFactor: string;
3254
+ fundingExponentFactor: string;
3255
+ fundingIncreaseFactorPerSecond: string;
3256
+ fundingDecreaseFactorPerSecond: string;
3257
+ thresholdForStableFunding: string;
3258
+ thresholdForDecreaseFunding: string;
3259
+ minFundingFactorPerSecond: string;
3260
+ maxFundingFactorPerSecond: string;
3261
+ maxPnlFactorForTradersLong: string;
3262
+ maxPnlFactorForTradersShort: string;
3263
+ maxPnlFactorForDepositsLong: string;
3264
+ maxPnlFactorForDepositsShort: string;
3265
+ maxPnlFactorForWithdrawalsLong: string;
3266
+ maxPnlFactorForWithdrawalsShort: string;
3267
+ positionFeeFactorForBalanceWasImproved: string;
3268
+ positionFeeFactorForBalanceWasNotImproved: string;
3269
+ positionImpactFactorPositive: string;
3270
+ positionImpactFactorNegative: string;
3271
+ maxPositionImpactFactorPositive: string;
3272
+ maxPositionImpactFactorNegative: string;
3273
+ maxPositionImpactFactorForLiquidations: string;
3274
+ maxLendableImpactFactor: string;
3275
+ maxLendableImpactFactorForWithdrawals: string;
3276
+ maxLendableImpactUsd: string;
3277
+ lentPositionImpactPoolAmount: string;
3278
+ minCollateralFactor: string;
3279
+ minCollateralFactorForLiquidation: string;
3280
+ minCollateralFactorForOpenInterestLong: string;
3281
+ minCollateralFactorForOpenInterestShort: string;
3282
+ positionImpactExponentFactorPositive: string;
3283
+ positionImpactExponentFactorNegative: string;
3284
+ swapFeeFactorForBalanceWasImproved: string;
3285
+ swapFeeFactorForBalanceWasNotImproved: string;
3286
+ atomicSwapFeeFactor: string;
3287
+ swapImpactFactorPositive: string;
3288
+ swapImpactFactorNegative: string;
3289
+ swapImpactExponentFactor: string;
3290
+ withdrawalFeeFactorBalanceWasImproved: string;
3291
+ withdrawalFeeFactorBalanceWasNotImproved: string;
3292
+ virtualMarketId: string;
3293
+ virtualLongTokenId: string;
3294
+ virtualShortTokenId: string;
3295
+ };
3205
3296
  "0xc5c9B5E23810565763De41144741477eeCB25e2e": {
3206
3297
  isDisabled: string;
3207
3298
  maxLongPoolAmount: string;
@@ -11317,6 +11408,67 @@ export declare const HASHED_MARKET_CONFIG_KEYS: {
11317
11408
  virtualLongTokenId: string;
11318
11409
  virtualShortTokenId: string;
11319
11410
  };
11411
+ "0xE26E7b91143f367445f1c0a5dCf4f4aC8EaDcDb1": {
11412
+ isDisabled: string;
11413
+ maxLongPoolAmount: string;
11414
+ maxShortPoolAmount: string;
11415
+ maxLongPoolUsdForDeposit: string;
11416
+ maxShortPoolUsdForDeposit: string;
11417
+ reserveFactorLong: string;
11418
+ reserveFactorShort: string;
11419
+ openInterestReserveFactorLong: string;
11420
+ openInterestReserveFactorShort: string;
11421
+ maxOpenInterestLong: string;
11422
+ maxOpenInterestShort: string;
11423
+ minPositionImpactPoolAmount: string;
11424
+ positionImpactPoolDistributionRate: string;
11425
+ borrowingFactorLong: string;
11426
+ borrowingFactorShort: string;
11427
+ borrowingExponentFactorLong: string;
11428
+ borrowingExponentFactorShort: string;
11429
+ fundingFactor: string;
11430
+ fundingExponentFactor: string;
11431
+ fundingIncreaseFactorPerSecond: string;
11432
+ fundingDecreaseFactorPerSecond: string;
11433
+ thresholdForStableFunding: string;
11434
+ thresholdForDecreaseFunding: string;
11435
+ minFundingFactorPerSecond: string;
11436
+ maxFundingFactorPerSecond: string;
11437
+ maxPnlFactorForTradersLong: string;
11438
+ maxPnlFactorForTradersShort: string;
11439
+ maxPnlFactorForDepositsLong: string;
11440
+ maxPnlFactorForDepositsShort: string;
11441
+ maxPnlFactorForWithdrawalsLong: string;
11442
+ maxPnlFactorForWithdrawalsShort: string;
11443
+ positionFeeFactorForBalanceWasImproved: string;
11444
+ positionFeeFactorForBalanceWasNotImproved: string;
11445
+ positionImpactFactorPositive: string;
11446
+ positionImpactFactorNegative: string;
11447
+ maxPositionImpactFactorPositive: string;
11448
+ maxPositionImpactFactorNegative: string;
11449
+ maxPositionImpactFactorForLiquidations: string;
11450
+ maxLendableImpactFactor: string;
11451
+ maxLendableImpactFactorForWithdrawals: string;
11452
+ maxLendableImpactUsd: string;
11453
+ lentPositionImpactPoolAmount: string;
11454
+ minCollateralFactor: string;
11455
+ minCollateralFactorForLiquidation: string;
11456
+ minCollateralFactorForOpenInterestLong: string;
11457
+ minCollateralFactorForOpenInterestShort: string;
11458
+ positionImpactExponentFactorPositive: string;
11459
+ positionImpactExponentFactorNegative: string;
11460
+ swapFeeFactorForBalanceWasImproved: string;
11461
+ swapFeeFactorForBalanceWasNotImproved: string;
11462
+ atomicSwapFeeFactor: string;
11463
+ swapImpactFactorPositive: string;
11464
+ swapImpactFactorNegative: string;
11465
+ swapImpactExponentFactor: string;
11466
+ withdrawalFeeFactorBalanceWasImproved: string;
11467
+ withdrawalFeeFactorBalanceWasNotImproved: string;
11468
+ virtualMarketId: string;
11469
+ virtualLongTokenId: string;
11470
+ virtualShortTokenId: string;
11471
+ };
11320
11472
  };
11321
11473
  "43113": {
11322
11474
  "0xD996ff47A1F763E1e55415BC4437c59292D1F415": {
@@ -14366,6 +14518,14 @@ export declare const HASHED_KINK_MODEL_MARKET_RATES_KEYS: {
14366
14518
  aboveOptimalUsageBorrowingFactorLong: string;
14367
14519
  aboveOptimalUsageBorrowingFactorShort: string;
14368
14520
  };
14521
+ "0x1b997cb4841c4cb360E384192fFd7fb26eb10e5f": {
14522
+ optimalUsageFactorLong: string;
14523
+ optimalUsageFactorShort: string;
14524
+ baseBorrowingFactorLong: string;
14525
+ baseBorrowingFactorShort: string;
14526
+ aboveOptimalUsageBorrowingFactorLong: string;
14527
+ aboveOptimalUsageBorrowingFactorShort: string;
14528
+ };
14369
14529
  "0xc5c9B5E23810565763De41144741477eeCB25e2e": {
14370
14530
  optimalUsageFactorLong: string;
14371
14531
  optimalUsageFactorShort: string;
@@ -15432,6 +15592,14 @@ export declare const HASHED_KINK_MODEL_MARKET_RATES_KEYS: {
15432
15592
  aboveOptimalUsageBorrowingFactorLong: string;
15433
15593
  aboveOptimalUsageBorrowingFactorShort: string;
15434
15594
  };
15595
+ "0xE26E7b91143f367445f1c0a5dCf4f4aC8EaDcDb1": {
15596
+ optimalUsageFactorLong: string;
15597
+ optimalUsageFactorShort: string;
15598
+ baseBorrowingFactorLong: string;
15599
+ baseBorrowingFactorShort: string;
15600
+ aboveOptimalUsageBorrowingFactorLong: string;
15601
+ aboveOptimalUsageBorrowingFactorShort: string;
15602
+ };
15435
15603
  };
15436
15604
  "43113": {
15437
15605
  "0xD996ff47A1F763E1e55415BC4437c59292D1F415": {
@@ -57,6 +57,8 @@ export interface AccountPnlHistoryPointObject {
57
57
  /** Field for debug */
58
58
  cumulativeRealizedPriceImpact: Scalars["BigInt"]["output"];
59
59
  /** Field for debug */
60
+ cumulativeRealizedSwapFees: Scalars["BigInt"]["output"];
61
+ /** Field for debug */
60
62
  cumulativeRealizedSwapImpact: Scalars["BigInt"]["output"];
61
63
  pnl: Scalars["BigInt"]["output"];
62
64
  /** Field for debug */
@@ -66,6 +68,8 @@ export interface AccountPnlHistoryPointObject {
66
68
  /** Field for debug */
67
69
  realizedPriceImpact: Scalars["BigInt"]["output"];
68
70
  /** Field for debug */
71
+ realizedSwapFees: Scalars["BigInt"]["output"];
72
+ /** Field for debug */
69
73
  realizedSwapImpact: Scalars["BigInt"]["output"];
70
74
  /** Field for debug */
71
75
  startUnrealizedFees: Scalars["BigInt"]["output"];
@@ -91,6 +95,8 @@ export interface AccountPnlSummaryBucketObject {
91
95
  /** Field for debug */
92
96
  realizedPriceImpactUsd: Scalars["BigInt"]["output"];
93
97
  /** Field for debug */
98
+ realizedSwapFeesUsd: Scalars["BigInt"]["output"];
99
+ /** Field for debug */
94
100
  realizedSwapImpactUsd: Scalars["BigInt"]["output"];
95
101
  /** Field for debug */
96
102
  startUnrealizedBasePnlUsd: Scalars["BigInt"]["output"];
@@ -127,6 +133,7 @@ export interface AccountStat {
127
133
  realizedFees: Scalars["BigInt"]["output"];
128
134
  realizedPnl: Scalars["BigInt"]["output"];
129
135
  realizedPriceImpact: Scalars["BigInt"]["output"];
136
+ realizedSwapFees: Scalars["BigInt"]["output"];
130
137
  realizedSwapImpact: Scalars["BigInt"]["output"];
131
138
  sumMaxSize: Scalars["BigInt"]["output"];
132
139
  volume: Scalars["BigInt"]["output"];
@@ -240,6 +247,12 @@ export declare enum AccountStatOrderByInput {
240
247
  realizedPriceImpact_DESC = "realizedPriceImpact_DESC",
241
248
  realizedPriceImpact_DESC_NULLS_FIRST = "realizedPriceImpact_DESC_NULLS_FIRST",
242
249
  realizedPriceImpact_DESC_NULLS_LAST = "realizedPriceImpact_DESC_NULLS_LAST",
250
+ realizedSwapFees_ASC = "realizedSwapFees_ASC",
251
+ realizedSwapFees_ASC_NULLS_FIRST = "realizedSwapFees_ASC_NULLS_FIRST",
252
+ realizedSwapFees_ASC_NULLS_LAST = "realizedSwapFees_ASC_NULLS_LAST",
253
+ realizedSwapFees_DESC = "realizedSwapFees_DESC",
254
+ realizedSwapFees_DESC_NULLS_FIRST = "realizedSwapFees_DESC_NULLS_FIRST",
255
+ realizedSwapFees_DESC_NULLS_LAST = "realizedSwapFees_DESC_NULLS_LAST",
243
256
  realizedSwapImpact_ASC = "realizedSwapImpact_ASC",
244
257
  realizedSwapImpact_ASC_NULLS_FIRST = "realizedSwapImpact_ASC_NULLS_FIRST",
245
258
  realizedSwapImpact_ASC_NULLS_LAST = "realizedSwapImpact_ASC_NULLS_LAST",
@@ -439,6 +452,15 @@ export interface AccountStatWhereInput {
439
452
  realizedPriceImpact_lte?: InputMaybe<Scalars["BigInt"]["input"]>;
440
453
  realizedPriceImpact_not_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
441
454
  realizedPriceImpact_not_in?: InputMaybe<Array<Scalars["BigInt"]["input"]>>;
455
+ realizedSwapFees_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
456
+ realizedSwapFees_gt?: InputMaybe<Scalars["BigInt"]["input"]>;
457
+ realizedSwapFees_gte?: InputMaybe<Scalars["BigInt"]["input"]>;
458
+ realizedSwapFees_in?: InputMaybe<Array<Scalars["BigInt"]["input"]>>;
459
+ realizedSwapFees_isNull?: InputMaybe<Scalars["Boolean"]["input"]>;
460
+ realizedSwapFees_lt?: InputMaybe<Scalars["BigInt"]["input"]>;
461
+ realizedSwapFees_lte?: InputMaybe<Scalars["BigInt"]["input"]>;
462
+ realizedSwapFees_not_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
463
+ realizedSwapFees_not_in?: InputMaybe<Array<Scalars["BigInt"]["input"]>>;
442
464
  realizedSwapImpact_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
443
465
  realizedSwapImpact_gt?: InputMaybe<Scalars["BigInt"]["input"]>;
444
466
  realizedSwapImpact_gte?: InputMaybe<Scalars["BigInt"]["input"]>;
@@ -6070,6 +6092,7 @@ export interface PeriodAccountStatObject {
6070
6092
  realizedFees: Scalars["BigInt"]["output"];
6071
6093
  realizedPnl: Scalars["BigInt"]["output"];
6072
6094
  realizedPriceImpact: Scalars["BigInt"]["output"];
6095
+ realizedSwapFees: Scalars["BigInt"]["output"];
6073
6096
  realizedSwapImpact: Scalars["BigInt"]["output"];
6074
6097
  startUnrealizedFees: Scalars["BigInt"]["output"];
6075
6098
  startUnrealizedPnl: Scalars["BigInt"]["output"];
@@ -6335,6 +6358,7 @@ export interface PositionChange {
6335
6358
  sizeDeltaUsd: Scalars["BigInt"]["output"];
6336
6359
  sizeInTokens: Scalars["BigInt"]["output"];
6337
6360
  sizeInUsd: Scalars["BigInt"]["output"];
6361
+ swapFeeUsd?: Maybe<Scalars["BigInt"]["output"]>;
6338
6362
  swapImpactUsd?: Maybe<Scalars["BigInt"]["output"]>;
6339
6363
  timestamp: Scalars["Int"]["output"];
6340
6364
  totalImpactUsd?: Maybe<Scalars["BigInt"]["output"]>;
@@ -6490,6 +6514,12 @@ export declare enum PositionChangeOrderByInput {
6490
6514
  sizeInUsd_DESC = "sizeInUsd_DESC",
6491
6515
  sizeInUsd_DESC_NULLS_FIRST = "sizeInUsd_DESC_NULLS_FIRST",
6492
6516
  sizeInUsd_DESC_NULLS_LAST = "sizeInUsd_DESC_NULLS_LAST",
6517
+ swapFeeUsd_ASC = "swapFeeUsd_ASC",
6518
+ swapFeeUsd_ASC_NULLS_FIRST = "swapFeeUsd_ASC_NULLS_FIRST",
6519
+ swapFeeUsd_ASC_NULLS_LAST = "swapFeeUsd_ASC_NULLS_LAST",
6520
+ swapFeeUsd_DESC = "swapFeeUsd_DESC",
6521
+ swapFeeUsd_DESC_NULLS_FIRST = "swapFeeUsd_DESC_NULLS_FIRST",
6522
+ swapFeeUsd_DESC_NULLS_LAST = "swapFeeUsd_DESC_NULLS_LAST",
6493
6523
  swapImpactUsd_ASC = "swapImpactUsd_ASC",
6494
6524
  swapImpactUsd_ASC_NULLS_FIRST = "swapImpactUsd_ASC_NULLS_FIRST",
6495
6525
  swapImpactUsd_ASC_NULLS_LAST = "swapImpactUsd_ASC_NULLS_LAST",
@@ -6774,6 +6804,15 @@ export interface PositionChangeWhereInput {
6774
6804
  sizeInUsd_lte?: InputMaybe<Scalars["BigInt"]["input"]>;
6775
6805
  sizeInUsd_not_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
6776
6806
  sizeInUsd_not_in?: InputMaybe<Array<Scalars["BigInt"]["input"]>>;
6807
+ swapFeeUsd_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
6808
+ swapFeeUsd_gt?: InputMaybe<Scalars["BigInt"]["input"]>;
6809
+ swapFeeUsd_gte?: InputMaybe<Scalars["BigInt"]["input"]>;
6810
+ swapFeeUsd_in?: InputMaybe<Array<Scalars["BigInt"]["input"]>>;
6811
+ swapFeeUsd_isNull?: InputMaybe<Scalars["Boolean"]["input"]>;
6812
+ swapFeeUsd_lt?: InputMaybe<Scalars["BigInt"]["input"]>;
6813
+ swapFeeUsd_lte?: InputMaybe<Scalars["BigInt"]["input"]>;
6814
+ swapFeeUsd_not_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
6815
+ swapFeeUsd_not_in?: InputMaybe<Array<Scalars["BigInt"]["input"]>>;
6777
6816
  swapImpactUsd_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
6778
6817
  swapImpactUsd_gt?: InputMaybe<Scalars["BigInt"]["input"]>;
6779
6818
  swapImpactUsd_gte?: InputMaybe<Scalars["BigInt"]["input"]>;
@@ -7520,6 +7559,12 @@ export declare enum PositionOrderByInput {
7520
7559
  accountStat_realizedPriceImpact_DESC = "accountStat_realizedPriceImpact_DESC",
7521
7560
  accountStat_realizedPriceImpact_DESC_NULLS_FIRST = "accountStat_realizedPriceImpact_DESC_NULLS_FIRST",
7522
7561
  accountStat_realizedPriceImpact_DESC_NULLS_LAST = "accountStat_realizedPriceImpact_DESC_NULLS_LAST",
7562
+ accountStat_realizedSwapFees_ASC = "accountStat_realizedSwapFees_ASC",
7563
+ accountStat_realizedSwapFees_ASC_NULLS_FIRST = "accountStat_realizedSwapFees_ASC_NULLS_FIRST",
7564
+ accountStat_realizedSwapFees_ASC_NULLS_LAST = "accountStat_realizedSwapFees_ASC_NULLS_LAST",
7565
+ accountStat_realizedSwapFees_DESC = "accountStat_realizedSwapFees_DESC",
7566
+ accountStat_realizedSwapFees_DESC_NULLS_FIRST = "accountStat_realizedSwapFees_DESC_NULLS_FIRST",
7567
+ accountStat_realizedSwapFees_DESC_NULLS_LAST = "accountStat_realizedSwapFees_DESC_NULLS_LAST",
7523
7568
  accountStat_realizedSwapImpact_ASC = "accountStat_realizedSwapImpact_ASC",
7524
7569
  accountStat_realizedSwapImpact_ASC_NULLS_FIRST = "accountStat_realizedSwapImpact_ASC_NULLS_FIRST",
7525
7570
  accountStat_realizedSwapImpact_ASC_NULLS_LAST = "accountStat_realizedSwapImpact_ASC_NULLS_LAST",
@@ -10250,6 +10295,7 @@ export interface TradeAction {
10250
10295
  sizeDeltaInTokens?: Maybe<Scalars["BigInt"]["output"]>;
10251
10296
  sizeDeltaUsd?: Maybe<Scalars["BigInt"]["output"]>;
10252
10297
  srcChainId?: Maybe<Scalars["BigInt"]["output"]>;
10298
+ swapFeeUsd?: Maybe<Scalars["BigInt"]["output"]>;
10253
10299
  swapImpactUsd?: Maybe<Scalars["BigInt"]["output"]>;
10254
10300
  swapPath: Array<Scalars["String"]["output"]>;
10255
10301
  timestamp: Scalars["Int"]["output"];
@@ -10487,6 +10533,12 @@ export declare enum TradeActionOrderByInput {
10487
10533
  srcChainId_DESC = "srcChainId_DESC",
10488
10534
  srcChainId_DESC_NULLS_FIRST = "srcChainId_DESC_NULLS_FIRST",
10489
10535
  srcChainId_DESC_NULLS_LAST = "srcChainId_DESC_NULLS_LAST",
10536
+ swapFeeUsd_ASC = "swapFeeUsd_ASC",
10537
+ swapFeeUsd_ASC_NULLS_FIRST = "swapFeeUsd_ASC_NULLS_FIRST",
10538
+ swapFeeUsd_ASC_NULLS_LAST = "swapFeeUsd_ASC_NULLS_LAST",
10539
+ swapFeeUsd_DESC = "swapFeeUsd_DESC",
10540
+ swapFeeUsd_DESC_NULLS_FIRST = "swapFeeUsd_DESC_NULLS_FIRST",
10541
+ swapFeeUsd_DESC_NULLS_LAST = "swapFeeUsd_DESC_NULLS_LAST",
10490
10542
  swapImpactUsd_ASC = "swapImpactUsd_ASC",
10491
10543
  swapImpactUsd_ASC_NULLS_FIRST = "swapImpactUsd_ASC_NULLS_FIRST",
10492
10544
  swapImpactUsd_ASC_NULLS_LAST = "swapImpactUsd_ASC_NULLS_LAST",
@@ -10918,6 +10970,15 @@ export interface TradeActionWhereInput {
10918
10970
  srcChainId_lte?: InputMaybe<Scalars["BigInt"]["input"]>;
10919
10971
  srcChainId_not_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
10920
10972
  srcChainId_not_in?: InputMaybe<Array<Scalars["BigInt"]["input"]>>;
10973
+ swapFeeUsd_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
10974
+ swapFeeUsd_gt?: InputMaybe<Scalars["BigInt"]["input"]>;
10975
+ swapFeeUsd_gte?: InputMaybe<Scalars["BigInt"]["input"]>;
10976
+ swapFeeUsd_in?: InputMaybe<Array<Scalars["BigInt"]["input"]>>;
10977
+ swapFeeUsd_isNull?: InputMaybe<Scalars["Boolean"]["input"]>;
10978
+ swapFeeUsd_lt?: InputMaybe<Scalars["BigInt"]["input"]>;
10979
+ swapFeeUsd_lte?: InputMaybe<Scalars["BigInt"]["input"]>;
10980
+ swapFeeUsd_not_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
10981
+ swapFeeUsd_not_in?: InputMaybe<Array<Scalars["BigInt"]["input"]>>;
10921
10982
  swapImpactUsd_eq?: InputMaybe<Scalars["BigInt"]["input"]>;
10922
10983
  swapImpactUsd_gt?: InputMaybe<Scalars["BigInt"]["input"]>;
10923
10984
  swapImpactUsd_gte?: InputMaybe<Scalars["BigInt"]["input"]>;
@@ -76,6 +76,7 @@ export declare function getOpenInterestInTokens(marketInfo: MarketInfo, isLong:
76
76
  export declare function getOpenInterestForBalance(marketInfo: MarketInfo, isLong: boolean): bigint;
77
77
  export declare function getPriceForPnl(prices: TokenPrices, isLong: boolean, maximize: boolean): bigint;
78
78
  export declare function getIsMarketAvailableForExpressSwaps(marketInfo: MarketInfo): boolean;
79
+ export declare function getIsMarketDeprecated(marketInfo: MarketInfo): boolean;
79
80
  export declare function getMarket24Stats(dayPriceCandle: DayPriceCandle): {
80
81
  open24h: bigint;
81
82
  high24h: bigint;
@@ -2,6 +2,6 @@ export * from "./types";
2
2
  export { generateSubaccount, decryptSubaccountPrivateKey, createSubaccountSignerFromConfig, type GeneratedSubaccount, } from "./generateSubaccount";
3
3
  export { hashSubaccountApproval } from "./hashSubaccountApproval";
4
4
  export { getEmptySubaccountApproval } from "./getEmptySubaccountApproval";
5
- export { getSubaccountApprovalTypedData, type SubaccountApprovalTypedData, } from "./getSubaccountApprovalTypedData";
6
- export { fetchSubaccountStatus, prepareSubaccountApproval, signSubaccountApproval, } from "./api";
5
+ export { getSubaccountApprovalTypedData, type SubaccountApprovalTypedData } from "./getSubaccountApprovalTypedData";
6
+ export { fetchSubaccountStatus, prepareSubaccountApproval, signSubaccountApproval } from "./api";
7
7
  export type { SubaccountStatusRequest, SubaccountStatusResponse, SubaccountApprovalPrepareRequest, SubaccountApprovalPrepareResponse, } from "./api";
@@ -34,6 +34,7 @@ export type PositionTradeAction = {
34
34
  minOutputAmount: bigint;
35
35
  priceImpactUsd?: bigint;
36
36
  priceImpactDiffUsd?: bigint;
37
+ swapFeeUsd?: bigint;
37
38
  positionFeeAmount?: bigint;
38
39
  borrowingFeeAmount?: bigint;
39
40
  fundingFeeAmount?: bigint;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmx-io/sdk",
3
- "version": "1.5.0-alpha-13",
3
+ "version": "1.5.0-alpha-14",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",