nse-query-documentation
nse-query-documentation
3. Technical Details
4. Implementation Notes
5. Usage Example
Expected console output:
┌─────────────────┬────────────────────────────┐
│ Property │ Value │
├─────────────────┼────────────────────────────┤
│ symbol │ BAJFINANCE │
│ lastPrice │ 6789.45 │
│ change │ 45.30 │
│ pChange │ 0.67 │
│ volume │ 1234567 │
│ lastUpdateTime │ 08-Jan-2024 15:30:00 │
└─────────────────┴────────────────────────────┘
6. Important Considerations
1. The code must be run in a browser environment with CORS support
2. Proper internet connectivity is required
3. NSE website should be accessible from the user’s location
4. The stock symbol should be valid and actively traded
7. Troubleshooting
Common issues and solutions: 1. CORS errors: Ensure the request is made from an allowed
origin 2. 401/403 errors: Check if headers are properly set 3. Undefined data: Verify the
stock symbol is correct 4. Cookie issues: Make sure the homepage request completes before
the API call