# Wisdom Capital

Wisdom Capital provides API access through the Symphony Fintech XTS platform. This guide helps you integrate Wisdom Capital with OpenAlgo for both order execution and market data streaming.

***

### Step 1: Create API Applications

Login to the [Wisdom Capital Developer Portal](https://trade.wisdomcapital.in/dashboard#!/login).

After logging in:

1. Go to `My App` > `Create New Application`
2. You need to create two applications:
   * One for **Interactive Order API**
   * One for **Market Data API**

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

#### Application Setup:

For each app, fill in the following:

* **App Name**: OpenAlgo
* **App Description**: OpenAlgo
* **Select API Package**: Choose `Interactive Order API` or `Market Data API` depending on the app.

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

Repeat the process for both API packages.

Once submitted, wait for the apps to be **approved**. The API status will show as **Active** once approved.

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

***

### Step 2: Setup Environment Variables

Refer to the `.sample.env` file in OpenAlgo and prepare your `.env` with the following structure:

```env
# Broker Configuration
BROKER_API_KEY = 'YOUR_WISDOM_ORDER_API_KEY'
BROKER_API_SECRET = 'YOUR_ORDER_API_SECRET'

BROKER_API_KEY_MARKET = 'YOUR_WISDOM_MARKET_API_KEY'
BROKER_API_SECRET_MARKET = 'YOUR_MARKET_API_SECRET'

REDIRECT_URL = 'http://127.0.0.1:5000/wisdom/callback'
```

Replace placeholder values with actual credentials obtained after app approval.

***

### Step 3: Start OpenAlgo

Ensure `.env` is correctly configured and that both APIs (order and market data) are active. Then, start OpenAlgo.

> You can now place live orders and get real-time market data via Wisdom Capital’s XTS API inside OpenAlgo.

***

### Final Note

Integrating OpenAlgo with Wisdom Capital's XTS API gives you access to real-time market data and order execution in a programmable environment. Follow best practices—keep your API keys secure, implement appropriate error handling, and regularly monitor your API usage to ensure a smooth trading experience.


---

# 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/wisdom-capital.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.
