Examples#
Example:
try:
markets = client.get_markets(status="open", max_results=100)
except kd.KalshiError as e:
print("Kalshi request failed:", e)
kd.KalshiErrorBase class for every exception raised by stakepd.kalshi_data.
status, a bad interval, a millisecond timestamp, max_results=0) raise the built-in ValueError instead.KalshiAPIErrorKalshiAuthErrorExample:
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.