> For the complete documentation index, see [llms.txt](https://docs.heyanon.ai/heyanon.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.heyanon.ai/heyanon.ai/hey-anon/protocols-and-functions-supported/defi-protocols/gmx.md).

# GMX

## GMX Protocol Integration

### Overview

This module provides integration with GMX, a decentralized spot and perpetual exchange where users can provide liquidity, swap assets and go long/short on supported assets. Suppliers provide liquidity to earn trading fees, while traders can access leverage.

### Core Components

**Trading**

* Open long position on supported asset
* Open short position on supported asset
* Swap between assets supported by the protocol

#### LP Operations

* **LP Functions**:
  * Swap supported assets to buy GLP
  * Earn real yield through GLP
  * Swap GLP asset into supported assets

### Example Prompts:

* "HeyAnon, please supply 1000 USDT to GLP on @gmx on Arbitrum"
* "HeyAnon, please use 1000 USDT on @gmx on Arbitrum to open a 3x long on BTCUSD. Take profit at 99%, Stop loss at 33%"
* "HeyAnon, please update me on the current PnL of my positions on @gmx on Arbitrum"
