# GMX Setup

Please deploy the latest version of the tool if you've ever used it before

<https://tv-connector.gitbook.io/docs/setup/faq#how-to-deploy-the-latest-version-of-the-tool>

* At the moment, it supports only GMX v2 on Arbitrum&#x20;
* Prepare enough amount of ETH to pay gas fee and collateral token in your wallet.
* Specify [two required values in your .env file](https://tv-connector.gitbook.io/docs/setup/run-on-cloud-service#environment-variables)
* Set "gmx" to "exchange" field in Tradingview alert message.
* Collateral token amount to send(=sizeUsd / GMX\_LEVERAGE) must be greater than 2 USD

<figure><img src="/files/Tv9zTTO6SyETIUG6f6it" alt="" width="375"><figcaption><p>The same spec as GMX frontend</p></figcaption></figure>

Sample alert template:

```json
{
"exchange": "gmx",
"strategy":"testStrategy",
"market":"BTC_USD",
"sizeUsd":"10000",
"reverse":false,
"order":"{{strategy.order.action}}",
"position":"{{strategy.market_position}}",
"price":"{{strategy.order.price}}"
}
```

By default, the tool uses native USDC(<https://arbiscan.io/token/0xaf88d065e77c8cc2239327c5edb3a432268e5831>) as collateral token.

If you want to use another token as collateral, specify token symbol(e.g. "BTC, "ETH", "LINK") in "collateral" field.

Also, collateral except for USDC can be only used to trade the same market. Let's say if you use BTC as collateral, you can trade only for BTC\_USD. (You can't ETH long/short with BTC collateral.

sample alert template:

```
{
"exchange": "gmx",
"strategy":"testStrategy",
"market":"BTC_USD",
"sizeUsd":"10000",
"reverse":false,
"order":"{{strategy.order.action}}",
"position":"{{strategy.market_position}}",
"price":"{{strategy.order.price}}",
"collateral": "BTC"
}
```


---

# 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://tv-connector.gitbook.io/docs/setup/gmx-setup.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.
