Changelog
1.5.0-alpha-8 — March 11, 2026
This release expands the GmxApiSdk read surface to cover more GMX HTTP endpoints and exports the matching typed response helpers.
- Added
fetchMarkets(),fetchMarketsTickers(params),fetchTokens(),fetchPairs(),fetchRates(params),fetchApy(params),fetchPerformanceAnnualized(params), andfetchPerformanceSnapshots(params)toGmxApiSdkin@gmx-io/sdk/v2. - Added the matching
@gmx-io/sdk/v2type exports for APY, market tickers, pairs, rates, and performance responses.
1.5.0-alpha-7 — March 9, 2026
This release improves TypeScript type resolution for projects that consume the SDK in CommonJS mode.
- Added
typesVersionsmappings to@gmx-io/sdkso TypeScript resolves subpath types correctly whenmoduleResolutionis set to"node"or"node10"intsconfig.json. Projects using"bundler"or"node16"module resolution already resolve types through theexportsfield and are unaffected. - Covers the root client entrypoints (
@gmx-io/sdk,@gmx-io/sdk/v1,@gmx-io/sdk/v2) as well as config, ABI, utility, prebuilt, and type-only subpaths. - No runtime SDK API methods changed in this release. The update is packaging and type-resolution focused.
1.5.0-alpha-6 — March 9, 2026
This release adds OHLCV reads to GmxApiSdk and renames address-filtered API SDK params to match the underlying REST API.
- Added
fetchOhlcv(params)toGmxApiSdkin@gmx-io/sdk/v2. This method wrapsfetchApiOhlcvand returnsOhlcvCandle[]from/prices/ohlcv. - Renamed
fetchPositionsInfo(params)andfetchOrders(params)params fromaccounttoaddress. The underlyingfetchApiPositionsInfoandfetchApiOrdershelpers now useaddressas well. - Added
OhlcvCandleandOhlcvParamsexports in@gmx-io/sdk/v2, plus the@gmx-io/sdk/types/pricessubpath export for price candle types.
1.5.0-alpha-5 — February 28, 2026
This release fixes a potential negative pool amount edge case in position price impact calculations.
getPriceImpactForPositionin@gmx-io/sdk/utils/feesnow accepts an optionalfallbackToZerooption. When enabled, negative pool amounts are clamped to zero instead of producing invalid results.getContractPositionDynamicFeesin@gmx-io/sdk/utils/positionsusesfallbackToZero: truewhen callinggetPriceImpactForPositioninternally, preventing errors from negative pool states.
1.5.0-alpha-4 — February 13, 2026
This release adds five new synthetic markets on Arbitrum and expands the GmxApiSdk class with positions and orders support.
- Added
fetchPositionsInfo(params)andfetchOrders(params)methods toGmxApiSdkin@gmx-io/sdk/v2. These methods wrapfetchApiPositionsInfoandfetchApiOrdersrespectively. - Added five new Arbitrum markets: XAUT/USD [WBTC-USDC], LIT/USD [WETH-USDC], IP/USD [WBTC-USDC], CC/USD [WBTC-USDC], and MET/USD [WBTC-USDC]. All five index tokens are synthetic.
- Added corresponding token configurations for XAUT, LIT (Lighter), IP (Story), CC (Canton), and MET (Meteora) on Arbitrum.
1.5.0-alpha-3 — February 13, 2026
This release introduces the GmxApiSdk client and adds REST API support for positions, orders, and fee utilities.
- Added
GmxApiSdkclass exported from@gmx-io/sdk/v2. Instantiate it with achainIdto call GMX REST API endpoints directly. ProvidesfetchMarketsInfo()andfetchTokensData()methods. Supported on Arbitrum, Avalanche, and Arbitrum Sepolia; throws at construction time for unsupported chains. - Added
getPositionInfoutility to@gmx-io/sdk/utils/positions. Computes a comprehensive position summary (entry price, PnL, leverage, liquidation price, net value, fees) from a raw position and market data. - Added
getContractPositionDynamicFeesto@gmx-io/sdk/utils/positions. Calculates dynamic fees (borrowing, funding, closing) for a position given the current market fee state. - Added
fetchApiPositionsInfoto@gmx-io/sdk/utils/positions. Fetches position data from the GMX REST API instead of on-chain multicalls (available on Arbitrum, Avalanche, and Arbitrum Sepolia). - Added
fetchApiOrdersto@gmx-io/sdk/utils/orders. Fetches order data from the GMX REST API. - Added
isApiSupported(chainId)to@gmx-io/sdk/configs/api. Returnstruefor chains that have a GMX REST API endpoint (Arbitrum, Avalanche, and Arbitrum Sepolia). - Added
FLOAT_PRECISION_SQRT_DECIMALS(15) andFLOAT_PRECISION_SQRT(10n ** 15n) constants to@gmx-io/sdk/utils/numbers.
1.5.0-alpha-2 — February 11, 2026
This release adds fee utilities and Solidity error decoding helpers.
- Added
getMaxNegativeImpactBpsto@gmx-io/sdk/utils/fees. Converts a market'smaxPositionImpactFactorNegativeto basis points. - Added
tryDecodeCustomError,decodeErrorFromViemError, andextractErrorDataFromViemErrorto@gmx-io/sdk/utils/errors. These functions decode custom Solidity errors from viem error objects using the GMXCustomErrorsABI.
1.3.1 — September 15, 2025
This release fixes order payload forwarding.
- Fixed
dataListnot being forwarded to the on-chain order payload increateIncreaseOrder,createDecreaseOrder, andcreateSwapOrder. ThedataListparameter (optionalstring[]) now defaults to[]when omitted.
1.3.0 — September 15, 2025
This release adds GMX v2.2 contract support and position impact fields.
- Added support for GMX v2.2 contracts. Updated
SyntheticsReaderandClaimHandlerABIs; addedSmartAccountABI. - Added
pendingImpactUsdandclosePriceImpactDeltaUsdfields toPositionInfo. - Added
nextPendingImpactDeltaUsdandpotentialPriceImpactDiffUsdfields toNextPositionValues. - Fixed position impact capping logic in
getNextPositionValuesForIncreaseTradeto usenextSizeUsdinstead ofsizeDeltaUsd.
1.2.1 — August 25, 2025
This release fixes Botanix client initialization.
- Fixed Botanix viem client initialization. Added Botanix to
BATCH_CONFIGS(it was missing, which caused the defaultPublicClientto fail on Botanix). Changed batch config access to use optional chaining (?.) so an unsupported chain ID doesn't throw at client construction time.
1.2.0 — July 17, 2025
This release adds three new markets across Arbitrum and Avalanche.
- Added market and token configurations for three new markets: PUMP/USD [WBTC-USDC] and ARB/USD [ARB-ARB] on Arbitrum, and PUMP/USD [WAVAX-USDC] on Avalanche. PUMP is a synthetic token.
1.1.0 — June 3, 2025
This release adds four new synthetic markets on Arbitrum.
- Added market and token configurations for four new markets on Arbitrum: CRV/USD [WETH-USDC], XMR/USD [WBTC-USDC], MOODENG/USD [WBTC-USDC], and PI/USD [WBTC-USDC]. All four index tokens are synthetic.
1.0.5 — May 26, 2025
This release fixes uiFeeReceiver propagation in order creation.
- Fixed
uiFeeReceivernot being read fromsdk.config.settings.uiFeeReceiverAccountincreateIncreaseOrder,createDecreaseOrder, andcreateSwapOrder. Previously all three functions passedzeroAddressunconditionally.
1.0.3 — May 23, 2025
This release adds the isTrigger parameter and fixes order type forwarding in createDecreaseOrder.
- Added
isTriggerparameter toorders.createDecreaseOrder. Whentrue, the order type is taken fromdecreaseAmounts.triggerOrderType; whenfalseor omitted, the order type defaults toMarket Decrease. - Fixed
orderTypenot being forwarded correctly inorders.createDecreaseOrder.
1.0.0 — April 30, 2025
This is the initial stable release. It removes the deprecated subgraphUrl config key and adds dual ESM/CJS module support.
- Removed
subgraphUrlfromGmxSdkConfig. UsesubsquidUrlinstead. - Added support for both ESM and CJS module formats. The package ships two builds:
build/esm/andbuild/cjs/. - Changed the default module format from ESM to CJS. The
mainentry point resolves tobuild/cjs/src/index.js.