> For the complete documentation index, see [llms.txt](https://docs.cod3x.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cod3x.org/introduction/trading-with-gmx-v2.md).

# Trading With GMX V2

## Trading Infrastructure & GMX V2

Cod3x executes all perpetual trades **directly on GMX V2**.\
Every long or short your agent opens, every limit order, every liquidation—\
all of it ultimately settles on GMX V2 smart contracts.

> **Why it matters**\
> Understanding GMX’s mechanics helps you anticipate funding fees, slippage, and pool dynamics. The Cod3x terminal simplifies execution, but the underlying rules remain GMX’s.

***

<figure><img src="/files/4umJ44VutNctH1lnxbh7" alt=""><figcaption></figcaption></figure>

Make sure to select GMX as your preferred exchange in the tools section in order to trade on GMX.

***

### What You Should Know

Even though Cod3x abstracts away on-chain complexity, your trades inherit GMX V2’s:

* **Funding & Borrow Fees** – The cost of holding leveraged positions.
* **Liquidity Pool Mechanics** – Orders fill against GMX pool liquidity, not an order book.
* **Price Impact & Slippage** – Pool depth and market volatility affect final fills.
* **Liquidation Rules** – Positions can be liquidated if collateral ratios drop below GMX thresholds.
* **Execution Timing** – Transactions are confirmed on-chain; network congestion can affect speed.

***

### Learn the GMX V2 Details

For a deep dive into fee schedules, pool-based perpetuals,\
and all other protocol mechanics, start here:

👉 [GMX V2 Documentation](https://docs.gmx.io/docs/trading/v2)

This is the authoritative reference on:

* Fee structure and funding rates
* Market creation and price feeds
* Slippage, oracles, and risk parameters
* Position management and liquidations

***

**Bottom line**\
Cod3x gives you a streamlined AI trading experience,\
but **your trades still follow GMX V2 rules**.\
Reading the GMX V2 docs ensures you know exactly how costs, risks, and execution work behind the scenes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.cod3x.org/introduction/trading-with-gmx-v2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
