From ff3c6eb0f01981175255ba7d273bda2eb78cd3b1 Mon Sep 17 00:00:00 2001 From: TheSomsie Date: Thu, 18 Dec 2025 20:50:34 +0100 Subject: [PATCH] feat: add simple API connection check script A script has been added that checks that the client can access the API and obtain the exchange status. --- check_connection.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 check_connection.py diff --git a/check_connection.py b/check_connection.py new file mode 100644 index 0000000..80d315e --- /dev/null +++ b/check_connection.py @@ -0,0 +1,23 @@ +import os +from clients import get_authenticated_client # adjust if the helper name differs + + +def main() -> None: + """ + Simple helper that verifies we can reach the Kalshi API + using the current environment configuration. + """ + client = get_authenticated_client() + try: + status = client.get_exchange_status() + except Exception as exc: # pragma: no cover - helper script + print("Failed to reach Kalshi API:") + print(repr(exc)) + raise SystemExit(1) + + print("Kalshi exchange status response:") + print(status) + + +if __name__ == "__main__": + main()