> For the complete documentation index, see [llms.txt](https://docs.infinitetrading.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infinitetrading.io/the-protocol/infinite-trading-api-v1/trading-bot-setup-manual-not-needed-+-trading-view.md).

# Trading Bot Setup (Manual, Not needed) + Trading view

Activate the Trading Bot

* Use the `approve` endpoint to assign permissions to the gas wallet to spend the tokens to be traded. If you plan go short, please approve BTCBEAR1X (Polygon/Optimism/Arbitrum), ETHBEAR1X (Polygon/Optimism/Arbitrum) or MATICBEAR1X (Polyogn) to activate permissions for shorts and when approving those, use platform=toros. Shorts are only available for the following chains and tokens:

  * **Polygon**: WETH, WMATIC, and WBTC
  * **Optimism and Arbitrum**: WETH and WBTC

  Note: Those assets must be enabled on dHEDGE vault as allowed assets first from the official UI.
* Use the `setSide` endpoint to activate the trading bot.
* Specify the strategy side (long/short/neutral) and the asset you want to trade.

#### Integrate with Trading View

* **Buy Signal Alerts**: Copy the `setSide` endpoint to your Trading View strategy alert and paste it into the webhook URL with `side=long`.
* **Sell Signal Alerts**: Copy the `setSide` endpoint to your Trading View strategy alert and paste it into the webhook URL with `side=neutral`.
* **Short Signal Alerts**: Copy the `setSide` endpoint to your Trading View strategy alert and paste it into the webhook URL with `side=short`.


---

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

```
GET https://docs.infinitetrading.io/the-protocol/infinite-trading-api-v1/trading-bot-setup-manual-not-needed-+-trading-view.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.
