Set up Kotak Neo.
Check your first quote.
Connect your own broker account to read a supported stock quote through your assistant.
1. Check your installation
Install Quant Brain and connect an assistant first. Check that its tool list contains nse_broker_quote. If it is missing, use a project revision with the broker integration.
The adapter has passed simulated tests. These instructions still need to be verified with a live account. This demo reads quotes; it does not place trades or supply backtest history. Kotak currently maps Reliance only.
2. Get your credentials
- Activate Neo Trade API access for your account.
- Get the plain API token from your Neo API dashboard. Quant Brain calls this consumer_key.
- Complete the broker’s login validation and copy the assigned baseUrl from its response.
- Use that exact HTTPS address. Do not guess an API hostname.
3. Save the credentials on your computer
Open Terminal and run this. It opens your private broker settings file in nano.
QB_CONFIG="$HOME/.local/share/quant-brain"
touch "$QB_CONFIG/research-brokers.env"
chmod 600 "$QB_CONFIG/research-brokers.env"
nano "$QB_CONFIG/research-brokers.env"Copy this template into the file. Replace the YOUR_… placeholders with your values in the private editor.
export QUANT_BROKER_ACCOUNTS='{"local-research":{"kotak":{"consumer_key":"YOUR_NEO_TOKEN","base_url":"YOUR_ASSIGNED_HTTPS_BASE_URL"}}}'Already connected another broker? Keep one QUANT_BROKER_ACCOUNTS line and merge both broker entries under local-research. Don’t add a second line that overwrites the first. The combined template is below.
Show the template for both brokers
export QUANT_BROKER_ACCOUNTS='{"local-research":{"kotak":{"consumer_key":"YOUR_NEO_TOKEN","base_url":"YOUR_ASSIGNED_HTTPS_BASE_URL"},"zerodha":{"api_key":"YOUR_KITE_KEY","access_token":"YOUR_CURRENT_KITE_TOKEN"}}}'Press Ctrl+O, Enter, then Ctrl+X. Restart the assistant’s Quant Brain server. Keep passwords, app secrets, MPIN and one-time codes in the broker login flow.
local-research is the default local owner. On a hosted server, set QUANT_BROKER_ACCOUNTS to the raw JSON in the host’s private environment settings and match the owner ID to MCP_API_KEYS. Omit the export prefix and surrounding single quotes in dashboard fields. Environment settings explained.
4. Ask for a quote
Use Quant Brain nse_broker_quote with ticker=RELIANCE
and broker=kotak. Show broker, symbol, INR price and
retrieval time. If it fails, show the error.Check for an actual tool call. Retrieval time means when Quant Brain received the quote; a trade timestamp is not available here. If you see broker_not_connected, check the owner ID and private settings file. For Kite, also check whether the token has expired.
Set up Zerodha too