Exceptions
All psxdata exceptions inherit from PSXDataError.
Custom exception hierarchy for psxdata.
All library exceptions inherit from PSXDataError, allowing callers to catch any library error with a single except clause.
PSXDataError
PSXUnavailableError
Bases: PSXDataError
PSX server is unreachable or returned a 5xx response.
PSXConnectionError
Bases: PSXUnavailableError
Network-level failure — DNS resolution failed, connection refused, or timeout.
The server was never reached.
PSXServerError
Bases: PSXUnavailableError
PSX server was reached but returned a 5xx HTTP response.
PSXAuthError
Bases: PSXDataError
PSX returned 401 or 403 — authentication or authorisation failure.
PSXRateLimitError
Bases: PSXDataError
PSX returned 429 — rate limit exceeded.
PSXParseError
Bases: PSXDataError
HTML structure changed or response could not be parsed.
Also raised for unexpected 4xx responses (400, 404, etc.).
InvalidSymbolError
Bases: PSXDataError
The requested ticker symbol does not exist on PSX.
DelistedSymbolError
Bases: InvalidSymbolError
The requested ticker existed on PSX but has since been delisted.
DataNotAvailableError
Bases: PSXDataError
Valid symbol requested but PSX returned no data for the given period.
CacheError
Bases: PSXDataError
Disk cache read or write failure.