Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
from cryptography.hazmat.primitives import serialization, hashes
from cryptography.hazmat.primitives.asymmetric import padding, rsa
from cryptography.exceptions import InvalidSignature
from typing import Optional, Dict, Any


class KalshiClient:
def get_markets(self, params: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
return self._get("/markets", params)

import websockets

Expand Down Expand Up @@ -231,4 +237,4 @@ async def on_error(self, error):

async def on_close(self, close_status_code, close_msg):
"""Callback when WebSocket connection is closed."""
print("WebSocket connection closed with code:", close_status_code, "and message:", close_msg)
print("WebSocket connection closed with code:", close_status_code, "and message:", close_msg)