@gmx-io/sdk 1.0.0-alpha.2 → 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/README.md +5 -3
- package/build/cjs/src/configs/markets.js +7 -0
- package/build/cjs/src/configs/tokens.js +11 -0
- package/build/cjs/src/prebuilt/hashedKinkModelMarketRatesKeys.json +8 -0
- package/build/cjs/src/prebuilt/hashedMarketConfigKeys.json +50 -0
- package/build/cjs/src/prebuilt/hashedMarketValuesKeys.json +15 -0
- package/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/build/esm/src/configs/markets.js +7 -0
- package/build/esm/src/configs/tokens.js +11 -0
- package/build/esm/src/prebuilt/hashedKinkModelMarketRatesKeys.json +8 -0
- package/build/esm/src/prebuilt/hashedMarketConfigKeys.json +50 -0
- package/build/esm/src/prebuilt/hashedMarketValuesKeys.json +15 -0
- package/build/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +8 -9
package/README.md
CHANGED
|
@@ -69,9 +69,11 @@ sdk.positions
|
|
|
69
69
|
|
|
70
70
|
#### Quick methods:
|
|
71
71
|
|
|
72
|
-
- `long(p: Parameters)` - creates long positions (see [examples](#
|
|
73
|
-
- `short(p: Parameters)` - creates short positions (see [examples](#
|
|
74
|
-
- `swap(p: Parameters)` - creates a swap order (see [examples](#
|
|
72
|
+
- `long(p: Parameters)` - creates long positions (see [examples](#helpers))
|
|
73
|
+
- `short(p: Parameters)` - creates short positions (see [examples](#helpers))
|
|
74
|
+
- `swap(p: Parameters)` - creates a swap order (see [examples](#helpers))
|
|
75
|
+
|
|
76
|
+
#### Full methods:
|
|
75
77
|
|
|
76
78
|
- `cancelOrders(orderKeys: string[])` - cancels orders by order keys
|
|
77
79
|
- `createIncreaseOrder(p: Parameters)` - creates an increase order (see [examples](#examples))
|
|
@@ -580,6 +580,13 @@ exports.MARKETS = {
|
|
|
580
580
|
longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",
|
|
581
581
|
shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
|
|
582
582
|
},
|
|
583
|
+
// DOLO/USD [WETH-USDC]
|
|
584
|
+
"0x4D3Eb91efd36C2b74181F34B111bc1E91a0d0cb4": {
|
|
585
|
+
marketTokenAddress: "0x4D3Eb91efd36C2b74181F34B111bc1E91a0d0cb4",
|
|
586
|
+
indexTokenAddress: "0x97Ce1F309B949f7FBC4f58c5cb6aa417A5ff8964",
|
|
587
|
+
longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
|
588
|
+
shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
|
|
589
|
+
},
|
|
583
590
|
},
|
|
584
591
|
[chains_1.AVALANCHE]: {
|
|
585
592
|
// BTC/USD [BTC-USDC]
|
|
@@ -879,6 +879,17 @@ exports.TOKENS = {
|
|
|
879
879
|
coingeckoUrl: "https://www.coingecko.com/en/coins/mantra",
|
|
880
880
|
isSynthetic: true,
|
|
881
881
|
},
|
|
882
|
+
{
|
|
883
|
+
name: "Dolomite",
|
|
884
|
+
symbol: "DOLO",
|
|
885
|
+
address: "0x97Ce1F309B949f7FBC4f58c5cb6aa417A5ff8964",
|
|
886
|
+
decimals: 18,
|
|
887
|
+
priceDecimals: 6,
|
|
888
|
+
categories: ["defi"],
|
|
889
|
+
imageUrl: "https://assets.coingecko.com/coins/images/54710/standard/DOLO-small.png?1745398535",
|
|
890
|
+
coingeckoUrl: "https://www.coingecko.com/en/coins/dolomite",
|
|
891
|
+
isSynthetic: true,
|
|
892
|
+
},
|
|
882
893
|
{
|
|
883
894
|
name: "GMX LP",
|
|
884
895
|
symbol: "GLP",
|
|
@@ -647,6 +647,14 @@
|
|
|
647
647
|
"baseBorrowingFactorShort": "0x4385c8e191a978b34824ae41b408ba588e261054e5945d0e99068ad10b4905ed",
|
|
648
648
|
"aboveOptimalUsageBorrowingFactorLong": "0x2914e46a2e627cc733a945a8eb44ab2ef758f9a6fc35821bec5e340d7e0239b4",
|
|
649
649
|
"aboveOptimalUsageBorrowingFactorShort": "0xe09312ebfcc03606ed101a23c5fe2e9883e431d2787ba65c5a0ae9526b58ce1b"
|
|
650
|
+
},
|
|
651
|
+
"0x4D3Eb91efd36C2b74181F34B111bc1E91a0d0cb4": {
|
|
652
|
+
"optimalUsageFactorLong": "0x2e3f861626c4e7e577efc24e5c1bf68664f67cca423736be0c5cc5bfd2d51490",
|
|
653
|
+
"optimalUsageFactorShort": "0x6140b20bd94e328307faca8fbb6fcead2c2104a2ef78c533383f36379298cbd2",
|
|
654
|
+
"baseBorrowingFactorLong": "0xb1a5d5b89f2457ae28d85c819b41f35391063c1f32c19406bf0d5f3697d44af7",
|
|
655
|
+
"baseBorrowingFactorShort": "0x6b2efc5c2a51a2cb3b50b9a474a578272ceac9dacd7f8a495246541658b004c4",
|
|
656
|
+
"aboveOptimalUsageBorrowingFactorLong": "0x0364a6542f02b0cf5de96a3f0a0566ee9ac777fdac6302691a0b1296c29edca6",
|
|
657
|
+
"aboveOptimalUsageBorrowingFactorShort": "0x825303f6ce78aa93bacadc5a8603f840a7e0f0bfdd480164fd9b0f3dfefaf00e"
|
|
650
658
|
}
|
|
651
659
|
},
|
|
652
660
|
"43113": {
|
|
@@ -4049,6 +4049,56 @@
|
|
|
4049
4049
|
"virtualMarketId": "0x9bfab2b19467f690a2c7d7a2ff79f023153dbf5544a93501c14c5936fcd75632",
|
|
4050
4050
|
"virtualLongTokenId": "0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f",
|
|
4051
4051
|
"virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960"
|
|
4052
|
+
},
|
|
4053
|
+
"0x4D3Eb91efd36C2b74181F34B111bc1E91a0d0cb4": {
|
|
4054
|
+
"isDisabled": "0xe83e0ec1c1ac7b6988e49213d58bd11bbf6b5afd77c2181f70861e2d01a511d2",
|
|
4055
|
+
"maxLongPoolAmount": "0xa097b6493cd049189f95eb24b10ee6bba633ffc345ca5368f002508e0710de5c",
|
|
4056
|
+
"maxShortPoolAmount": "0x3a62c3ecc3bd77bc6ac9cd711f02b737a57957fd92f4ff4991e344a3cc2d9e90",
|
|
4057
|
+
"maxLongPoolUsdForDeposit": "0x5b8f631e61e2c150cbc7216f1294708b77f7ffb5ac0ddc77e49e39d90973cd04",
|
|
4058
|
+
"maxShortPoolUsdForDeposit": "0xcec2e1dfcff690b41a286cb908f8ec7e8d477eb0c5a4137df3ffa03d6b8bc1d0",
|
|
4059
|
+
"longPoolAmountAdjustment": "0x4828e328562b81a0de9c9c1643b8d78dc00b3f1aeebf9bc2ac063913b360869b",
|
|
4060
|
+
"shortPoolAmountAdjustment": "0xc59ca141127bbc1e0c05ca53f0a693b7753f2eb40e82e4a46091f5c6822ceabb",
|
|
4061
|
+
"reserveFactorLong": "0x04b4bf4124bc2c435a8322257b69201f3faca69b4b41528b66c3ece775ec7599",
|
|
4062
|
+
"reserveFactorShort": "0x3a6c9a54cb408352534a7cc18c5d7609255660fc230a8986f083a4aefd03e685",
|
|
4063
|
+
"openInterestReserveFactorLong": "0x1b0e072734b61aafae0aa4477d30d3142dff83557526128e52921aa980795fc7",
|
|
4064
|
+
"openInterestReserveFactorShort": "0x861a873250c1c87b0d3fcfe8a8bd868d5805edb4344b93c8b8c3c21d38a23f08",
|
|
4065
|
+
"maxOpenInterestLong": "0x36306db41065a9ff0b80796d65c397fdb82feb0478876df11243ce8441c80442",
|
|
4066
|
+
"maxOpenInterestShort": "0x0e76c80c44accb13dff368ae386a5f7ea4431453231552223b06d54e4436c2a9",
|
|
4067
|
+
"minPositionImpactPoolAmount": "0xf532ebf558f007c799e40efcf925d5c8b0a54d20fa5a5827b98651c8fbc0d6a1",
|
|
4068
|
+
"positionImpactPoolDistributionRate": "0xdfb096f793983ae1287c615cab10b12b9b78aac824cdf75f4555aaaa6c126c8b",
|
|
4069
|
+
"borrowingFactorLong": "0x6bcb1c43b78a3699cc620c81d1913eab8fa38bdbd0ab09f278b1ffa3cf3fdbf5",
|
|
4070
|
+
"borrowingFactorShort": "0x5c74aae37330a55a343662dfa6e90aa5eb8436337a24bc5ef6bdbb0184382746",
|
|
4071
|
+
"borrowingExponentFactorLong": "0x0ffd6ce396e5ecd7bf6eb7f72c1904098a749d5778697b228d864900c43a085d",
|
|
4072
|
+
"borrowingExponentFactorShort": "0x7a83fda1755ae48adc568c095c433b60a5fa8e185d2c0d048a7da5aa9c58fb37",
|
|
4073
|
+
"fundingFactor": "0x6553e6ae127cfe5faac7b998815419cd3ff538d7f5119095ba608c1e06fd3c48",
|
|
4074
|
+
"fundingExponentFactor": "0x4279f11a70c0e464b3f4ac316332f50c7c39433e7e8415f5d3507be3f9206254",
|
|
4075
|
+
"fundingIncreaseFactorPerSecond": "0x15baa5f7d714f06984bab3b1a6e277e6afb0a48bc6d111c4bdaaf481945d4b33",
|
|
4076
|
+
"fundingDecreaseFactorPerSecond": "0x255bb64b67c537678593fb60a785fff37eb4434e26dd8bf832dd2814733dda8b",
|
|
4077
|
+
"thresholdForStableFunding": "0x54dd03fb88b75dc954f40a355526e9c8482cc98fc0f3968474c014fe1facee40",
|
|
4078
|
+
"thresholdForDecreaseFunding": "0xfa037a22ec153bc6db4a99a10da601c82c9501e6df9e62291ba5564a97e5aa78",
|
|
4079
|
+
"minFundingFactorPerSecond": "0x19da90413997cebefe8f8ea7272d94f356a7b8a4e8c79c08ce1752e02fb1a5df",
|
|
4080
|
+
"maxFundingFactorPerSecond": "0x84b82ffe4834b4f94641d9a3e2a60fbc0ff1d7e4937d430ee80a014b13175f04",
|
|
4081
|
+
"maxPnlFactorForTradersLong": "0x5c42ebcdd5cc73bbf367156af70735b25897a6accb5699e2dd442a3e7aec32a8",
|
|
4082
|
+
"maxPnlFactorForTradersShort": "0x4845b537832a8b591e75676444faad0887e9747c7624c43298a64ef95d1c2d9a",
|
|
4083
|
+
"positionFeeFactorForPositiveImpact": "0x379014e598d8d0024d508ff729cf9a31eaa22b3554e89bce3ed00e48534e7c5e",
|
|
4084
|
+
"positionFeeFactorForNegativeImpact": "0x62a50f7f748ef2572aa3c3f6f486616ea33a0067bab4b7269610a1cacde6300e",
|
|
4085
|
+
"positionImpactFactorPositive": "0xf181edeb1432f629bf14e39df272865fcc52c85bc89c06fe329eead795328349",
|
|
4086
|
+
"positionImpactFactorNegative": "0xb409ce5f332ad37f5a8f1dd25badc32e20e7526c80ac6cba8faa43afd32f748f",
|
|
4087
|
+
"maxPositionImpactFactorPositive": "0x9acf59a110f586200c0fc1906a2b18a23d3033df529808b6dcf746e8a235e46c",
|
|
4088
|
+
"maxPositionImpactFactorNegative": "0xcf04d976c885aa14b78007f6e63a843f74393edd54f99f8d0c8f9878a33f87aa",
|
|
4089
|
+
"maxPositionImpactFactorForLiquidations": "0x78534eabae34614434e9cbca171a7f3521bb40e26621d621fe9f1280a9eeea7a",
|
|
4090
|
+
"minCollateralFactor": "0x9286a24a3b626cd4b440c9ebc31ce5a5b709c22f2f4acc917c3135cac6b26ef6",
|
|
4091
|
+
"minCollateralFactorForOpenInterestLong": "0x8c69704d7ad8d47b8fc79dd9f203c622ac43de9aaa60e25de14b70468e2d9b25",
|
|
4092
|
+
"minCollateralFactorForOpenInterestShort": "0xfb46f190074aa0025c421e05d226229b80b32da2a638dc566c0ee9b31a62b25e",
|
|
4093
|
+
"positionImpactExponentFactor": "0xfa76ae24b59f8ccb8233c444e1d247e8e7dd78cdb2a7e1ba29dfbb782c4d00da",
|
|
4094
|
+
"swapFeeFactorForPositiveImpact": "0x9108de9102344a53cfaba2ef2d276e027bb6b4051c3e818d7ecbddfc291f9e1f",
|
|
4095
|
+
"swapFeeFactorForNegativeImpact": "0xac6ef53ecc38b138b10d39e00eeabffd9e05f54cc9903fe59702b86960bef8c5",
|
|
4096
|
+
"swapImpactFactorPositive": "0xd6c74362814ea6fd65d9379cfd8fe06f850ac287b75940fd77e0bdc45264edcf",
|
|
4097
|
+
"swapImpactFactorNegative": "0x1db488bdc1bc0726b938a5242b366c388f4ee2152ebfa088e8e35bec3646688d",
|
|
4098
|
+
"swapImpactExponentFactor": "0xcc4807baa2417c31f1cb6b99b84cfa7be11077af4704aa12415f80c2ee7c50b8",
|
|
4099
|
+
"virtualMarketId": "0x646b9cbcf92ff6e208db3b2e7267e1a70f08248b5233dca10c246d857ca6be9f",
|
|
4100
|
+
"virtualLongTokenId": "0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5",
|
|
4101
|
+
"virtualShortTokenId": "0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960"
|
|
4052
4102
|
}
|
|
4053
4103
|
},
|
|
4054
4104
|
"43113": {
|
|
@@ -1214,6 +1214,21 @@
|
|
|
1214
1214
|
"longInterestInTokensUsingShortToken": "0x6f542fdc6addee4e75891c4bfb8860c6232b10e35d2cf34d56a31f6e37a073a4",
|
|
1215
1215
|
"shortInterestInTokensUsingLongToken": "0xbe1d49d8de9f15dd608c0ec6671808b8204838b14e8d31769b30489ee71e6e8e",
|
|
1216
1216
|
"shortInterestInTokensUsingShortToken": "0xb19e3d111bcebca624cd2077e9c21d2f53f98e22648b3625c51cdcaf1ca09ddd"
|
|
1217
|
+
},
|
|
1218
|
+
"0x4D3Eb91efd36C2b74181F34B111bc1E91a0d0cb4": {
|
|
1219
|
+
"longPoolAmount": "0xcfdeeee75cef8de81f3e98bc2ee46390b1ebb489016a64e945f8df208913cd15",
|
|
1220
|
+
"shortPoolAmount": "0x819197d0e2f89533aaf9f8f682459b4a9632d54904ec9e5a550c76963ae99f8b",
|
|
1221
|
+
"positionImpactPoolAmount": "0x744ca86ca9666aad1339f04e710e921b3d1ebc7c56ed244640e5088fa98d6757",
|
|
1222
|
+
"swapImpactPoolAmountLong": "0x762b06f45ebc57521994d8ebf527c46abf5058816c792501f0bf625506e82d35",
|
|
1223
|
+
"swapImpactPoolAmountShort": "0x58950f4dfb0a69cfd67091901b12864103bb9cad22c497d86b4d4d258cf85687",
|
|
1224
|
+
"longInterestUsingLongToken": "0xa31015cdcb4172aaed407c2d933b627f7a8e46999aa67ae98973a8fe9b8c6a15",
|
|
1225
|
+
"longInterestUsingShortToken": "0x139a84e762d9799d19c51f6fb7241c93ea222cd11cfe52aae1306d8825cc6e42",
|
|
1226
|
+
"shortInterestUsingLongToken": "0x3d6d99fcb9adf2d5dcfe04612a0c670605275b61a237d5a077d2eb3044ad8f6a",
|
|
1227
|
+
"shortInterestUsingShortToken": "0xe0e0724df520d9ed9306b7611305b3d4ee8a7b7c48296c8a1bb7df9ad33a4807",
|
|
1228
|
+
"longInterestInTokensUsingLongToken": "0xe992d65208bb38ea6097352425d679b71a75429322dc6b4c872c9451cadd26a6",
|
|
1229
|
+
"longInterestInTokensUsingShortToken": "0xdf1bda8a83a0560547c25e3e4ca770baecbd6a61efb81b6d5e8e4e912f054329",
|
|
1230
|
+
"shortInterestInTokensUsingLongToken": "0x0d9c0848acc691d704ebb980a19c1661d77056a084d0147232952666d6d7780c",
|
|
1231
|
+
"shortInterestInTokensUsingShortToken": "0x41d05cc1bd601fe40bf8e5a838e9e832eb3bd6d9a56dabcf470e99d5e52c3de9"
|
|
1217
1232
|
}
|
|
1218
1233
|
},
|
|
1219
1234
|
"43113": {
|