@gmx-io/sdk 1.6.1 → 1.6.2

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.
@@ -2104,6 +2104,21 @@ export declare const HASHED_MARKET_VALUES_KEYS: {
2104
2104
  shortInterestInTokensUsingLongToken: string;
2105
2105
  shortInterestInTokensUsingShortToken: string;
2106
2106
  };
2107
+ "0x470128853D74dab7423904a20eA5AA230e9e561B": {
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
+ };
2107
2122
  "0xE26E7b91143f367445f1c0a5dCf4f4aC8EaDcDb1": {
2108
2123
  longPoolAmount: string;
2109
2124
  shortPoolAmount: string;
@@ -11408,6 +11423,67 @@ export declare const HASHED_MARKET_CONFIG_KEYS: {
11408
11423
  virtualLongTokenId: string;
11409
11424
  virtualShortTokenId: string;
11410
11425
  };
11426
+ "0x470128853D74dab7423904a20eA5AA230e9e561B": {
11427
+ isDisabled: string;
11428
+ maxLongPoolAmount: string;
11429
+ maxShortPoolAmount: string;
11430
+ maxLongPoolUsdForDeposit: string;
11431
+ maxShortPoolUsdForDeposit: string;
11432
+ reserveFactorLong: string;
11433
+ reserveFactorShort: string;
11434
+ openInterestReserveFactorLong: string;
11435
+ openInterestReserveFactorShort: string;
11436
+ maxOpenInterestLong: string;
11437
+ maxOpenInterestShort: string;
11438
+ minPositionImpactPoolAmount: string;
11439
+ positionImpactPoolDistributionRate: string;
11440
+ borrowingFactorLong: string;
11441
+ borrowingFactorShort: string;
11442
+ borrowingExponentFactorLong: string;
11443
+ borrowingExponentFactorShort: string;
11444
+ fundingFactor: string;
11445
+ fundingExponentFactor: string;
11446
+ fundingIncreaseFactorPerSecond: string;
11447
+ fundingDecreaseFactorPerSecond: string;
11448
+ thresholdForStableFunding: string;
11449
+ thresholdForDecreaseFunding: string;
11450
+ minFundingFactorPerSecond: string;
11451
+ maxFundingFactorPerSecond: string;
11452
+ maxPnlFactorForTradersLong: string;
11453
+ maxPnlFactorForTradersShort: string;
11454
+ maxPnlFactorForDepositsLong: string;
11455
+ maxPnlFactorForDepositsShort: string;
11456
+ maxPnlFactorForWithdrawalsLong: string;
11457
+ maxPnlFactorForWithdrawalsShort: string;
11458
+ positionFeeFactorForBalanceWasImproved: string;
11459
+ positionFeeFactorForBalanceWasNotImproved: string;
11460
+ positionImpactFactorPositive: string;
11461
+ positionImpactFactorNegative: string;
11462
+ maxPositionImpactFactorPositive: string;
11463
+ maxPositionImpactFactorNegative: string;
11464
+ maxPositionImpactFactorForLiquidations: string;
11465
+ maxLendableImpactFactor: string;
11466
+ maxLendableImpactFactorForWithdrawals: string;
11467
+ maxLendableImpactUsd: string;
11468
+ lentPositionImpactPoolAmount: string;
11469
+ minCollateralFactor: string;
11470
+ minCollateralFactorForLiquidation: string;
11471
+ minCollateralFactorForOpenInterestLong: string;
11472
+ minCollateralFactorForOpenInterestShort: string;
11473
+ positionImpactExponentFactorPositive: string;
11474
+ positionImpactExponentFactorNegative: string;
11475
+ swapFeeFactorForBalanceWasImproved: string;
11476
+ swapFeeFactorForBalanceWasNotImproved: string;
11477
+ atomicSwapFeeFactor: string;
11478
+ swapImpactFactorPositive: string;
11479
+ swapImpactFactorNegative: string;
11480
+ swapImpactExponentFactor: string;
11481
+ withdrawalFeeFactorBalanceWasImproved: string;
11482
+ withdrawalFeeFactorBalanceWasNotImproved: string;
11483
+ virtualMarketId: string;
11484
+ virtualLongTokenId: string;
11485
+ virtualShortTokenId: string;
11486
+ };
11411
11487
  "0xE26E7b91143f367445f1c0a5dCf4f4aC8EaDcDb1": {
11412
11488
  isDisabled: string;
11413
11489
  maxLongPoolAmount: string;
@@ -15592,6 +15668,14 @@ export declare const HASHED_KINK_MODEL_MARKET_RATES_KEYS: {
15592
15668
  aboveOptimalUsageBorrowingFactorLong: string;
15593
15669
  aboveOptimalUsageBorrowingFactorShort: string;
15594
15670
  };
15671
+ "0x470128853D74dab7423904a20eA5AA230e9e561B": {
15672
+ optimalUsageFactorLong: string;
15673
+ optimalUsageFactorShort: string;
15674
+ baseBorrowingFactorLong: string;
15675
+ baseBorrowingFactorShort: string;
15676
+ aboveOptimalUsageBorrowingFactorLong: string;
15677
+ aboveOptimalUsageBorrowingFactorShort: string;
15678
+ };
15595
15679
  "0xE26E7b91143f367445f1c0a5dCf4f4aC8EaDcDb1": {
15596
15680
  optimalUsageFactorLong: string;
15597
15681
  optimalUsageFactorShort: string;
@@ -1,6 +1,7 @@
1
1
  import type { ERC20Address, NativeTokenSupportedAddress, Token } from "../utils/tokens/types";
2
2
  import { ContractsChainId } from "./chains";
3
3
  export declare const SWAP_GRAPH_MAX_MARKETS_PER_TOKEN = 5;
4
+ export declare const UI_MAX_LEVERAGE_BY_MARKET: Record<string, number>;
4
5
  export type MarketConfig = {
5
6
  marketTokenAddress: string;
6
7
  indexTokenAddress: string;
@@ -1,5 +1,5 @@
1
1
  import type { ContractsChainId } from "../../configs/chains";
2
- import type { MarketConfig as ConfigMarketConfig } from "../../configs/markets";
2
+ import { type MarketConfig as ConfigMarketConfig } from "../../configs/markets";
3
3
  import type { DayPriceCandle } from "../24h/types";
4
4
  import type { Token, TokenPrices, TokensData } from "../tokens/types";
5
5
  import type { ClaimableFundingData, ContractMarketPrices, Market, MarketConfig, MarketInfo, MarketsData, MarketsInfoData, MarketTicker, MarketValues, MarketWithTiers, RawMarketInfo, RawMarketsInfoData } from "./types";
@@ -42,8 +42,9 @@ export declare function getCappedPoolPnl(p: {
42
42
  poolPnl: bigint;
43
43
  isLong: boolean;
44
44
  }): bigint;
45
- export declare function getMaxLeverageByMinCollateralFactor(minCollateralFactor: bigint | undefined): number;
46
- export declare function getMaxAllowedLeverage({ minCollateralFactor, minCollateralFactorForLiquidation, positionFeeFactorForBalanceWasNotImproved, }: {
45
+ export declare function getMaxLeverageByMinCollateralFactor(minCollateralFactor: bigint | undefined, marketAddress?: string): number;
46
+ export declare function getMaxAllowedLeverage({ marketAddress, minCollateralFactor, minCollateralFactorForLiquidation, positionFeeFactorForBalanceWasNotImproved, }: {
47
+ marketAddress?: string;
47
48
  minCollateralFactor: bigint | undefined;
48
49
  minCollateralFactorForLiquidation: bigint | undefined;
49
50
  positionFeeFactorForBalanceWasNotImproved: bigint | undefined;
@@ -11,7 +11,7 @@ export type TokenAddressTypesMap = {
11
11
  export type ContractPrice = bigint & {
12
12
  __brand: "contractPrice";
13
13
  };
14
- export type TokenCategory = "meme" | "layer1" | "layer2" | "defi" | "ai" | "tradfi" | "commodities" | "stocks" | "indices" | "fx";
14
+ export type TokenCategory = "meme" | "layer1" | "layer2" | "defi" | "ai" | "tradfi" | "pre-ipo" | "commodities" | "stocks" | "indices" | "fx";
15
15
  export type Token = {
16
16
  name: string;
17
17
  symbol: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmx-io/sdk",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",