# dYdX v4 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>

#### Export your secret phrase(a set of 24 words) from [dxdx website](https://dydx.trade/), then put it in .env file

<figure><img src="https://1420663172-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb0DdMLXZFpK1vsL3ZKiG%2Fuploads%2FWk4DgdNfMmkohN4auJEb%2FScreenshot%202024-02-14%20at%2021.31.07.png?alt=media&#x26;token=27a45c5d-553f-42b5-9350-ea3517a62676" alt=""><figcaption><p>Click "Export secret phrase" in header</p></figcaption></figure>

{% code title=".env" %}

```
DYDX_V4_MNEMONIC=<PLEASE_PUT_YOUR_PHRASE>
```

{% endcode %}

This is official way provided by dYdX core team to execute trade via bot.&#x20;

<https://docs.dydx.exchange/developers/clients/composite_client#creating-a-localwallet>

#### Set "dydxv4" to "exchange" field in Tradingview alert message.

Sample alert template:

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

* Please deposit collateral(USDC) in advance. Otherwise you get error when you send request to the tool.

* Default validator\&indexer URLs are specified in [config file](https://github.com/junta/tradingview-alert-connector/blob/main/config/production.yaml#L16)

Please replace them if you want to use another one.(after forking the repo)
