@gmx-io/sdk 1.5.0-alpha-7 → 1.5.0-alpha-9
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/build/cjs/src/clients/v1/testUtil.js +1 -1
- package/build/cjs/src/clients/v2/index.js +42 -9
- package/build/cjs/src/codegen/prebuilt/hashedKinkModelMarketRatesKeys.json +34 -0
- package/build/cjs/src/codegen/prebuilt/hashedMarketConfigKeys.json +230 -0
- package/build/cjs/src/codegen/prebuilt/hashedMarketValuesKeys.json +62 -0
- package/build/cjs/src/configs/__tests__/tokens.spec.js +1 -0
- package/build/cjs/src/configs/api.js +4 -3
- package/build/cjs/src/configs/batch.js +13 -0
- package/build/cjs/src/configs/chainIds.js +2 -1
- package/build/cjs/src/configs/chains.js +48 -2
- package/build/cjs/src/configs/contracts.js +67 -0
- package/build/cjs/src/configs/express.js +3 -6
- package/build/cjs/src/configs/fees.js +9 -0
- package/build/cjs/src/configs/gasLimits.js +7 -0
- package/build/cjs/src/configs/markets.js +30 -0
- package/build/cjs/src/configs/oracleKeeper.js +2 -0
- package/build/cjs/src/configs/tokens.js +89 -1
- package/build/cjs/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +2 -0
- package/build/cjs/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +2 -0
- package/build/cjs/src/utils/__tests__/orderTransactions/swapOrders.spec.js +1 -0
- package/build/cjs/src/utils/__tests__/uiFeeReceiver.spec.js +24 -0
- package/build/cjs/src/utils/apy/api.js +11 -0
- package/build/cjs/src/utils/apy/types.js +2 -0
- package/build/cjs/src/utils/errors/parseError.js +3 -0
- package/build/cjs/src/utils/fees/executionFee.js +11 -3
- package/build/cjs/src/utils/markets/api.js +16 -1
- package/build/cjs/src/utils/numbers/utils.js +4 -0
- package/build/cjs/src/utils/orderTransactions/utils.js +2 -2
- package/build/cjs/src/utils/pairs/api.js +7 -0
- package/build/cjs/src/utils/pairs/types.js +2 -0
- package/build/cjs/src/utils/performance/api.js +21 -0
- package/build/cjs/src/utils/performance/types.js +2 -0
- package/build/cjs/src/utils/rates/api.js +13 -0
- package/build/cjs/src/utils/rates/types.js +2 -0
- package/build/cjs/src/utils/staking/api.js +11 -0
- package/build/cjs/src/utils/staking/types.js +2 -0
- package/build/cjs/src/utils/swap/swapValues.js +3 -3
- package/build/cjs/src/utils/tokens/api.js +7 -0
- package/build/cjs/src/utils/trade/decrease.js +131 -6
- package/build/cjs/src/utils/trade/increase.js +2 -6
- package/build/cjs/src/utils/twap/uiFeeReceiver.js +29 -13
- package/build/esm/src/clients/v1/testUtil.js +1 -1
- package/build/esm/src/clients/v2/index.js +34 -1
- package/build/esm/src/codegen/prebuilt/hashedKinkModelMarketRatesKeys.json +34 -0
- package/build/esm/src/codegen/prebuilt/hashedMarketConfigKeys.json +230 -0
- package/build/esm/src/codegen/prebuilt/hashedMarketValuesKeys.json +62 -0
- package/build/esm/src/configs/__tests__/tokens.spec.js +2 -1
- package/build/esm/src/configs/api.js +5 -4
- package/build/esm/src/configs/batch.js +14 -1
- package/build/esm/src/configs/chainIds.js +1 -0
- package/build/esm/src/configs/chains.js +48 -3
- package/build/esm/src/configs/contracts.js +68 -1
- package/build/esm/src/configs/express.js +4 -7
- package/build/esm/src/configs/fees.js +6 -0
- package/build/esm/src/configs/gasLimits.js +8 -1
- package/build/esm/src/configs/markets.js +31 -1
- package/build/esm/src/configs/oracleKeeper.js +3 -1
- package/build/esm/src/configs/tokens.js +90 -2
- package/build/esm/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +2 -0
- package/build/esm/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +2 -0
- package/build/esm/src/utils/__tests__/orderTransactions/swapOrders.spec.js +1 -0
- package/build/esm/src/utils/__tests__/uiFeeReceiver.spec.js +25 -1
- package/build/esm/src/utils/apy/api.js +7 -0
- package/build/esm/src/utils/apy/types.js +1 -0
- package/build/esm/src/utils/errors/parseError.js +3 -0
- package/build/esm/src/utils/fees/executionFee.js +8 -2
- package/build/esm/src/utils/markets/api.js +13 -0
- package/build/esm/src/utils/numbers/utils.js +4 -0
- package/build/esm/src/utils/orderTransactions/utils.js +2 -2
- package/build/esm/src/utils/pairs/api.js +3 -0
- package/build/esm/src/utils/pairs/types.js +1 -0
- package/build/esm/src/utils/performance/api.js +16 -0
- package/build/esm/src/utils/performance/types.js +1 -0
- package/build/esm/src/utils/rates/api.js +9 -0
- package/build/esm/src/utils/rates/types.js +1 -0
- package/build/esm/src/utils/staking/api.js +7 -0
- package/build/esm/src/utils/staking/types.js +1 -0
- package/build/esm/src/utils/swap/swapValues.js +3 -3
- package/build/esm/src/utils/tokens/api.js +3 -0
- package/build/esm/src/utils/trade/decrease.js +127 -7
- package/build/esm/src/utils/trade/increase.js +3 -7
- package/build/esm/src/utils/twap/uiFeeReceiver.js +27 -12
- package/build/types/src/clients/v1/index.d.ts +1 -1
- package/build/types/src/clients/v1/modules/base.d.ts +1 -1
- package/build/types/src/clients/v1/multicall.d.ts +1 -1
- package/build/types/src/clients/v2/index.d.ts +26 -1
- package/build/types/src/codegen/prebuilt/index.d.ts +326 -0
- package/build/types/src/configs/chainIds.d.ts +1 -0
- package/build/types/src/configs/chains.d.ts +26 -6
- package/build/types/src/configs/contracts.d.ts +64 -0
- package/build/types/src/configs/express.d.ts +0 -4
- package/build/types/src/configs/fees.d.ts +4 -0
- package/build/types/src/utils/apy/api.d.ts +5 -0
- package/build/types/src/utils/apy/types.d.ts +13 -0
- package/build/types/src/utils/errors/parseError.d.ts +3 -0
- package/build/types/src/utils/fees/executionFee.d.ts +2 -0
- package/build/types/src/utils/markets/api.d.ts +10 -1
- package/build/types/src/utils/numbers/utils.d.ts +1 -0
- package/build/types/src/utils/orderTransactions/utils.d.ts +2 -1
- package/build/types/src/utils/pairs/api.d.ts +5 -0
- package/build/types/src/utils/pairs/types.d.ts +20 -0
- package/build/types/src/utils/performance/api.d.ts +8 -0
- package/build/types/src/utils/performance/types.d.ts +19 -0
- package/build/types/src/utils/rates/api.d.ts +5 -0
- package/build/types/src/utils/rates/types.d.ts +19 -0
- package/build/types/src/utils/staking/api.d.ts +7 -0
- package/build/types/src/utils/staking/types.d.ts +14 -0
- package/build/types/src/utils/swap/swapValues.d.ts +2 -0
- package/build/types/src/utils/tokens/api.d.ts +5 -0
- package/build/types/src/utils/trade/decrease.d.ts +41 -2
- package/build/types/src/utils/trade/types.d.ts +8 -0
- package/build/types/src/utils/twap/uiFeeReceiver.d.ts +9 -6
- package/package.json +1 -1
|
@@ -46,6 +46,68 @@ export declare const HASHED_MARKET_VALUES_KEYS: {
|
|
|
46
46
|
shortInterestInTokensUsingShortToken: string;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
+
"4326": {
|
|
50
|
+
"0x31EdCc52bE2Fa55Ba68f50409F9e6b7d9EbF3D59": {
|
|
51
|
+
longPoolAmount: string;
|
|
52
|
+
shortPoolAmount: string;
|
|
53
|
+
positionImpactPoolAmount: string;
|
|
54
|
+
swapImpactPoolAmountLong: string;
|
|
55
|
+
swapImpactPoolAmountShort: string;
|
|
56
|
+
longInterestUsingLongToken: string;
|
|
57
|
+
longInterestUsingShortToken: string;
|
|
58
|
+
shortInterestUsingLongToken: string;
|
|
59
|
+
shortInterestUsingShortToken: string;
|
|
60
|
+
longInterestInTokensUsingLongToken: string;
|
|
61
|
+
longInterestInTokensUsingShortToken: string;
|
|
62
|
+
shortInterestInTokensUsingLongToken: string;
|
|
63
|
+
shortInterestInTokensUsingShortToken: string;
|
|
64
|
+
};
|
|
65
|
+
"0x9b1B72720f6D277F3b1e607a0c5fab1B300248b1": {
|
|
66
|
+
longPoolAmount: string;
|
|
67
|
+
shortPoolAmount: string;
|
|
68
|
+
positionImpactPoolAmount: string;
|
|
69
|
+
swapImpactPoolAmountLong: string;
|
|
70
|
+
swapImpactPoolAmountShort: string;
|
|
71
|
+
longInterestUsingLongToken: string;
|
|
72
|
+
longInterestUsingShortToken: string;
|
|
73
|
+
shortInterestUsingLongToken: string;
|
|
74
|
+
shortInterestUsingShortToken: string;
|
|
75
|
+
longInterestInTokensUsingLongToken: string;
|
|
76
|
+
longInterestInTokensUsingShortToken: string;
|
|
77
|
+
shortInterestInTokensUsingLongToken: string;
|
|
78
|
+
shortInterestInTokensUsingShortToken: string;
|
|
79
|
+
};
|
|
80
|
+
"0xe8E716F1cddfFD0698B86919D41A8228d701fEe9": {
|
|
81
|
+
longPoolAmount: string;
|
|
82
|
+
shortPoolAmount: string;
|
|
83
|
+
positionImpactPoolAmount: string;
|
|
84
|
+
swapImpactPoolAmountLong: string;
|
|
85
|
+
swapImpactPoolAmountShort: string;
|
|
86
|
+
longInterestUsingLongToken: string;
|
|
87
|
+
longInterestUsingShortToken: string;
|
|
88
|
+
shortInterestUsingLongToken: string;
|
|
89
|
+
shortInterestUsingShortToken: string;
|
|
90
|
+
longInterestInTokensUsingLongToken: string;
|
|
91
|
+
longInterestInTokensUsingShortToken: string;
|
|
92
|
+
shortInterestInTokensUsingLongToken: string;
|
|
93
|
+
shortInterestInTokensUsingShortToken: string;
|
|
94
|
+
};
|
|
95
|
+
"0xc5c9B5E23810565763De41144741477eeCB25e2e": {
|
|
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
|
+
};
|
|
110
|
+
};
|
|
49
111
|
"42161": {
|
|
50
112
|
"0x47c031236e19d024b42f8AE6780E44A573170703": {
|
|
51
113
|
longPoolAmount: string;
|
|
@@ -2809,6 +2871,236 @@ export declare const HASHED_MARKET_CONFIG_KEYS: {
|
|
|
2809
2871
|
virtualShortTokenId: string;
|
|
2810
2872
|
};
|
|
2811
2873
|
};
|
|
2874
|
+
"4326": {
|
|
2875
|
+
"0x31EdCc52bE2Fa55Ba68f50409F9e6b7d9EbF3D59": {
|
|
2876
|
+
isDisabled: string;
|
|
2877
|
+
maxLongPoolAmount: string;
|
|
2878
|
+
maxShortPoolAmount: string;
|
|
2879
|
+
maxLongPoolUsdForDeposit: string;
|
|
2880
|
+
maxShortPoolUsdForDeposit: string;
|
|
2881
|
+
reserveFactorLong: string;
|
|
2882
|
+
reserveFactorShort: string;
|
|
2883
|
+
openInterestReserveFactorLong: string;
|
|
2884
|
+
openInterestReserveFactorShort: string;
|
|
2885
|
+
maxOpenInterestLong: string;
|
|
2886
|
+
maxOpenInterestShort: string;
|
|
2887
|
+
minPositionImpactPoolAmount: string;
|
|
2888
|
+
positionImpactPoolDistributionRate: string;
|
|
2889
|
+
borrowingFactorLong: string;
|
|
2890
|
+
borrowingFactorShort: string;
|
|
2891
|
+
borrowingExponentFactorLong: string;
|
|
2892
|
+
borrowingExponentFactorShort: string;
|
|
2893
|
+
fundingFactor: string;
|
|
2894
|
+
fundingExponentFactor: string;
|
|
2895
|
+
fundingIncreaseFactorPerSecond: string;
|
|
2896
|
+
fundingDecreaseFactorPerSecond: string;
|
|
2897
|
+
thresholdForStableFunding: string;
|
|
2898
|
+
thresholdForDecreaseFunding: string;
|
|
2899
|
+
minFundingFactorPerSecond: string;
|
|
2900
|
+
maxFundingFactorPerSecond: string;
|
|
2901
|
+
maxPnlFactorForTradersLong: string;
|
|
2902
|
+
maxPnlFactorForTradersShort: string;
|
|
2903
|
+
positionFeeFactorForBalanceWasImproved: string;
|
|
2904
|
+
positionFeeFactorForBalanceWasNotImproved: string;
|
|
2905
|
+
positionImpactFactorPositive: string;
|
|
2906
|
+
positionImpactFactorNegative: string;
|
|
2907
|
+
maxPositionImpactFactorPositive: string;
|
|
2908
|
+
maxPositionImpactFactorNegative: string;
|
|
2909
|
+
maxPositionImpactFactorForLiquidations: string;
|
|
2910
|
+
maxLendableImpactFactor: string;
|
|
2911
|
+
maxLendableImpactFactorForWithdrawals: string;
|
|
2912
|
+
maxLendableImpactUsd: string;
|
|
2913
|
+
lentPositionImpactPoolAmount: string;
|
|
2914
|
+
minCollateralFactor: string;
|
|
2915
|
+
minCollateralFactorForLiquidation: string;
|
|
2916
|
+
minCollateralFactorForOpenInterestLong: string;
|
|
2917
|
+
minCollateralFactorForOpenInterestShort: string;
|
|
2918
|
+
positionImpactExponentFactorPositive: string;
|
|
2919
|
+
positionImpactExponentFactorNegative: string;
|
|
2920
|
+
swapFeeFactorForBalanceWasImproved: string;
|
|
2921
|
+
swapFeeFactorForBalanceWasNotImproved: string;
|
|
2922
|
+
atomicSwapFeeFactor: string;
|
|
2923
|
+
swapImpactFactorPositive: string;
|
|
2924
|
+
swapImpactFactorNegative: string;
|
|
2925
|
+
swapImpactExponentFactor: string;
|
|
2926
|
+
withdrawalFeeFactorBalanceWasImproved: string;
|
|
2927
|
+
withdrawalFeeFactorBalanceWasNotImproved: string;
|
|
2928
|
+
virtualMarketId: string;
|
|
2929
|
+
virtualLongTokenId: string;
|
|
2930
|
+
virtualShortTokenId: string;
|
|
2931
|
+
};
|
|
2932
|
+
"0x9b1B72720f6D277F3b1e607a0c5fab1B300248b1": {
|
|
2933
|
+
isDisabled: string;
|
|
2934
|
+
maxLongPoolAmount: string;
|
|
2935
|
+
maxShortPoolAmount: string;
|
|
2936
|
+
maxLongPoolUsdForDeposit: string;
|
|
2937
|
+
maxShortPoolUsdForDeposit: string;
|
|
2938
|
+
reserveFactorLong: string;
|
|
2939
|
+
reserveFactorShort: string;
|
|
2940
|
+
openInterestReserveFactorLong: string;
|
|
2941
|
+
openInterestReserveFactorShort: string;
|
|
2942
|
+
maxOpenInterestLong: string;
|
|
2943
|
+
maxOpenInterestShort: string;
|
|
2944
|
+
minPositionImpactPoolAmount: string;
|
|
2945
|
+
positionImpactPoolDistributionRate: string;
|
|
2946
|
+
borrowingFactorLong: string;
|
|
2947
|
+
borrowingFactorShort: string;
|
|
2948
|
+
borrowingExponentFactorLong: string;
|
|
2949
|
+
borrowingExponentFactorShort: string;
|
|
2950
|
+
fundingFactor: string;
|
|
2951
|
+
fundingExponentFactor: string;
|
|
2952
|
+
fundingIncreaseFactorPerSecond: string;
|
|
2953
|
+
fundingDecreaseFactorPerSecond: string;
|
|
2954
|
+
thresholdForStableFunding: string;
|
|
2955
|
+
thresholdForDecreaseFunding: string;
|
|
2956
|
+
minFundingFactorPerSecond: string;
|
|
2957
|
+
maxFundingFactorPerSecond: string;
|
|
2958
|
+
maxPnlFactorForTradersLong: string;
|
|
2959
|
+
maxPnlFactorForTradersShort: string;
|
|
2960
|
+
positionFeeFactorForBalanceWasImproved: string;
|
|
2961
|
+
positionFeeFactorForBalanceWasNotImproved: string;
|
|
2962
|
+
positionImpactFactorPositive: string;
|
|
2963
|
+
positionImpactFactorNegative: string;
|
|
2964
|
+
maxPositionImpactFactorPositive: string;
|
|
2965
|
+
maxPositionImpactFactorNegative: string;
|
|
2966
|
+
maxPositionImpactFactorForLiquidations: string;
|
|
2967
|
+
maxLendableImpactFactor: string;
|
|
2968
|
+
maxLendableImpactFactorForWithdrawals: string;
|
|
2969
|
+
maxLendableImpactUsd: string;
|
|
2970
|
+
lentPositionImpactPoolAmount: string;
|
|
2971
|
+
minCollateralFactor: string;
|
|
2972
|
+
minCollateralFactorForLiquidation: string;
|
|
2973
|
+
minCollateralFactorForOpenInterestLong: string;
|
|
2974
|
+
minCollateralFactorForOpenInterestShort: string;
|
|
2975
|
+
positionImpactExponentFactorPositive: string;
|
|
2976
|
+
positionImpactExponentFactorNegative: string;
|
|
2977
|
+
swapFeeFactorForBalanceWasImproved: string;
|
|
2978
|
+
swapFeeFactorForBalanceWasNotImproved: string;
|
|
2979
|
+
atomicSwapFeeFactor: string;
|
|
2980
|
+
swapImpactFactorPositive: string;
|
|
2981
|
+
swapImpactFactorNegative: string;
|
|
2982
|
+
swapImpactExponentFactor: string;
|
|
2983
|
+
withdrawalFeeFactorBalanceWasImproved: string;
|
|
2984
|
+
withdrawalFeeFactorBalanceWasNotImproved: string;
|
|
2985
|
+
virtualMarketId: string;
|
|
2986
|
+
virtualLongTokenId: string;
|
|
2987
|
+
virtualShortTokenId: string;
|
|
2988
|
+
};
|
|
2989
|
+
"0xe8E716F1cddfFD0698B86919D41A8228d701fEe9": {
|
|
2990
|
+
isDisabled: string;
|
|
2991
|
+
maxLongPoolAmount: string;
|
|
2992
|
+
maxShortPoolAmount: string;
|
|
2993
|
+
maxLongPoolUsdForDeposit: string;
|
|
2994
|
+
maxShortPoolUsdForDeposit: string;
|
|
2995
|
+
reserveFactorLong: string;
|
|
2996
|
+
reserveFactorShort: string;
|
|
2997
|
+
openInterestReserveFactorLong: string;
|
|
2998
|
+
openInterestReserveFactorShort: string;
|
|
2999
|
+
maxOpenInterestLong: string;
|
|
3000
|
+
maxOpenInterestShort: string;
|
|
3001
|
+
minPositionImpactPoolAmount: string;
|
|
3002
|
+
positionImpactPoolDistributionRate: string;
|
|
3003
|
+
borrowingFactorLong: string;
|
|
3004
|
+
borrowingFactorShort: string;
|
|
3005
|
+
borrowingExponentFactorLong: string;
|
|
3006
|
+
borrowingExponentFactorShort: string;
|
|
3007
|
+
fundingFactor: string;
|
|
3008
|
+
fundingExponentFactor: string;
|
|
3009
|
+
fundingIncreaseFactorPerSecond: string;
|
|
3010
|
+
fundingDecreaseFactorPerSecond: string;
|
|
3011
|
+
thresholdForStableFunding: string;
|
|
3012
|
+
thresholdForDecreaseFunding: string;
|
|
3013
|
+
minFundingFactorPerSecond: string;
|
|
3014
|
+
maxFundingFactorPerSecond: string;
|
|
3015
|
+
maxPnlFactorForTradersLong: string;
|
|
3016
|
+
maxPnlFactorForTradersShort: string;
|
|
3017
|
+
positionFeeFactorForBalanceWasImproved: string;
|
|
3018
|
+
positionFeeFactorForBalanceWasNotImproved: string;
|
|
3019
|
+
positionImpactFactorPositive: string;
|
|
3020
|
+
positionImpactFactorNegative: string;
|
|
3021
|
+
maxPositionImpactFactorPositive: string;
|
|
3022
|
+
maxPositionImpactFactorNegative: string;
|
|
3023
|
+
maxPositionImpactFactorForLiquidations: string;
|
|
3024
|
+
maxLendableImpactFactor: string;
|
|
3025
|
+
maxLendableImpactFactorForWithdrawals: string;
|
|
3026
|
+
maxLendableImpactUsd: string;
|
|
3027
|
+
lentPositionImpactPoolAmount: string;
|
|
3028
|
+
minCollateralFactor: string;
|
|
3029
|
+
minCollateralFactorForLiquidation: string;
|
|
3030
|
+
minCollateralFactorForOpenInterestLong: string;
|
|
3031
|
+
minCollateralFactorForOpenInterestShort: string;
|
|
3032
|
+
positionImpactExponentFactorPositive: string;
|
|
3033
|
+
positionImpactExponentFactorNegative: string;
|
|
3034
|
+
swapFeeFactorForBalanceWasImproved: string;
|
|
3035
|
+
swapFeeFactorForBalanceWasNotImproved: string;
|
|
3036
|
+
atomicSwapFeeFactor: string;
|
|
3037
|
+
swapImpactFactorPositive: string;
|
|
3038
|
+
swapImpactFactorNegative: string;
|
|
3039
|
+
swapImpactExponentFactor: string;
|
|
3040
|
+
withdrawalFeeFactorBalanceWasImproved: string;
|
|
3041
|
+
withdrawalFeeFactorBalanceWasNotImproved: string;
|
|
3042
|
+
virtualMarketId: string;
|
|
3043
|
+
virtualLongTokenId: string;
|
|
3044
|
+
virtualShortTokenId: string;
|
|
3045
|
+
};
|
|
3046
|
+
"0xc5c9B5E23810565763De41144741477eeCB25e2e": {
|
|
3047
|
+
isDisabled: string;
|
|
3048
|
+
maxLongPoolAmount: string;
|
|
3049
|
+
maxShortPoolAmount: string;
|
|
3050
|
+
maxLongPoolUsdForDeposit: string;
|
|
3051
|
+
maxShortPoolUsdForDeposit: string;
|
|
3052
|
+
reserveFactorLong: string;
|
|
3053
|
+
reserveFactorShort: string;
|
|
3054
|
+
openInterestReserveFactorLong: string;
|
|
3055
|
+
openInterestReserveFactorShort: string;
|
|
3056
|
+
maxOpenInterestLong: string;
|
|
3057
|
+
maxOpenInterestShort: string;
|
|
3058
|
+
minPositionImpactPoolAmount: string;
|
|
3059
|
+
positionImpactPoolDistributionRate: string;
|
|
3060
|
+
borrowingFactorLong: string;
|
|
3061
|
+
borrowingFactorShort: string;
|
|
3062
|
+
borrowingExponentFactorLong: string;
|
|
3063
|
+
borrowingExponentFactorShort: string;
|
|
3064
|
+
fundingFactor: string;
|
|
3065
|
+
fundingExponentFactor: string;
|
|
3066
|
+
fundingIncreaseFactorPerSecond: string;
|
|
3067
|
+
fundingDecreaseFactorPerSecond: string;
|
|
3068
|
+
thresholdForStableFunding: string;
|
|
3069
|
+
thresholdForDecreaseFunding: string;
|
|
3070
|
+
minFundingFactorPerSecond: string;
|
|
3071
|
+
maxFundingFactorPerSecond: string;
|
|
3072
|
+
maxPnlFactorForTradersLong: string;
|
|
3073
|
+
maxPnlFactorForTradersShort: string;
|
|
3074
|
+
positionFeeFactorForBalanceWasImproved: string;
|
|
3075
|
+
positionFeeFactorForBalanceWasNotImproved: string;
|
|
3076
|
+
positionImpactFactorPositive: string;
|
|
3077
|
+
positionImpactFactorNegative: string;
|
|
3078
|
+
maxPositionImpactFactorPositive: string;
|
|
3079
|
+
maxPositionImpactFactorNegative: string;
|
|
3080
|
+
maxPositionImpactFactorForLiquidations: string;
|
|
3081
|
+
maxLendableImpactFactor: string;
|
|
3082
|
+
maxLendableImpactFactorForWithdrawals: string;
|
|
3083
|
+
maxLendableImpactUsd: string;
|
|
3084
|
+
lentPositionImpactPoolAmount: string;
|
|
3085
|
+
minCollateralFactor: string;
|
|
3086
|
+
minCollateralFactorForLiquidation: string;
|
|
3087
|
+
minCollateralFactorForOpenInterestLong: string;
|
|
3088
|
+
minCollateralFactorForOpenInterestShort: string;
|
|
3089
|
+
positionImpactExponentFactorPositive: string;
|
|
3090
|
+
positionImpactExponentFactorNegative: string;
|
|
3091
|
+
swapFeeFactorForBalanceWasImproved: string;
|
|
3092
|
+
swapFeeFactorForBalanceWasNotImproved: string;
|
|
3093
|
+
atomicSwapFeeFactor: string;
|
|
3094
|
+
swapImpactFactorPositive: string;
|
|
3095
|
+
swapImpactFactorNegative: string;
|
|
3096
|
+
swapImpactExponentFactor: string;
|
|
3097
|
+
withdrawalFeeFactorBalanceWasImproved: string;
|
|
3098
|
+
withdrawalFeeFactorBalanceWasNotImproved: string;
|
|
3099
|
+
virtualMarketId: string;
|
|
3100
|
+
virtualLongTokenId: string;
|
|
3101
|
+
virtualShortTokenId: string;
|
|
3102
|
+
};
|
|
3103
|
+
};
|
|
2812
3104
|
"42161": {
|
|
2813
3105
|
"0x47c031236e19d024b42f8AE6780E44A573170703": {
|
|
2814
3106
|
isDisabled: string;
|
|
@@ -12649,6 +12941,40 @@ export declare const HASHED_KINK_MODEL_MARKET_RATES_KEYS: {
|
|
|
12649
12941
|
aboveOptimalUsageBorrowingFactorShort: string;
|
|
12650
12942
|
};
|
|
12651
12943
|
};
|
|
12944
|
+
"4326": {
|
|
12945
|
+
"0x31EdCc52bE2Fa55Ba68f50409F9e6b7d9EbF3D59": {
|
|
12946
|
+
optimalUsageFactorLong: string;
|
|
12947
|
+
optimalUsageFactorShort: string;
|
|
12948
|
+
baseBorrowingFactorLong: string;
|
|
12949
|
+
baseBorrowingFactorShort: string;
|
|
12950
|
+
aboveOptimalUsageBorrowingFactorLong: string;
|
|
12951
|
+
aboveOptimalUsageBorrowingFactorShort: string;
|
|
12952
|
+
};
|
|
12953
|
+
"0x9b1B72720f6D277F3b1e607a0c5fab1B300248b1": {
|
|
12954
|
+
optimalUsageFactorLong: string;
|
|
12955
|
+
optimalUsageFactorShort: string;
|
|
12956
|
+
baseBorrowingFactorLong: string;
|
|
12957
|
+
baseBorrowingFactorShort: string;
|
|
12958
|
+
aboveOptimalUsageBorrowingFactorLong: string;
|
|
12959
|
+
aboveOptimalUsageBorrowingFactorShort: string;
|
|
12960
|
+
};
|
|
12961
|
+
"0xe8E716F1cddfFD0698B86919D41A8228d701fEe9": {
|
|
12962
|
+
optimalUsageFactorLong: string;
|
|
12963
|
+
optimalUsageFactorShort: string;
|
|
12964
|
+
baseBorrowingFactorLong: string;
|
|
12965
|
+
baseBorrowingFactorShort: string;
|
|
12966
|
+
aboveOptimalUsageBorrowingFactorLong: string;
|
|
12967
|
+
aboveOptimalUsageBorrowingFactorShort: string;
|
|
12968
|
+
};
|
|
12969
|
+
"0xc5c9B5E23810565763De41144741477eeCB25e2e": {
|
|
12970
|
+
optimalUsageFactorLong: string;
|
|
12971
|
+
optimalUsageFactorShort: string;
|
|
12972
|
+
baseBorrowingFactorLong: string;
|
|
12973
|
+
baseBorrowingFactorShort: string;
|
|
12974
|
+
aboveOptimalUsageBorrowingFactorLong: string;
|
|
12975
|
+
aboveOptimalUsageBorrowingFactorShort: string;
|
|
12976
|
+
};
|
|
12977
|
+
};
|
|
12652
12978
|
"42161": {
|
|
12653
12979
|
"0x47c031236e19d024b42f8AE6780E44A573170703": {
|
|
12654
12980
|
optimalUsageFactorLong: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const AVALANCHE = 43114;
|
|
2
2
|
export declare const ARBITRUM = 42161;
|
|
3
3
|
export declare const BOTANIX = 3637;
|
|
4
|
+
export declare const MEGAETH = 4326;
|
|
4
5
|
export declare const SOURCE_ETHEREUM_MAINNET = 1;
|
|
5
6
|
export declare const SOURCE_BASE_MAINNET = 8453;
|
|
6
7
|
export declare const SOURCE_BSC_MAINNET = 56;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Chain } from "viem/chains";
|
|
2
|
-
import { ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX, SOURCE_ETHEREUM_MAINNET, SOURCE_BASE_MAINNET, SOURCE_BSC_MAINNET, SOURCE_OPTIMISM_SEPOLIA, SOURCE_SEPOLIA } from "./chainIds";
|
|
3
|
-
export { ARBITRUM, AVALANCHE, AVALANCHE_FUJI, BOTANIX, ARBITRUM_SEPOLIA, SOURCE_ETHEREUM_MAINNET, SOURCE_BASE_MAINNET, SOURCE_BSC_MAINNET, SOURCE_OPTIMISM_SEPOLIA, SOURCE_SEPOLIA, };
|
|
4
|
-
export declare const CONTRACTS_CHAIN_IDS: readonly [42161, 43114, 3637];
|
|
5
|
-
export declare const CONTRACTS_CHAIN_IDS_DEV: readonly [42161, 43114, 3637, 43113, 421614];
|
|
2
|
+
import { ARBITRUM, ARBITRUM_SEPOLIA, AVALANCHE, AVALANCHE_FUJI, BOTANIX, MEGAETH, SOURCE_ETHEREUM_MAINNET, SOURCE_BASE_MAINNET, SOURCE_BSC_MAINNET, SOURCE_OPTIMISM_SEPOLIA, SOURCE_SEPOLIA } from "./chainIds";
|
|
3
|
+
export { ARBITRUM, AVALANCHE, AVALANCHE_FUJI, BOTANIX, MEGAETH, ARBITRUM_SEPOLIA, SOURCE_ETHEREUM_MAINNET, SOURCE_BASE_MAINNET, SOURCE_BSC_MAINNET, SOURCE_OPTIMISM_SEPOLIA, SOURCE_SEPOLIA, };
|
|
4
|
+
export declare const CONTRACTS_CHAIN_IDS: readonly [42161, 43114, 3637, 4326];
|
|
5
|
+
export declare const CONTRACTS_CHAIN_IDS_DEV: readonly [42161, 43114, 3637, 4326, 43113, 421614];
|
|
6
6
|
export declare const SETTLEMENT_CHAIN_IDS: readonly [42161, 43114];
|
|
7
7
|
export declare const SETTLEMENT_CHAIN_IDS_DEV: readonly [42161, 43114, 421614, 43113];
|
|
8
8
|
export declare const SOURCE_CHAIN_IDS: readonly [11155420, 11155111, 8453, 56, 1, 421614, 42161, 43114, 43113];
|
|
@@ -113,6 +113,25 @@ declare const CONTRACTS_CHAIN_CONFIGS: {
|
|
|
113
113
|
readonly gasPriceBuffer: undefined;
|
|
114
114
|
readonly isDisabled: false;
|
|
115
115
|
};
|
|
116
|
+
readonly 4326: {
|
|
117
|
+
readonly chainId: 4326;
|
|
118
|
+
readonly name: "MegaETH";
|
|
119
|
+
readonly slug: "megaeth";
|
|
120
|
+
readonly explorerUrl: "https://megaeth.blockscout.com/";
|
|
121
|
+
readonly nativeTokenSymbol: "ETH";
|
|
122
|
+
readonly wrappedTokenSymbol: "WETH";
|
|
123
|
+
readonly defaultCollateralSymbol: "USDM";
|
|
124
|
+
readonly highExecutionFee: 5;
|
|
125
|
+
readonly shouldUseMaxPriorityFeePerGas: true;
|
|
126
|
+
readonly defaultExecutionFeeBufferBps: 3000;
|
|
127
|
+
readonly maxFeePerGas: undefined;
|
|
128
|
+
readonly gasPricePremium: 0n;
|
|
129
|
+
readonly maxPriorityFeePerGas: 500000n;
|
|
130
|
+
readonly excessiveExecutionFee: 10;
|
|
131
|
+
readonly minExecutionFee: undefined;
|
|
132
|
+
readonly gasPriceBuffer: 2000n;
|
|
133
|
+
readonly isDisabled: false;
|
|
134
|
+
};
|
|
116
135
|
};
|
|
117
136
|
declare const SOURCE_CHAIN_CONFIGS: {
|
|
118
137
|
readonly 11155420: {
|
|
@@ -177,6 +196,7 @@ export type ContractsChainSlug = (typeof CONTRACTS_CHAIN_CONFIGS)[keyof typeof C
|
|
|
177
196
|
export type SourceChainSlug = (typeof SOURCE_CHAIN_CONFIGS)[keyof typeof SOURCE_CHAIN_CONFIGS]["slug"];
|
|
178
197
|
export type ChainSlug = ContractsChainSlug | SourceChainSlug | "unknown";
|
|
179
198
|
export declare const botanix: Chain;
|
|
199
|
+
export declare const megaeth: Chain;
|
|
180
200
|
export declare const VIEM_CHAIN_BY_CHAIN_ID: Record<AnyChainId, Chain>;
|
|
181
201
|
export declare function getChainName(chainId: number): ChainName;
|
|
182
202
|
export declare function getChainSlug(chainId: number): ChainSlug;
|
|
@@ -188,13 +208,13 @@ export declare function isContractsChain(chainId: number, dev?: boolean): chainI
|
|
|
188
208
|
export declare function isTestnetChain(chainId: number): boolean;
|
|
189
209
|
export declare function getMaxFeePerGas(chainId: ContractsChainId): bigint | undefined;
|
|
190
210
|
export declare function getGasPricePremium(chainId: ContractsChainId): bigint | undefined;
|
|
191
|
-
export declare function getMaxPriorityFeePerGas(chainId: ContractsChainId): 1500000000n | 7n;
|
|
211
|
+
export declare function getMaxPriorityFeePerGas(chainId: ContractsChainId): 1500000000n | 7n | 500000n;
|
|
192
212
|
export declare function getMinExecutionFeeUsd(chainId: ContractsChainId): 1000000000000000000000000000n | undefined;
|
|
193
213
|
export declare function getGasPriceBuffer(chainId: ContractsChainId): 2000n | undefined;
|
|
194
214
|
export declare function isChainDisabled(chainId: ContractsChainId): false;
|
|
195
215
|
export declare function getChainNativeTokenSymbol(chainId: ContractsChainId): "ETH" | "AVAX" | "BTC";
|
|
196
216
|
export declare function getChainWrappedTokenSymbol(chainId: ContractsChainId): "WETH" | "WAVAX" | "PBTC";
|
|
197
|
-
export declare function getChainDefaultCollateralSymbol(chainId: ContractsChainId): "USDC.e" | "USDC" | "USDC.E";
|
|
217
|
+
export declare function getChainDefaultCollateralSymbol(chainId: ContractsChainId): "USDC.e" | "USDC" | "USDC.E" | "USDM";
|
|
198
218
|
export declare function getExplorerUrl(chainId: number | "layerzero" | "layerzero-testnet"): string;
|
|
199
219
|
export declare function getTokenExplorerUrl(chainId: number, tokenAddress: string): string;
|
|
200
220
|
export declare function getExecutionFeeConfig(chainId: ContractsChainId): {
|
|
@@ -191,6 +191,70 @@ export declare const CONTRACTS: {
|
|
|
191
191
|
StBTC: string;
|
|
192
192
|
PBTC: string;
|
|
193
193
|
};
|
|
194
|
+
4326: {
|
|
195
|
+
DataStore: string;
|
|
196
|
+
EventEmitter: string;
|
|
197
|
+
SubaccountRouter: string;
|
|
198
|
+
ExchangeRouter: string;
|
|
199
|
+
DepositVault: string;
|
|
200
|
+
WithdrawalVault: string;
|
|
201
|
+
OrderVault: string;
|
|
202
|
+
ShiftVault: string;
|
|
203
|
+
SyntheticsReader: string;
|
|
204
|
+
SyntheticsRouter: string;
|
|
205
|
+
GlvReader: string;
|
|
206
|
+
GlvRouter: string;
|
|
207
|
+
GlvVault: string;
|
|
208
|
+
GelatoRelayRouter: string;
|
|
209
|
+
SubaccountGelatoRelayRouter: string;
|
|
210
|
+
MultichainClaimsRouter: string;
|
|
211
|
+
MultichainGlvRouter: string;
|
|
212
|
+
MultichainGmRouter: string;
|
|
213
|
+
MultichainOrderRouter: string;
|
|
214
|
+
MultichainSubaccountRouter: string;
|
|
215
|
+
MultichainTransferRouter: string;
|
|
216
|
+
MultichainVault: string;
|
|
217
|
+
LayerZeroProvider: string;
|
|
218
|
+
ChainlinkPriceFeedProvider: string;
|
|
219
|
+
ClaimHandler: string;
|
|
220
|
+
ExternalHandler: string;
|
|
221
|
+
OpenOceanRouter: "0x0000000000000000000000000000000000000000";
|
|
222
|
+
Multicall: string;
|
|
223
|
+
LayerZeroEndpoint: string;
|
|
224
|
+
ArbitrumNodeInterface: "0x0000000000000000000000000000000000000000";
|
|
225
|
+
GelatoRelayAddress: string;
|
|
226
|
+
Vault: "0x0000000000000000000000000000000000000000";
|
|
227
|
+
Reader: "0x0000000000000000000000000000000000000000";
|
|
228
|
+
PositionRouter: "0x0000000000000000000000000000000000000000";
|
|
229
|
+
ReferralStorage: string;
|
|
230
|
+
VaultReader: "0x0000000000000000000000000000000000000000";
|
|
231
|
+
GlpManager: "0x0000000000000000000000000000000000000000";
|
|
232
|
+
RewardRouter: "0x0000000000000000000000000000000000000000";
|
|
233
|
+
RewardReader: "0x0000000000000000000000000000000000000000";
|
|
234
|
+
GlpRewardRouter: "0x0000000000000000000000000000000000000000";
|
|
235
|
+
StakedGmxTracker: "0x0000000000000000000000000000000000000000";
|
|
236
|
+
FeeGmxTracker: "0x0000000000000000000000000000000000000000";
|
|
237
|
+
GLP: "0x0000000000000000000000000000000000000000";
|
|
238
|
+
GMX: "0x0000000000000000000000000000000000000000";
|
|
239
|
+
ES_GMX: "0x0000000000000000000000000000000000000000";
|
|
240
|
+
BN_GMX: "0x0000000000000000000000000000000000000000";
|
|
241
|
+
USDG: "0x0000000000000000000000000000000000000000";
|
|
242
|
+
BonusGmxTracker: "0x0000000000000000000000000000000000000000";
|
|
243
|
+
StakedGlpTracker: "0x0000000000000000000000000000000000000000";
|
|
244
|
+
FeeGlpTracker: "0x0000000000000000000000000000000000000000";
|
|
245
|
+
ExtendedGmxTracker: "0x0000000000000000000000000000000000000000";
|
|
246
|
+
StakedGmxDistributor: "0x0000000000000000000000000000000000000000";
|
|
247
|
+
StakedGlpDistributor: "0x0000000000000000000000000000000000000000";
|
|
248
|
+
GmxVester: "0x0000000000000000000000000000000000000000";
|
|
249
|
+
GlpVester: "0x0000000000000000000000000000000000000000";
|
|
250
|
+
AffiliateVester: "0x0000000000000000000000000000000000000000";
|
|
251
|
+
Router: "0x0000000000000000000000000000000000000000";
|
|
252
|
+
GovToken: "0x0000000000000000000000000000000000000000";
|
|
253
|
+
ES_GMX_IOU: "0x0000000000000000000000000000000000000000";
|
|
254
|
+
OrderBook: "0x0000000000000000000000000000000000000000";
|
|
255
|
+
UniswapGmxEthPool: "0x0000000000000000000000000000000000000000";
|
|
256
|
+
NATIVE_TOKEN: string;
|
|
257
|
+
};
|
|
194
258
|
43113: {
|
|
195
259
|
Vault: "0x0000000000000000000000000000000000000000";
|
|
196
260
|
Router: "0x0000000000000000000000000000000000000000";
|
|
@@ -9,10 +9,6 @@ export declare const DEFAULT_EXPRESS_ORDER_DEADLINE_DURATION: number;
|
|
|
9
9
|
export declare const MIN_RELAYER_FEE_USD: bigint;
|
|
10
10
|
export declare const GELATO_API_KEYS: Partial<Record<ContractsChainId, string>>;
|
|
11
11
|
export declare const EXPRESS_EXTRA_EXECUTION_FEE_BUFFER_BPS = 1000;
|
|
12
|
-
export declare const EXPRESS_DEFAULT_MIN_RESIDUAL_USD_NUMBER = 20;
|
|
13
|
-
export declare const EXPRESS_DEFAULT_MIN_RESIDUAL_USD: bigint;
|
|
14
|
-
export declare const EXPRESS_DEFAULT_MAX_RESIDUAL_USD: bigint;
|
|
15
|
-
export declare const EXPRESS_RESIDUAL_AMOUNT_MULTIPLIER = 20n;
|
|
16
12
|
export declare function getGasPaymentTokens(chainId: number): string[];
|
|
17
13
|
export declare function getDefaultGasPaymentToken(chainId: number): string;
|
|
18
14
|
export declare function getRelayerFeeToken(chainId: number): Token;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ApiParameterPeriod } from "../rates/types";
|
|
2
|
+
export type ApyEntry = {
|
|
3
|
+
apy: number;
|
|
4
|
+
baseApy: number;
|
|
5
|
+
bonusApr: number;
|
|
6
|
+
};
|
|
7
|
+
export type ApyResponse = {
|
|
8
|
+
markets: Record<string, ApyEntry>;
|
|
9
|
+
glvs: Record<string, ApyEntry>;
|
|
10
|
+
};
|
|
11
|
+
export type ApyParams = {
|
|
12
|
+
period?: ApiParameterPeriod;
|
|
13
|
+
};
|
|
@@ -16,6 +16,7 @@ export type ErrorLike = {
|
|
|
16
16
|
tags?: string;
|
|
17
17
|
isAdditionalValidationPassed?: boolean;
|
|
18
18
|
additionalValidationType?: string;
|
|
19
|
+
simulationMethod?: string;
|
|
19
20
|
info?: {
|
|
20
21
|
error?: ErrorLike;
|
|
21
22
|
};
|
|
@@ -39,6 +40,7 @@ export type ErrorData = {
|
|
|
39
40
|
errorSource?: string;
|
|
40
41
|
isAdditionalValidationPassed?: boolean;
|
|
41
42
|
additionalValidationType?: string;
|
|
43
|
+
simulationMethod?: string;
|
|
42
44
|
parentError?: ErrorData;
|
|
43
45
|
errorDepth?: number;
|
|
44
46
|
};
|
|
@@ -47,6 +49,7 @@ export declare function extendError(error: ErrorLike, params: {
|
|
|
47
49
|
errorSource?: string;
|
|
48
50
|
isAdditionalValidationPassed?: boolean;
|
|
49
51
|
additionalValidationType?: string;
|
|
52
|
+
simulationMethod?: string;
|
|
50
53
|
data?: any;
|
|
51
54
|
}): ErrorLike;
|
|
52
55
|
export declare function parseError(error: ErrorLike | string | undefined, errorDepth?: number): ErrorData | undefined;
|
|
@@ -2,6 +2,8 @@ import { ContractsChainId } from "../../configs/chains";
|
|
|
2
2
|
import { ExecutionFee, GasLimitsConfig, L1ExpressOrderGasReference } from "./types";
|
|
3
3
|
import { DecreasePositionSwapType } from "../orders/types";
|
|
4
4
|
import { TokenData, TokensData } from "../tokens/types";
|
|
5
|
+
export declare function getIsExecutionFeeHigh(chainId: number, feeUsd: bigint): boolean;
|
|
6
|
+
export declare function getIsExecutionFeeVeryHigh(chainId: number, feeUsd: bigint): boolean;
|
|
5
7
|
export declare function getExecutionFee(chainId: number, gasLimits: GasLimitsConfig, tokensData: TokensData, estimatedGasLimit: bigint, gasPrice: bigint, oraclePriceCount: bigint, numberOfParts?: number): ExecutionFee | undefined;
|
|
6
8
|
export declare function estimateRelayerGasLimit({ gasLimits, tokenPermitsCount, feeSwapsCount, feeExternalCallsGasLimit, oraclePriceCount, transactionPayloadGasLimit, l1GasLimit, }: {
|
|
7
9
|
gasLimits: GasLimitsConfig;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { IHttp } from "../http/types";
|
|
2
2
|
import { TokenData } from "../tokens/types";
|
|
3
|
-
import { RawMarketInfo } from "./types";
|
|
3
|
+
import { MarketTicker, MarketWithTiers, RawMarketInfo } from "./types";
|
|
4
4
|
export declare function fetchApiMarketsInfo(ctx: {
|
|
5
5
|
api: IHttp;
|
|
6
6
|
}): Promise<RawMarketInfo[]>;
|
|
7
7
|
export declare function fetchApiTokensData(ctx: {
|
|
8
8
|
api: IHttp;
|
|
9
9
|
}): Promise<TokenData[]>;
|
|
10
|
+
export declare function fetchApiMarkets(ctx: {
|
|
11
|
+
api: IHttp;
|
|
12
|
+
}): Promise<MarketWithTiers[]>;
|
|
13
|
+
export declare function fetchApiMarketsTickers(ctx: {
|
|
14
|
+
api: IHttp;
|
|
15
|
+
}, params?: {
|
|
16
|
+
addresses?: string[];
|
|
17
|
+
symbols?: string[];
|
|
18
|
+
}): Promise<MarketTicker[]>;
|
|
@@ -38,6 +38,7 @@ export declare function formatUsd(usd?: bigint, opts?: {
|
|
|
38
38
|
minThreshold?: string;
|
|
39
39
|
displayPlus?: boolean;
|
|
40
40
|
visualMultiplier?: number;
|
|
41
|
+
roundMode?: "round" | "floor";
|
|
41
42
|
}): string | undefined;
|
|
42
43
|
export declare function formatBigUsd(amount: bigint, opts?: {
|
|
43
44
|
displayDecimals?: number;
|
|
@@ -162,10 +162,11 @@ export declare function buildDecreaseOrderPayload(p: DecreasePositionOrderParams
|
|
|
162
162
|
export declare function buildTwapOrdersPayloads<T extends SwapOrderParams | IncreasePositionOrderParams | DecreasePositionOrderParams>(p: T, twapParams: TwapOrderParams): CreateOrderTxnParams<T>[];
|
|
163
163
|
export declare function getIsTwapOrderPayload(p: CreateOrderPayload): boolean;
|
|
164
164
|
export declare function buildUpdateOrderPayload(p: UpdateOrderParams): UpdateOrderTxnParams;
|
|
165
|
-
export declare function getBatchTotalExecutionFee({ batchParams, tokensData, chainId, }: {
|
|
165
|
+
export declare function getBatchTotalExecutionFee({ batchParams, tokensData, chainId, allowEmptyBatch, }: {
|
|
166
166
|
batchParams: BatchOrderTxnParams;
|
|
167
167
|
tokensData: TokensData;
|
|
168
168
|
chainId: number;
|
|
169
|
+
allowEmptyBatch?: boolean;
|
|
169
170
|
}): ExecutionFee | undefined;
|
|
170
171
|
export declare function getBatchTotalPayCollateralAmount(batchParams: BatchOrderTxnParams): {
|
|
171
172
|
[tokenAddress: string]: bigint;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Pair = {
|
|
2
|
+
ticker_id: string;
|
|
3
|
+
base_currency: string;
|
|
4
|
+
target_currency: string;
|
|
5
|
+
base_volume: number;
|
|
6
|
+
target_volume: number;
|
|
7
|
+
product_type: string;
|
|
8
|
+
last_price: number;
|
|
9
|
+
high?: number;
|
|
10
|
+
low?: number;
|
|
11
|
+
open_interest?: number;
|
|
12
|
+
long_open_interest?: number;
|
|
13
|
+
short_open_interest?: number;
|
|
14
|
+
funding_rate?: number;
|
|
15
|
+
next_funding_rate?: number;
|
|
16
|
+
next_funding_rate_timestamp?: number;
|
|
17
|
+
volume_usd?: number;
|
|
18
|
+
pool_id: string;
|
|
19
|
+
liquidity_in_usd?: number;
|
|
20
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IHttp } from "../http/types";
|
|
2
|
+
import { PerformanceAnnualized, PerformanceParams, PerformanceSnapshots } from "./types";
|
|
3
|
+
export declare function fetchApiPerformanceAnnualized(ctx: {
|
|
4
|
+
api: IHttp;
|
|
5
|
+
}, params?: PerformanceParams): Promise<PerformanceAnnualized[]>;
|
|
6
|
+
export declare function fetchApiPerformanceSnapshots(ctx: {
|
|
7
|
+
api: IHttp;
|
|
8
|
+
}, params?: PerformanceParams): Promise<PerformanceSnapshots[]>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ApiParameterPeriod } from "../rates/types";
|
|
2
|
+
export type PerformanceAnnualized = {
|
|
3
|
+
address: string;
|
|
4
|
+
performance?: string;
|
|
5
|
+
entity: string;
|
|
6
|
+
};
|
|
7
|
+
export type PerformanceSnapshot = {
|
|
8
|
+
snapshotTimestamp: number;
|
|
9
|
+
performance?: string;
|
|
10
|
+
};
|
|
11
|
+
export type PerformanceSnapshots = {
|
|
12
|
+
address: string;
|
|
13
|
+
entity: string;
|
|
14
|
+
snapshots: PerformanceSnapshot[];
|
|
15
|
+
};
|
|
16
|
+
export type PerformanceParams = {
|
|
17
|
+
period?: ApiParameterPeriod;
|
|
18
|
+
address?: string;
|
|
19
|
+
};
|