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

2. Open the **API Dashboard**

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

3. Click **New Token** and generate token

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

4. Copy the token shown on screen

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.

5. **Setup Static IP:**\
   Click the small **hexagon icon** next to **New Token** to enable and assign your **static IP**, and then save it.

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

**Note :**&#x41; static IP is mandatory, and it must be whitelisted for all API calls to work. Without whitelisting, INDmoney will reject your API requests.

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


---

# 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://docs.openalgo.in/connect-brokers/brokers/indmoney.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.
