> For the complete documentation index, see [llms.txt](https://docs.openalgo.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openalgo.in/connect-brokers/brokers/indmoney.md).

# IndMoney (INDstocks)

IndMoney (INDstocks) is a modern trading infrastructure platform offering APIs that allow traders and developers to build, automate, and execute trading strategies.\
Using IndMoney APIs, users can connect their IndMoney trading account with tools like **OpenAlgo** and create their own fully self-hosted, secure algo-trading setup.

### Steps for Integration

IndMoney uses a simple **Bearer Token** authentication model.

To generate a token:

Visit [**https://www.indstocks.com/app/api-trading**](https://www.indstocks.com/app/api-trading)

<figure><img src="/files/XvqACTBIuIkI4FA42gmh" alt=""><figcaption></figcaption></figure>

1. Enter your registered mobile number and login with the help of OTP

<figure><img src="/files/WQvEf9zX6NglGgpdP6UL" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/qwNZVpQR78NdBLKP9QeN" alt=""><figcaption></figcaption></figure>

2. Open the **Algo Trading** above the chart view

<figure><img src="/files/dtp0SSfB5n3w8pHt4yvt" alt=""><figcaption></figcaption></figure>

3. Click **Access Tokens ,** generate token and Configure Static IP

<figure><img src="/files/3q2JmLONh7Go7txUQebO" alt=""><figcaption></figcaption></figure>

Click **New Token**

<figure><img src="/files/9CPMGiqNljaGWgEQKVfF" alt=""><figcaption></figcaption></figure>

Click **Save IP Address**

<figure><img src="/files/pAfQMKDU1OXUK16k8yvv" alt=""><figcaption></figcaption></figure>

4. Copy the token shown on screen

<figure><img src="/files/O96Dn8e50Pp8ahSETMHP" alt=""><figcaption></figcaption></figure>

This token will be used in OpenAlgo for all authenticated API requests.

**Note:**\
Tokens usually expire within **24 hours**. You must generate a fresh token when expired.

### Environment Configuration

The generated access token is used as the API SECRET and keep any dummy variable as API KEY. Below is a sample configuration for the `.env` file:

```
# Indmoney Broker Configuration
BROKER_API_KEY = 'wxyz123' #any dummy key
BROKER_API_SECRET = 'your_generated_access_token'
REDIRECT_URL = 'http://127.0.0.1:5000/indmoney/callback'
```

Integrating OpenAlgo with Indmoney's API opens up possibilities for automated trading strategies, providing a powerful tool for traders and developers to exploit market opportunities efficiently. It's essential to follow best practices for API integration, including handling rate limits, managing API keys securely, and ensuring robust error handling and logging mechanisms are in place.
