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)
- Get your access token from indstocks.com/app/api-trading
- Connect to your algo platform by selecting "INDmoney" as your broker
- Paste your access token and start trading
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
- Log in to your INDstocks account
- Navigate to indstocks.com/app/api-trading
- Click "Get Started with INDstocks APIs" or "Generate Token"
- Copy 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:
- Sign up at indstocks.com
- Complete KYC verification
- Navigate to API section in your dashboard
- Generate access token from "Get Started with INDstocks APIs"
- 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
We provide SDKs and code examples in Python and JavaScript to help you get started quickly.
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:
- Log in to indstocks.com
- Navigate to API section → "Get Started with INDstocks APIs"
- Copy your access token
- Include it in the
Authorizationheader of every API request
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
What should I do if my access token is compromised?
- Immediately revoke the compromised token from your dashboard
- Generate a new token
- Update your application with the new token
- Review account activity for unauthorized actions
- 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:
- Orders: 10 orders per second
- Market Data: 100 requests per second
- WebSocket: 100 symbol subscriptions per connection
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:
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:
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:
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?
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 100 symbols per connection
- 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?
Yes! We provide official SDKs for:
- Python:
pip install indstocks-sdk - JavaScript/Node.js:
npm install indstocks-sdk - Java: Coming soon
The SDKs handle authentication, error handling, and provide a clean interface to all API endpoints.
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:
- Verify the token is correctly copied from dashboard
- Check for extra spaces or newlines
- Ensure you're including it in the
Authorizationheader - 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: [email protected]
- 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 [email protected] with details
- Feature requests: Submit via our feedback form
- Security issues: [email protected] (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: v1in requests
Still Have Questions?¶
Can't find what you're looking for?
- 📧 Email us at [email protected]
- 📚 Check our complete API documentation
- 💬 Developer community coming soon