# 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="https://1420663172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb0DdMLXZFpK1vsL3ZKiG%2Fuploads%2FPWSfPDjWEn3XDgP5BMBl%2FScreenshot%202024-06-05%20at%2016.34.23.png?alt=media&#x26;token=cb7f60f1-bc97-4ff2-9fe8-45360ef956e9" 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"
}
```
