# 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"


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.heyanon.ai/heyanon.ai/hey-anon/protocols-and-functions-supported/defi-protocols/gmx.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
