Direct URLs
The GMX frontend supports direct URLs that pre-fill trade parameters, letting you share specific trading configurations or deep-link users into a particular state.
Trade parameters
Use the /trade/:tradeType path to open the trade page with pre-selected settings. The trade type is a URL path segment, not a query parameter. All query parameters are removed from the URL after two seconds.
| Parameter | Location | Description | Accepted values |
|---|---|---|---|
tradeType | Path segment | The type of trade | long, short, swap (case-insensitive) |
mode | Query parameter | The order mode | market, limit, stopmarket, trigger, twap (case-insensitive); tpsl is an alias for trigger |
from | Query parameter | The token used for payment | Token symbol such as eth, btc, usdc (case-insensitive) |
to or market | Query parameter | The asset to long, short, or swap to | Token symbol such as eth, btc, uni (case-insensitive); to and market are interchangeable |
collateral | Query parameter | The collateral asset | Token symbol such as eth, usdc, usdt (case-insensitive) |
pool | Query parameter | The liquidity pool for the trade | Pool name such as weth-usdc, btc-usdc (case-insensitive) |
chainId | Query parameter | Triggers a network switch on load | Numeric chain ID such as 42161 (Arbitrum) |
Not all order modes are available for every trade type. Stop Market is only available for long and short positions. TWAP is available for long, short, and swap trades. Swaps do not support Stop Market.
Examples
https://app.gmx.io/#/trade/long?mode=limit&from=eth&market=solhttps://app.gmx.io/#/trade/short?mode=limit&from=eth&to=btchttps://app.gmx.io/#/trade/short?mode=market&from=eth&to=btc&collateral=usdchttps://app.gmx.io/#/trade/short?mode=market&from=eth&to=sol&collateral=usdc&pool=sol-usdc
GM pools parameters
Use the /pools/details path to open a specific GM pool with a pre-selected operation and mode. The market parameter must be the pool's contract address, not a token symbol.
| Parameter | Description | Accepted values |
|---|---|---|
market | The GM or GLV pool to open | Contract address (hex) of the market or GLV token |
operation | The deposit or withdrawal direction | Deposit, Withdrawal, Shift (case-sensitive) |
mode | The deposit or withdrawal mode | Single, Pair (case-sensitive) |
The operation and mode values are case-sensitive. Deposit, Withdrawal, Shift, Single, and Pair must be capitalized exactly as shown. Values in any other case are ignored and the page opens with its default state.
Examples
https://app.gmx.io/#/pools/details?market=0x450bb6774Dd8a756274E0ab4107953259d2ac541&operation=Deposit&mode=Singlehttps://app.gmx.io/#/pools/details?market=0x450bb6774Dd8a756274E0ab4107953259d2ac541&operation=Withdrawal&mode=Pairhttps://app.gmx.io/#/pools/details?market=0x450bb6774Dd8a756274E0ab4107953259d2ac541&operation=Deposit&mode=Pair