Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ashercn97/predmarket
/ functions
Functions
34 in github.com/ashercn97/predmarket
⨍
Functions
34
◇
Types & classes
18
↓ 10 callers
Method
_coerce
Best-effort float conversion that tolerates missing values.
src/predmarket/model/rest/price.py:15
↓ 10 callers
Method
_safe_get
Perform a GET request with simple error handling.
src/predmarket/model/rest/exchange.py:17
↓ 5 callers
Method
from_kalshi
(cls, market: dict[str, Any])
src/predmarket/model/rest/price.py:25
↓ 5 callers
Method
from_polymarket
(cls, market: dict[str, Any])
src/predmarket/model/rest/price.py:35
↓ 4 callers
Function
clean_params
Remove None values from kwargs before sending as query params.
src/predmarket/model/rest/__init__.py:7
↓ 2 callers
Method
parse
(msg: dict)
src/predmarket/model/ws/normalize.py:131
↓ 1 callers
Method
_normalize_outcomes
Polymarket sometimes delivers outcomes as JSON strings.
src/predmarket/model/rest/contract.py:17
↓ 1 callers
Method
connect
(cls)
src/predmarket/polymarket/ws.py:26
↓ 1 callers
Method
fetch_contracts
(self, **kwargs: Any)
src/predmarket/polymarket/rest.py:32
↓ 1 callers
Function
main
()
main.py:6
↓ 1 callers
Function
normalize_message
Normalize any raw message from either source into a unified Pydantic model.
src/predmarket/model/ws/normalize.py:212
↓ 1 callers
Method
stream
(self, ids: list[str])
src/predmarket/polymarket/ws.py:13
Method
__init__
(self, client: AsyncClient)
src/predmarket/model/rest/exchange.py:14
Method
__init__
(self, websocket: websockets.ClientConnection)
src/predmarket/polymarket/ws.py:10
Method
fetch_contract
Fetch metadata for a single contract.
src/predmarket/model/rest/exchange.py:31
Method
fetch_contract
(self, id: str)
src/predmarket/polymarket/rest.py:26
Method
fetch_contract
(self, id: str)
src/predmarket/kalshi/rest.py:22
Method
fetch_contracts
Fetch a batch of contracts.
src/predmarket/model/rest/exchange.py:35
Method
fetch_contracts
(self, **kwargs)
src/predmarket/kalshi/rest.py:26
Method
fetch_price
Fetch a single contract price.
src/predmarket/model/rest/exchange.py:27
Method
fetch_price
(self, id: str)
src/predmarket/polymarket/rest.py:20
Method
fetch_price
(self, id: str)
src/predmarket/kalshi/rest.py:18
Method
fetch_question
Fetch metadata for a single question/event.
src/predmarket/model/rest/exchange.py:39
Method
fetch_question
(self, id: str)
src/predmarket/polymarket/rest.py:41
Method
fetch_question
(self, id: str)
src/predmarket/kalshi/rest.py:34
Method
fetch_questions
Fetch a batch of questions/events.
src/predmarket/model/rest/exchange.py:43
Method
fetch_questions
(self, **kwargs: Any)
src/predmarket/polymarket/rest.py:46
Method
fetch_questions
(self, **kwargs)
src/predmarket/kalshi/rest.py:38
Method
from_kalshi
(cls, market: dict[str, Any])
src/predmarket/model/rest/contract.py:43
Method
from_kalshi
(cls, event: dict[str, Any])
src/predmarket/model/rest/question.py:25
Method
from_polymarket
(cls, market: dict[str, Any])
src/predmarket/model/rest/contract.py:32
Method
from_polymarket
(cls, event: dict[str, Any])
src/predmarket/model/rest/question.py:15
Method
merge
Merge two list-based responses.
src/predmarket/model/rest/response.py:13
Method
parse
(msg: dict)
src/predmarket/model/ws/normalize.py:68