# GMX Docs > LLM-friendly documentation index and full-text bundle for GMX. This file contains links to documentation sections following the llmstxt.org standard. ## Table of Contents - [GMX](https://docs.gmx.io/docs/intro.md): GMX is a decentralized perpetual exchange with 100+ markets across crypto, gold, silver, oil, natural gas and stock indices, and up to 100x leverage. - [AI Agents](https://docs.gmx.io/docs/ai-agents/overview.md): GMX is built for both humans and AI agents. The protocol's oracle-based pricing, deterministic execution, and comprehensive APIs make it the ideal ... - [Plugins and Skills](https://docs.gmx.io/docs/ai-agents/plugins-and-skills.md): The [`gmx-io/gmx-ai`](https://github.com/gmx-io/gmx-ai) repository provides pre-built agent skills that give AI coding agents the ability to trade ... - [Frontend Integration](https://docs.gmx.io/docs/api/frontend-integration.md): The GMX protocol consists of smart contracts deployed on blockchains. - [Getting GM and GLV token prices](https://docs.gmx.io/docs/api/gm-glv-prices.md): Use this page when you need a GM or GLV token price and need to choose the right integration surface. The best method depends on whether you need a... - [Integration guide](https://docs.gmx.io/docs/api/integration-guide.md): Use this page when you want exact integration steps. The hand-written API pages explain which surfaces exist and how they behave operationally. The... - [API Overview](https://docs.gmx.io/docs/api/overview.md): GMX exposes several integration points for developers, integrators, and AI agents building on the protocol. Start with the integration surface that... - [Troubleshooting](https://docs.gmx.io/docs/api/troubleshooting.md): Use this page when API reads do not match what you expect. Most issues fall into one of four buckets: invalid request parameters, stale snapshots, ... - [Updates and Support](https://docs.gmx.io/docs/api/updates-support.md): For contract and API updates, subscribe to the [@GMX_Technical_Announcements](https://t.me/GMX_Technical_Announcements) Telegram channel. - [@gmx-io/gmx-public-api](https://docs.gmx.io/docs/api/gmx-api/gmx-io-gmx-public-api.md): GMX API overview, Swagger spec links, and base URLs. - [Changelog](https://docs.gmx.io/docs/sdk/changelog.md): This release adds the USDG markets on Arbitrum and SDK v2 reads for USDC and USDG conversion, deposit whitelists, and the USDG launch boost rate. - [SDK Overview](https://docs.gmx.io/docs/sdk/overview.md): The GMX SDK (`@gmx-io/sdk`) is a TypeScript library for integrating GMX perpetuals and spot trading into your application. It wraps the GMX smart c... - [Examples](https://docs.gmx.io/docs/sdk/v1/examples.md): Use this page for focused runnable snippets. If you want end-to-end trading flows or operational guidance, start with the [Integration guide](./int... - [api](https://docs.gmx.io/docs/sdk/v1/exports/configs/api.md): This module exposes the SDK's GMX API endpoint lookup helpers. - [batch](https://docs.gmx.io/docs/sdk/v1/exports/configs/batch.md): This module exposes batching defaults used by the SDK's viem transports and paginated Subsquid helpers. - [chainIds](https://docs.gmx.io/docs/sdk/v1/exports/configs/chainIds.md): This module exports the raw numeric chain ID constants used across the SDK, without the richer metadata from [`configs/chains`](./chains.md). - [chains](https://docs.gmx.io/docs/sdk/v1/exports/configs/chains.md): This module provides chain configuration constants, types, and utilities for the GMX protocol. It includes chain IDs, names, gas configurations, ex... - [contracts](https://docs.gmx.io/docs/sdk/v1/exports/configs/contracts.md): This module provides contract addresses for the GMX protocol across different blockchain networks. It includes addresses for V1, V2 (Synthetics), s... - [dataStore](https://docs.gmx.io/docs/sdk/v1/exports/configs/dataStore.md): This module is the SDK's public registry of GMX `DataStore` key constants and key-builder helpers. - [express](https://docs.gmx.io/docs/sdk/v1/exports/configs/express.md): This module exports constants and helpers for Express Trading, subaccounts, and relay flows. - [factors](https://docs.gmx.io/docs/sdk/v1/exports/configs/factors.md): This module provides constants for various impact thresholds, slippage limits, and basis point calculations used throughout the GMX protocol. These... - [fees](https://docs.gmx.io/docs/sdk/v1/exports/configs/fees.md): This module exposes shared fee configuration constants and residual gas helpers used by order and Express Trading flows. - [gasLimits](https://docs.gmx.io/docs/sdk/v1/exports/configs/gasLimits.md): This module exports the SDK's static gas-limit defaults. - [markets](https://docs.gmx.io/docs/sdk/v1/exports/configs/markets.md): This module provides market configuration data for the GMX protocol across different blockchain networks. It contains predefined market configurati... - [multichain](https://docs.gmx.io/docs/sdk/v1/exports/configs/multichain.md): This module exports chain guards used by the SDK's multichain funding logic. - [oracleKeeper](https://docs.gmx.io/docs/sdk/v1/exports/configs/oracleKeeper.md): This module provides utilities for retrieving Oracle Keeper URLs for different blockchain networks supported by the GMX protocol. Oracle Keepers ar... - [tokens](https://docs.gmx.io/docs/sdk/v1/exports/configs/tokens.md): This module provides comprehensive token configuration and utilities for the GMX protocol across different blockchain networks. It includes token d... - [twap](https://docs.gmx.io/docs/sdk/v1/exports/configs/twap.md): This module exports TWAP configuration defaults. - [uniswapV3](https://docs.gmx.io/docs/sdk/v1/exports/configs/uniswapV3.md): This module exposes Uniswap v3 deployment metadata used by external-swap integrations. - [venus](https://docs.gmx.io/docs/sdk/v1/exports/configs/venus.md): This module exposes Venus deployment metadata used by integrations that need Venus token support. - [Useful modules](https://docs.gmx.io/docs/sdk/v1/exports/exports.md): The GMX SDK exports constants, types, and utility functions that you can import directly without going through the `GmxSdk` class. These exports ar... - [24h types](https://docs.gmx.io/docs/sdk/v1/exports/types/24h.md): This type-only entrypoint exports candle data used by the SDK's 24-hour market views. - [chains types](https://docs.gmx.io/docs/sdk/v1/exports/types/chains.md): This type-only entrypoint exports chain configuration shapes. - [fees types](https://docs.gmx.io/docs/sdk/v1/exports/types/fees.md): This type-only entrypoint exports fee and gas-limit model types. - [markets types](https://docs.gmx.io/docs/sdk/v1/exports/types/markets.md): This type-only entrypoint exports the SDK's market and market-info model types. - [orders types](https://docs.gmx.io/docs/sdk/v1/exports/types/orders.md): This type-only entrypoint exports order enums and enriched order model types. - [positions types](https://docs.gmx.io/docs/sdk/v1/exports/types/positions.md): This type-only entrypoint exports raw and enriched position model types. - [prices types](https://docs.gmx.io/docs/sdk/v1/exports/types/prices.md): This type-only entrypoint exports OHLCV candle shapes and request params for the SDK's price candle API helpers. - [referrals types](https://docs.gmx.io/docs/sdk/v1/exports/types/referrals.md): This type-only entrypoint exports the SDK's referral data shapes. - [sdk types](https://docs.gmx.io/docs/sdk/v1/exports/types/sdk.md): This type-only entrypoint exports the v1 client config interface. - [sidecarOrders types](https://docs.gmx.io/docs/sdk/v1/exports/types/sidecarOrders.md): This type-only entrypoint exports sidecar stop-loss, take-profit, and limit-order entry types. - [subsquid types](https://docs.gmx.io/docs/sdk/v1/exports/types/subsquid.md): This type-only entrypoint re-exports the generated GraphQL schema types from the SDK's Subsquid codegen. - [swap types](https://docs.gmx.io/docs/sdk/v1/exports/types/swap.md): This type-only entrypoint exports the swap-strategy model types used by the trade helpers. - [tokens types](https://docs.gmx.io/docs/sdk/v1/exports/types/tokens.md): This type-only entrypoint exports token metadata, pricing, and balance model types. - [trade types](https://docs.gmx.io/docs/sdk/v1/exports/types/trade.md): This type-only entrypoint exports the main trade calculation enums and result types. - [tradeHistory types](https://docs.gmx.io/docs/sdk/v1/exports/types/tradeHistory.md): This type-only entrypoint exports the SDK's normalized trade-history action types. - [twap types](https://docs.gmx.io/docs/sdk/v1/exports/types/twap.md): This type-only entrypoint exports TWAP timing and order-part parameter types. - [LruCache](https://docs.gmx.io/docs/sdk/v1/exports/utils/LruCache.md): This module exports a small in-memory least-recently-used cache. - [abort](https://docs.gmx.io/docs/sdk/v1/exports/utils/abort.md): This module exports abort-signal composition helpers. - [bigmath](https://docs.gmx.io/docs/sdk/v1/exports/utils/bigmath.md): This module provides mathematical utility functions for working with BigInt values, offering operations like absolute value, multiplication with di... - [buildUrl](https://docs.gmx.io/docs/sdk/v1/exports/utils/buildUrl.md): This module exports the URL builder used by the SDK's HTTP helpers. - [chains](https://docs.gmx.io/docs/sdk/v1/exports/utils/chains.md): This module is a type-only re-export for chain configuration shapes used by the SDK. - [common](https://docs.gmx.io/docs/sdk/v1/exports/utils/common.md): This module exports small shared helpers used across the SDK. - [errors](https://docs.gmx.io/docs/sdk/v1/exports/utils/errors.md): This module exposes helpers for extracting and decoding transaction errors, especially viem and GMX custom errors. - [estimateOraclePriceCount](https://docs.gmx.io/docs/sdk/v1/exports/utils/fees/estimateOraclePriceCount.md): This module provides utilities for estimating the number of oracle prices required for various GMX protocol operations. These functions help calcul... - [executionFee](https://docs.gmx.io/docs/sdk/v1/exports/utils/fees/executionFee.md): This module provides utilities for calculating execution fees and estimating gas limits for various GMX protocol operations. It handles fee calcula... - [fees](https://docs.gmx.io/docs/sdk/v1/exports/utils/fees/fees.md): This module provides utilities for calculating various fees in the GMX protocol, including swap fees, position fees, funding fees, borrowing fees, ... - [getNaiveEstimatedGasBySwapCount](https://docs.gmx.io/docs/sdk/v1/exports/utils/fees/getNaiveEstimatedGasBySwapCount.md): This module provides a utility function for calculating estimated gas costs based on the number of swaps in a transaction. - [priceImpact](https://docs.gmx.io/docs/sdk/v1/exports/utils/fees/priceImpact.md): This module provides utilities for calculating price impact in GMX protocol operations, including position trades and swaps. It handles price impac... - [graphqlFetcher](https://docs.gmx.io/docs/sdk/v1/exports/utils/graphqlFetcher.md): This module exports the SDK's default GraphQL POST fetch helper. - [hash](https://docs.gmx.io/docs/sdk/v1/exports/utils/hash.md): This module exports low-level hashing helpers used for SDK key generation. - [indexers](https://docs.gmx.io/docs/sdk/v1/exports/utils/indexers.md): This module exports helper types and functions for building GraphQL filter bodies and paginating indexer reads. - [markets](https://docs.gmx.io/docs/sdk/v1/exports/utils/markets.md): This module provides utilities for working with GMX markets, including market naming, pricing, liquidity calculations, and PnL computations. It han... - [numbers](https://docs.gmx.io/docs/sdk/v1/exports/utils/numbers.md): This module provides comprehensive utilities for handling numeric operations, formatting, and conversions in the GMX protocol. It includes function... - [objects](https://docs.gmx.io/docs/sdk/v1/exports/utils/objects.md): This module exports dictionary helpers used across the SDK. - [orders](https://docs.gmx.io/docs/sdk/v1/exports/utils/orders.md): This module provides utilities for working with GMX orders, including type checking functions, order information processing, and order classificati... - [positions](https://docs.gmx.io/docs/sdk/v1/exports/utils/positions.md): This module provides utilities for working with trading positions in the GMX protocol. It includes functions for calculating position metrics, PnL,... - [prices](https://docs.gmx.io/docs/sdk/v1/exports/utils/prices.md): This module provides utilities for calculating prices, price impacts, and acceptable price ranges for GMX trading operations. This page also covers... - [referrals](https://docs.gmx.io/docs/sdk/v1/exports/utils/referrals.md): This module exports referral-code helpers and referral-related data types. - [sidecarOrders](https://docs.gmx.io/docs/sdk/v1/exports/utils/sidecarOrders.md): This module is a type-only re-export for sidecar stop-loss, take-profit, and limit-order entry shapes. - [findReachableTokens](https://docs.gmx.io/docs/sdk/v1/exports/utils/swap/findReachableTokens.md): This module provides functionality to find all tokens that can be reached from each token in a markets graph through swap operations, respecting ma... - [findSwapPathsBetweenTokens](https://docs.gmx.io/docs/sdk/v1/exports/utils/swap/findSwapPathsBetweenTokens.md): This module computes all valid intermediate-token sequences for swapping between any two tokens in a `MarketsGraph`. The result is a precomputed lo... - [preparedSwapData](https://docs.gmx.io/docs/sdk/v1/exports/utils/swap/preparedSwapData.md): This module provides pre-computed swap data structures for efficient token swapping operations across different chains. It contains adjacency graph... - [swap](https://docs.gmx.io/docs/sdk/v1/exports/utils/swap/swap.md): This module provides utilities for calculating swap statistics and values in the GMX protocol. It includes functions for computing swap fees, price... - [swapPath](https://docs.gmx.io/docs/sdk/v1/exports/utils/swap/swapPath.md): This module provides utilities for finding optimal swap paths between tokens in the GMX protocol. It handles path discovery, liquidity analysis, an... - [swapRouting](https://docs.gmx.io/docs/sdk/v1/exports/utils/swap/swapRouting.md): This module provides utilities for finding optimal swap routes between tokens in GMX markets. It includes functions for creating swap estimators, f... - [swapStats](https://docs.gmx.io/docs/sdk/v1/exports/utils/swap/swapStats.md): This module provides utilities for calculating swap statistics, capacity, and liquidity for token swaps within GMX markets. It includes functions f... - [swapValues](https://docs.gmx.io/docs/sdk/v1/exports/utils/swap/swapValues.md): This module provides utilities for calculating swap amounts and values for token exchanges in the GMX protocol. It handles both internal GMX swaps ... - [time](https://docs.gmx.io/docs/sdk/v1/exports/utils/time.md): This module exports simple period-conversion helpers. - [tokens](https://docs.gmx.io/docs/sdk/v1/exports/utils/tokens.md): This module provides utilities for token price conversions, amount calculations, and token relationship operations in the GMX protocol. It handles ... - [decrease](https://docs.gmx.io/docs/sdk/v1/exports/utils/trade/decrease.md): This module provides utilities for calculating decrease position amounts, fees, and next position values when closing or reducing trading positions... - [increase](https://docs.gmx.io/docs/sdk/v1/exports/utils/trade/increase.md): This module provides utilities for calculating increase position amounts, prices, and next position values for GMX trading operations. It handles d... - [trade](https://docs.gmx.io/docs/sdk/v1/exports/utils/trade/trade.md): This module provides utility functions for trade operations including slippage calculations, swap counting, and trade flag creation for the GMX pro... - [tradeHistory](https://docs.gmx.io/docs/sdk/v1/exports/utils/tradeHistory.md): This module exports typed helpers for transforming Subsquid trade history records into SDK trade actions. - [twap](https://docs.gmx.io/docs/sdk/v1/exports/utils/twap.md): This module exports helpers for validating and deriving TWAP order timing. - [types](https://docs.gmx.io/docs/sdk/v1/exports/utils/types.md): This module exports small shared TypeScript utility types. - [Integration guide](https://docs.gmx.io/docs/sdk/v1/integration-guide.md): Use this page when you want exact steps instead of a function-by-function reference. The [Getting Started](./readme.mdx) page explains the SDK surf... - [Troubleshooting](https://docs.gmx.io/docs/sdk/v1/troubleshooting.md): Use this page when SDK v1 reads or writes do not behave the way you expect. Most production issues fall into one of five buckets: missing receipt h... - [Order Examples](https://docs.gmx.io/docs/sdk/v2/examples.md): This page shows how to create, edit, cancel, and track orders using `GmxApiSdk`. All examples assume Arbitrum (`chainId: 42161`). - [Getting Started](https://docs.gmx.io/docs/sdk/v2/readme.md): Use SDK v2 when you want HTTP-backed GMX data or API-relayed order workflows without wiring RPC, oracle, or Subsquid connections yourself. - [Contract addresses](https://docs.gmx.io/docs/api/contracts/addresses.md): This page lists the key contract addresses for each supported chain. For the complete list of all deployed contracts (100+ per chain), see the [gmx... - [Advanced entry points](https://docs.gmx.io/docs/api/contracts/advanced-entrypoints.md): This page covers the contract surfaces beyond the core `ExchangeRouter` / `GlvRouter` flow: delegated subaccount trading, gasless relay routers, an... - [Architecture](https://docs.gmx.io/docs/api/contracts/architecture.md): This page covers the GMX smart contract architecture, execution model, keeper network, and integration considerations. For contract function refere... - [Delegated trading integration](https://docs.gmx.io/docs/api/contracts/delegated-trading.md): This page explains how to build delegated trading flows on GMX V2 using the subaccount and relay surfaces documented in [Advanced entry points](./a... - [Event monitoring](https://docs.gmx.io/docs/api/contracts/events.md): All protocol events are emitted through a single `EventEmitter` contract. Every event carries an `eventName` field, so you can monitor any protocol... - [ExchangeRouter](https://docs.gmx.io/docs/api/contracts/exchange-router.md): The `ExchangeRouter` contract exposes the main protocol functions for creating orders, deposits, and withdrawals. - [Fees](https://docs.gmx.io/docs/api/contracts/fees.md): This page documents fee types, execution fee calculation, and how to retrieve fee parameters from the DataStore. - [GlvReader](https://docs.gmx.io/docs/api/contracts/glv-reader.md): The `GlvReader` contract provides read-only functions for querying GMX Liquidity Vault (GLV) data from on-chain storage. - [GlvRouter](https://docs.gmx.io/docs/api/contracts/glv-router.md): The `GlvRouter` contract is the main entry point for creating and cancelling GLV (GMX Liquidity Vault) deposits and withdrawals. It works similarly... - [Known issues](https://docs.gmx.io/docs/api/contracts/known-issues.md): This page is based on the known issues section of the [gmx-synthetics repository](https://github.com/gmx-io/gmx-synthetics/blob/updates/README.md#k... - [Overview](https://docs.gmx.io/docs/api/contracts/overview.md): Docs for the GMX contracts. This section focuses on the contracts most integrations interact with directly, not an exhaustive page for every deploy... - [Reader](https://docs.gmx.io/docs/api/contracts/reader.md): The Reader contract provides convenience functions for retrieving information such as markets, positions, and pricing data. - [Simulations](https://docs.gmx.io/docs/api/contracts/simulations.md): The `SimulationRouter` and `GlvRouter` contracts expose public simulation functions that let you dry-run an existing request's execution against su... - [GraphQL](https://docs.gmx.io/docs/api/graphql.md): GMX provides GraphQL endpoints powered by Subsquid for querying indexed on-chain data on Arbitrum, Avalanche, and MegaETH. - [Fallback URLs](https://docs.gmx.io/docs/api/rest-api/fallback-urls.md): This page covers **Oracle API** fallback URLs. The GMX API uses a different redundancy model — see [GMX API peer deployments](#gmx-api-peer-deploym... - [Liquidity](https://docs.gmx.io/docs/api/rest-api/liquidity.md): Oracle API endpoints for APY, performance, and GLV information. - [Markets](https://docs.gmx.io/docs/api/rest-api/markets.md): Oracle API endpoints for trading market information. - [Oracle Prices](https://docs.gmx.io/docs/api/rest-api/oracle-prices.md): Oracle API endpoints for oracle information. - [Contracts for V1](https://docs.gmx.io/docs/archived/contracts-v1.md): Docs for the GMX V1 contracts. - [Liquidity on V1](https://docs.gmx.io/docs/archived/liquidity-v1.md): GLP was the liquidity provider token for V1. Since July 2025, GLP has been phased out and no longer provides liquidity as V1 trading is disabled, s... - [Trading on V1](https://docs.gmx.io/docs/archived/trading-v1.md): Trading on V1 has been phased out since July 2025. Please close any positions using [v1.app.gmx.io](https://v1.app.gmx.io/#/v1). - [Community](https://docs.gmx.io/docs/community.md): Stay up to date with GMX news and connect with the community across the channels listed below. - [Proposal Process](https://docs.gmx.io/docs/governance/proposal-process.md): Submitting a proposal to the GMX DAO follows a structured process, outlined below: - [Voting power](https://docs.gmx.io/docs/governance/voting-power.md): The `GMX_DAO` token is the governance token of the GMX DAO. It lets you participate directly in protocol governance through on-chain voting and del... - [Providing liquidity](https://docs.gmx.io/docs/providing-liquidity.md): GMX lets you earn yield by depositing tokens into liquidity pools. These pools back leverage trading and swaps on the platform, and liquidity provi... - [Referrals](https://docs.gmx.io/docs/referrals.md): Get fee discounts and earn rewards through the GMX referral program. - [Getting Started](https://docs.gmx.io/docs/sdk/v1/readme.md): :::warning - [Security](https://docs.gmx.io/docs/security.md): This page covers general safety practices, audit reports, and the bug bounty program. - [GMX token](https://docs.gmx.io/docs/tokenomics/gmx-token.md): GMX is the platform's utility and governance token. Staking GMX earns you a share of protocol fees — 27% of fees from leverage trading, liquidation... - [Rewards](https://docs.gmx.io/docs/tokenomics/rewards.md): Staking GMX earns you a share of protocol fees. 27% of fees from leverage trading, liquidations, borrowing fees, and swaps are used to buy back GMX... - [Direct URLs](https://docs.gmx.io/docs/trading/direct-urls.md): The GMX frontend supports direct URLs that pre-fill trade parameters, letting you share specific trading configurations or deep-link users into a p... - [Fees](https://docs.gmx.io/docs/trading/fees.md): This page covers all fees on GMX, including trading fees, swap fees, price impact, funding, borrowing, and network fees. - [Liquidations and ADL](https://docs.gmx.io/docs/trading/liquidations.md): This page covers liquidation mechanics, Auto-Deleveraging (ADL), and trading risks. - [Positions and order types](https://docs.gmx.io/docs/trading/order-types.md): This page covers how pricing works on GMX, how to open and manage positions, the available order types, and swaps. - [Trading overview](https://docs.gmx.io/docs/trading/overview.md): GMX is a decentralized exchange that lets you trade without a username or password. The platform uses oracle-based pricing sourced from aggregated ... - [TradFi markets](https://docs.gmx.io/docs/trading/tradfi-markets.md): GMX lists TradFi perpetual markets for gold, silver, oil, natural gas and US equities (SPCX, SPY, QQQ), all tradeable 24/7 with up to 100x leverage. - [USDG launch boost](https://docs.gmx.io/docs/usdg-launch-boost.md): The USDG launch boost adds extra yield to the USDG liquidity pools on Arbitrum during their launch. For the first 8 weeks, it targets 8% APR or hig...