↓ Skip to main content
All methods

stakepd.kalshi_data.KalshiError

Exception
Exception class
kd.KalshiError

Base class for every exception raised by stakepd.kalshi_data.

Catch this to handle any error from the module in one place. Invalid arguments (an unknown status, a bad interval, a millisecond timestamp, max_results=0) raise the built-in ValueError instead.

See also

KalshiAPIError
Raised when Kalshi returns an HTTP error.
KalshiAuthError
Raised when credentials are missing, incomplete or unreadable.

Examples
#

Example:

try:
    markets = client.get_markets(status="open", max_results=100)
except kd.KalshiError as e:
    print("Kalshi request failed:", e)

This method is also covered, alongside the rest of the module, in the overview guide.