Common Errors
This page lists frequent errors and quick resolutions.
AuthError
Cause:
- Token expired or invalidated.
Symptom:
- REST/WS calls fail, reconnect loops, or no_data from history.
Resolution:
- Run fyers-auth and restart.
TradingSafetyError
Cause:
- Environment is DEV/PAPER and live orders were attempted.
Symptom:
- Broker raises a safety exception during order submission.
Resolution:
- Set FYERS_ENVIRONMENT=LIVE and ALLOW_LIVE_ORDERS=true only when ready.
OrderUnknownStateError
Cause: - place_order timed out or failed after the server might have accepted the order. Symptom: - Exception on order placement with "unknown state" message. Resolution: - Reconcile via Order WS and orderbook() before any retry.
Cache Lock Warnings
Cause:
- Multiple writers contending for SQLite lock.
Symptom:
- database is locked warnings.
Resolution:
- Tune busy_timeout_ms and backoff in config/cache.yaml.
Scenario Example
Scenario: No WS data but REST calls are fine. - Check WS logs and reconnect settings. - Confirm subscription calls are executed after WS start.