Skip to content

Frequently Asked Questions (FAQ)

Find answers to the most common questions about the INDstocks Trading API.

General

Who can use INDstocks APIs?

INDstocks APIs can be used by:

  • Individual Traders & Investors - Anyone with an INDstocks account and completed KYC verification can access the APIs
  • Algorithmic Traders - Build and deploy automated trading strategies with advanced order types
  • Fintech Developers - Integrate trading capabilities into financial applications
  • Trading Platform Users - Connect INDstocks to algo platforms like Tradetron for automated trading
  • Institutional Traders - Enterprise-grade APIs suitable for institutional platforms
  • Quant Traders - Access historical data and real-time market feeds for backtesting and strategy development

The API is free to access with no subscription fees - you only pay ₹5 flat brokerage per order.

Why should I use INDstocks APIs?

Key Benefits:

  • Free API Access - No subscription fees or API charges, only ₹5 per order brokerage
  • High Performance - Sub-100ms latency for order execution
  • Real-Time Data - WebSocket streams for live market data and order updates
  • Comprehensive Coverage - Multi-exchange support (NSE, BSE) and all asset classes (Equity, Derivatives, Options, Futures)
  • Advanced Trading Features - Smart Orders (GTT) with multi-leg strategies, OCO support, and automated stop-loss/target execution
  • Enterprise-Grade Security - Token-based authentication with encryption in transit
  • Developer-Friendly - RESTful APIs with JSON responses, extensive documentation, and code examples in Python, JavaScript, and cURL
  • Transparent Pricing - Flat ₹5 per order with no hidden costs
What types of APIs does INDstocks provide?

INDstocks provides a comprehensive suite of RESTful APIs organized into these categories:

1. User Management & Authentication

  • User profile and account details
  • Funds and margin information

2. Market Data APIs

  • Real-time market quotes (full quotes, LTP, market depth)
  • Historical OHLCV data with multiple intervals
  • Instruments master data (CSV download)

3. Order Management

  • Place, modify, and cancel orders
  • Order book and trade history
  • Support for multiple order types (LIMIT, MARKET, STOP_LOSS, etc.)

4. Smart Orders (GTT)

  • Multi-leg trading strategies
  • Automated stop-loss and target orders
  • OCO (One-Cancels-Other) support

5. Portfolio & Risk Management

  • Holdings and positions tracking
  • Real-time P&L calculations
  • Margin calculations for orders

6. WebSocket Streaming

  • Live market data streaming
  • Real-time order updates
  • Portfolio change notifications

7. Utility APIs

  • Option chain data
  • Greeks calculations (Delta, Gamma, Theta, Vega)
  • Available expiry dates

See the API Overview for complete documentation.

Can I integrate INDstocks Trading API into my trading platform?

Yes, absolutely! You can integrate INDstocks APIs in two ways:

Option 1: For Algo Platform Users (e.g., Tradetron)

Option 2: For Custom Integration (Developers)

  • Build your own trading application using our RESTful APIs
  • Available in any programming language (Python, JavaScript, Java, etc.)
  • Comprehensive documentation with code examples
  • Deep integration capabilities for order execution, market data, and portfolio management
  • WebSocket support for real-time updates

The API uses standard RESTful conventions with JSON payloads, making it easy to integrate with any platform or application.

Check out our Getting Started Guide for detailed integration instructions.

What are the prerequisites for accessing INDstocks API?

Before you can access the INDstocks API, you need:

  • An INDstocks account - Sign up at indstocks.com (free registration)
  • Completed KYC verification - Required by SEBI regulations for trading in Indian markets
  • Funds in your account - For placing actual trades (no minimum investment required for API access)
  • Basic programming knowledge (for DIY developers) - Python or JavaScript recommended, but any language that can make HTTP requests works

That's it! No additional approvals or subscriptions needed.

How do I get access to INDstocks API?

Getting access is quick and simple:

Step 1: Create Your Account

  • Sign up at indstocks.com
  • Complete your KYC verification (SEBI requirement)

Step 2: Get Your Access Token

Step 3: Start Using the API

  • For developers: Use the token in your API requests (see Getting Started Guide)
  • For algo platforms: Paste the token into your platform's broker integration settings

Important Notes:

  • Access tokens expire after 24 hours and must be regenerated
  • API access is free - no subscription required
  • You can start making API calls immediately after getting your token
Is there a minimum investment amount?

For API Access: No minimum investment required to access the APIs. You can generate your access token and explore the APIs even with zero balance.

For Trading: You need sufficient funds in your account to place actual trades:

  • The minimum depends on the specific stock/instrument you want to trade
  • For equity delivery (CNC), you need funds to buy at least 1 share
  • For intraday (INTRADAY) or derivatives (MARGIN), margin requirements apply based on the instrument

Brokerage: ₹5 flat per order, regardless of order size

Recommendation: Start with small quantities to test your integration before scaling up to larger trades.

Getting Started

How do I get started with the INDstocks API?

Getting started is simple:

  1. Sign up at indstocks.com
  2. Complete KYC verification
  3. Go to indstocks.com/app/api-trading/access-tokens
  4. Generate access token (dashboard or TOTP-based — see Getting Your Access Token)
  5. Start making API calls using the access token

Check out our Getting Started Guide for a detailed walkthrough.

Do I need programming experience to use the API?

Basic programming knowledge is recommended. You should be familiar with:

  • Making HTTP requests
  • Working with JSON data
  • Understanding REST API concepts

Official SDKs are coming soon (see Do you provide SDKs? below) — until then, every endpoint page has ready-to-use cURL, Python, and JavaScript examples.

Is there a sandbox or testing environment?

We recommend starting with small quantities to test your integration and strategies. All API calls are made in the live environment, so please test carefully with minimal risk.

Authentication & Security

How do I authenticate API requests?

Authentication is simple:

  1. Log in to indstocks.com
  2. Go to indstocks.com/app/api-trading/access-tokens and generate your access token
  3. Copy your access token
  4. Include it in the Authorization header of every API request
Python
headers = {
    'Authorization': 'YOUR_ACCESS_TOKEN'
}

See the Authentication Guide for more details.

How long is my access token valid?

Access tokens expire after 24 hours. You will need to generate a new token from your dashboard once your current token expires. For security:

  • Tokens automatically expire after 24 hours
  • Generate a new token when the old one expires
  • Revoke tokens immediately if compromised
  • Never share tokens or commit them to version control

Note that only one TOTP-generated token is live at a time — generating a new one invalidates the previous one. See Token lifecycle.

Can I generate my access token from a script, without logging in?

Yes — set up TOTP once on the website, then call POST /generate/token with your Client ID, MPIN, and a current TOTP code. This is the intended path for unattended/headless strategies.

Two things to keep in mind:

  • Generate once per session, not per request. Only the newest TOTP token is valid, so a second call invalidates the token your other processes are using. There's also a hard limit of 1 token per 60 seconds.
  • Setup itself is web-only. Enabling, resetting, and disabling TOTP all require a logged-in session on the website; there's no API for it.

Full details in Getting Your Access Token — Method 2.

I'm locked out of TOTP token generation. What now?

Five wrong TOTP codes within 15 minutes triggers a 15-minute lockout; three lockouts within an hour triggers a 1-hour lockout plus an email alert. Retrying during a lockout just fails — it won't extend the lockout, but it won't help either.

While you wait:

  • Check your server clock. This is the most common cause. TOTP codes are derived from the current time, so a host whose clock has drifted will generate codes the server rejects even though the app displays them as valid. Sync via NTP.
  • Your existing access token still works. A lockout blocks new token generation only; a token already issued keeps working until its 24-hour expiry, so a running strategy isn't interrupted.
  • If you're being locked out repeatedly with no explanation, email api-support@indstocks.com.

See TOTP limits and lockouts.

I lost the phone with my authenticator app. How do I recover?

The TOTP secret is shown exactly once during setup and can never be re-displayed, so there's nothing to recover — you re-enroll instead:

  1. Log in to the website and choose Disable TOTP. This deletes the stored secret and revokes your currently-active token.
  2. Run Setup TOTP again to get a fresh secret and QR code.
  3. Generate a new access token and update your application.

If you can't log in to the website at all, use the standard forgot-password / account-unlock journey, or contact api-support@indstocks.com for a support-assisted disable.

What should I do if my access token is compromised?
  1. Immediately revoke the compromised token from your dashboard
  2. Generate a new token
  3. Update your application with the new token
  4. Review account activity for unauthorized actions
  5. Contact support if you notice suspicious activity

Pricing & Costs

How much does the API cost?

API Access: FREE

  • No subscription fees
  • No API usage charges
  • No hidden costs

Brokerage: ₹5 per order (regardless of order size)

This makes INDstocks a cost-effective trading API option.

Are there any rate limits?

Yes, to ensure fair usage and system stability. Rate limits vary by endpoint category (Order APIs, Data/Quote APIs, Non-Trading APIs) — see the authoritative table in API Conventions rather than a single flat number. WebSocket connection and subscription limits are documented in the WebSockets guide.

Contact us for higher limits if you need them for institutional use.

Is there a minimum deposit required?

No minimum deposit is required to open an account, but you need sufficient funds/margin to place trades based on your trading strategy.

Trading & Orders

Why is my order being rejected?

Common reasons for order rejection:

Error Solution
Insufficient margin Add more funds to your account
Invalid price Ensure price is within circuit limits and tick size
Invalid quantity For F&O, quantity must be in multiples of lot size
Market closed Orders can only be placed during trading hours
Instrument blocked Some instruments may be blocked by RMS

See our Error Handling Guide for comprehensive error codes.

What order types are supported?

We support all major order types:

  • MARKET - Execute at best available price
  • LIMIT - Execute at specified price or better
  • STOP_LOSS - Trigger when price reaches stop level
  • STOP_LOSS_MARKET - Market order triggered at stop price
  • GTT (Good Till Triggered) - Advanced conditional orders

Learn more in our Order Management Guide.

Can I place orders outside market hours?

Yes! You can place orders anytime, and they will be queued for execution when the market opens. This is particularly useful for:

  • Pre-market orders
  • Algorithmic strategies that run 24/7
  • International users in different time zones
How do I modify or cancel an order?

To modify an order:

Python
response = requests.post('https://api.indstocks.com/order/modify',
    headers={'Authorization': access_token},
    json={
        'order_id': 'ORDER_ID',
        'qty': 200,
        'limit_price': 155.50
    })

To cancel an order:

Python
response = requests.post('https://api.indstocks.com/order/cancel',
    headers={'Authorization': access_token},
    json={'order_id': 'ORDER_ID'})

See Order Management for details.

Market Data

How do I get real-time market quotes?

Use the Market Quotes API:

Python
response = requests.get(
    'https://api.indstocks.com/market/quotes/full',
    headers={'Authorization': access_token},
    params={'symbols': 'NSE:RELIANCE,NSE:TCS'}
)
quotes = response.json()

For streaming data, use WebSockets for lower latency.

How much historical data is available?

We provide 10+ years of historical data for all instruments including:

  • 1-minute candles
  • 5-minute candles
  • 15-minute candles
  • 1-hour candles
  • Daily candles

See Historical Data API for details.

What's the difference between REST API and WebSocket for market data?
Feature REST API WebSocket
Latency Standard Real-time
Update frequency On-demand Real-time push
Use case Periodic updates High-frequency trading
Connection Request-response Persistent connection

Use REST for occasional updates, WebSocket for continuous streaming.

WebSockets

How do I connect to the WebSocket?
JavaScript
const ws = new WebSocket('wss://api.indstocks.com/ws');

ws.on('open', () => {
    // Subscribe to symbols
    ws.send(JSON.stringify({
        action: 'subscribe',
        symbols: ['NSE:RELIANCE', 'NSE:TCS']
    }));
});

ws.on('message', (data) => {
    const tick = JSON.parse(data);
    console.log('Live quote:', tick);
});

Check the WebSocket Guide for comprehensive documentation.

Why is my WebSocket connection dropping?

Common causes:

  • No heartbeat: Send ping messages every 30 seconds
  • Network issues: Implement automatic reconnection
  • Too many subscriptions: Limit to 3,000 instruments per connection (see WebSockets)
  • Invalid authentication: Ensure token is valid

Always implement reconnection logic in production applications.

Smart Orders (GTT)

What are Smart Orders?

Smart Orders (GTT - Good Till Triggered) are advanced conditional orders that execute automatically when specified conditions are met:

  • Single Trigger: Execute one order when price target is reached
  • OCO (One Cancels Other): Place both stop-loss and target together
  • Multi-leg strategies: Complex conditional logic

Learn more in our Smart Orders Guide.

How long do Smart Orders remain active?

Smart Orders remain active for up to 365 days or until:

  • The trigger condition is met
  • You manually cancel them
  • The instrument expires (for derivatives)

Performance & Reliability

What is the API uptime?

We maintain high availability with:

  • Redundant infrastructure across multiple availability zones
  • Real-time monitoring and alerts
  • Automatic failover capabilities
  • Regular maintenance during non-trading hours
What is the typical API latency?

Our API is optimized for fast performance:

  • Order execution: Fast response time for order placement
  • WebSocket data: Real-time data streaming
  • REST API calls: Optimized response times
  • Authentication: Quick token validation
How do you ensure data accuracy?
  • Direct exchange connectivity
  • Real-time validation and reconciliation
  • Multiple data source cross-verification
  • Checksums and integrity verification

SDKs & Integration

Do you provide SDKs?

Official SDKs are in progress, not yet published:

  • Python: Coming soon — currently in development.
  • JavaScript/Node.js: Coming soon.
  • Java: Coming soon.

Until an SDK ships, use the REST API directly — every endpoint page on this site has ready-to-use cURL, Python (requests), and JavaScript (fetch) examples.

Can I use the API with any programming language?

Yes! Our REST API can be used with any language that supports HTTP requests. We provide examples in:

  • Python
  • JavaScript
  • cURL
  • Java (coming soon)
  • C# (coming soon)

Troubleshooting

I'm getting 'TokenException' errors

This means your access token is invalid or expired:

  1. Verify the token is correctly copied from dashboard
  2. Check for extra spaces or newlines
  3. Ensure you're including it in the Authorization header
  4. Generate a new token if the issue persists
Orders are taking longer than expected to execute

Check these factors:

  • Market volatility: High volatility can cause delays
  • Exchange load: Peak hours may have higher latency
  • Order type: Market orders execute faster than limit orders
  • Network latency: Use servers in India for lowest latency

We optimize for fast order execution.

I'm not receiving WebSocket updates

Debug checklist:

  • Connection is established (check 'open' event)
  • Authentication is successful
  • Subscription message was sent correctly
  • Symbol format is correct (e.g., 'NSE:RELIANCE')
  • You're listening for 'message' events
  • Heartbeat/ping is being sent

Support & Documentation

Where can I get help?

Multiple support channels:

  • Email: api-support@indstocks.com
  • Documentation: api-docs.indstocks.com
  • Community: Developer community coming soon
  • Status Page: Check system status at status.indstocks.com
How can I report a bug or request a feature?
  • Bugs: Email api-support@indstocks.com with details
  • Feature requests: Submit via our feedback form
  • Security issues: security@indstocks.com (we have a responsible disclosure policy)
Is there API versioning?

Yes, we follow semantic versioning:

  • Current version: v1 (stable)
  • Deprecation notice: 12 months before any breaking changes
  • Backwards compatibility: Guaranteed for 2 years
  • Version header: Include API-Version: v1 in requests

Still Have Questions?

Can't find what you're looking for?