MCPcopy Create free account

hub / github.com/ashercn97/predmarket / functions

Functions34 in github.com/ashercn97/predmarket

↓ 10 callersMethod_coerce
Best-effort float conversion that tolerates missing values.
src/predmarket/model/rest/price.py:15
↓ 10 callersMethod_safe_get
Perform a GET request with simple error handling.
src/predmarket/model/rest/exchange.py:17
↓ 5 callersMethodfrom_kalshi
(cls, market: dict[str, Any])
src/predmarket/model/rest/price.py:25
↓ 5 callersMethodfrom_polymarket
(cls, market: dict[str, Any])
src/predmarket/model/rest/price.py:35
↓ 4 callersFunctionclean_params
Remove None values from kwargs before sending as query params.
src/predmarket/model/rest/__init__.py:7
↓ 2 callersMethodparse
(msg: dict)
src/predmarket/model/ws/normalize.py:131
↓ 1 callersMethod_normalize_outcomes
Polymarket sometimes delivers outcomes as JSON strings.
src/predmarket/model/rest/contract.py:17
↓ 1 callersMethodconnect
(cls)
src/predmarket/polymarket/ws.py:26
↓ 1 callersMethodfetch_contracts
(self, **kwargs: Any)
src/predmarket/polymarket/rest.py:32
↓ 1 callersFunctionmain
()
main.py:6
↓ 1 callersFunctionnormalize_message
Normalize any raw message from either source into a unified Pydantic model.
src/predmarket/model/ws/normalize.py:212
↓ 1 callersMethodstream
(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
Methodfetch_contract
Fetch metadata for a single contract.
src/predmarket/model/rest/exchange.py:31
Methodfetch_contract
(self, id: str)
src/predmarket/polymarket/rest.py:26
Methodfetch_contract
(self, id: str)
src/predmarket/kalshi/rest.py:22
Methodfetch_contracts
Fetch a batch of contracts.
src/predmarket/model/rest/exchange.py:35
Methodfetch_contracts
(self, **kwargs)
src/predmarket/kalshi/rest.py:26
Methodfetch_price
Fetch a single contract price.
src/predmarket/model/rest/exchange.py:27
Methodfetch_price
(self, id: str)
src/predmarket/polymarket/rest.py:20
Methodfetch_price
(self, id: str)
src/predmarket/kalshi/rest.py:18
Methodfetch_question
Fetch metadata for a single question/event.
src/predmarket/model/rest/exchange.py:39
Methodfetch_question
(self, id: str)
src/predmarket/polymarket/rest.py:41
Methodfetch_question
(self, id: str)
src/predmarket/kalshi/rest.py:34
Methodfetch_questions
Fetch a batch of questions/events.
src/predmarket/model/rest/exchange.py:43
Methodfetch_questions
(self, **kwargs: Any)
src/predmarket/polymarket/rest.py:46
Methodfetch_questions
(self, **kwargs)
src/predmarket/kalshi/rest.py:38
Methodfrom_kalshi
(cls, market: dict[str, Any])
src/predmarket/model/rest/contract.py:43
Methodfrom_kalshi
(cls, event: dict[str, Any])
src/predmarket/model/rest/question.py:25
Methodfrom_polymarket
(cls, market: dict[str, Any])
src/predmarket/model/rest/contract.py:32
Methodfrom_polymarket
(cls, event: dict[str, Any])
src/predmarket/model/rest/question.py:15
Methodmerge
Merge two list-based responses.
src/predmarket/model/rest/response.py:13
Methodparse
(msg: dict)
src/predmarket/model/ws/normalize.py:68