pmxt 1.3.3__tar.gz → 1.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pmxt-1.3.3 → pmxt-1.3.4}/PKG-INFO +1 -1
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/__init__.py +1 -1
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/api_client.py +1 -1
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/configuration.py +1 -1
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt/__init__.py +1 -1
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt/models.py +43 -6
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt.egg-info/PKG-INFO +1 -1
- {pmxt-1.3.3 → pmxt-1.3.4}/pyproject.toml +1 -1
- {pmxt-1.3.3 → pmxt-1.3.4}/README.md +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/api/__init__.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/api/default_api.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/api_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/exceptions.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/__init__.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/balance.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/base_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/base_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/cancel_order_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/create_order200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/create_order_params.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/create_order_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/error_detail.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/error_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/exchange_credentials.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_balance200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_markets200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_markets_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_ohlcv200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_ohlcv_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_ohlcv_request_args_inner.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_open_orders200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_open_orders_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_order_book200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_order_book_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_positions200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_positions_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_trades200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/fetch_trades_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/get_markets_by_slug_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/health_check200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/history_filter_params.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/market_filter_params.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/market_outcome.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/order.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/order_book.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/order_level.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/position.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/price_candle.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/search_events200_response.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/search_events_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/search_markets_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/search_markets_request_args_inner.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/trade.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/unified_event.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/unified_market.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/watch_order_book_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/watch_order_book_request_args_inner.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/watch_trades_request.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/py.typed +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/rest.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt/_server/__init__.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt/_server/bin/pmxt-ensure-server +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt/_server/server/bundled.js +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt/client.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt/server_manager.py +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt.egg-info/SOURCES.txt +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt.egg-info/dependency_links.txt +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt.egg-info/requires.txt +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/pmxt.egg-info/top_level.txt +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/setup.cfg +0 -0
- {pmxt-1.3.3 → pmxt-1.3.4}/tests/test_integration.py +0 -0
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'OpenAPI-Generator/1.3.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/1.3.4/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
|
@@ -506,7 +506,7 @@ class Configuration:
|
|
|
506
506
|
"OS: {env}\n"\
|
|
507
507
|
"Python Version: {pyversion}\n"\
|
|
508
508
|
"Version of the API: 0.4.4\n"\
|
|
509
|
-
"SDK Package Version: 1.3.
|
|
509
|
+
"SDK Package Version: 1.3.4".\
|
|
510
510
|
format(env=sys.platform, pyversion=sys.version)
|
|
511
511
|
|
|
512
512
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -9,6 +9,14 @@ from datetime import datetime
|
|
|
9
9
|
from dataclasses import dataclass
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
# Parameter types
|
|
13
|
+
CandleInterval = Literal["1m", "5m", "15m", "1h", "6h", "1d"]
|
|
14
|
+
SortOption = Literal["volume", "liquidity", "newest"]
|
|
15
|
+
SearchIn = Literal["title", "description", "both"]
|
|
16
|
+
OrderSide = Literal["buy", "sell"]
|
|
17
|
+
OrderType = Literal["market", "limit"]
|
|
18
|
+
|
|
19
|
+
|
|
12
20
|
@dataclass
|
|
13
21
|
class MarketOutcome:
|
|
14
22
|
"""A single tradeable outcome within a market."""
|
|
@@ -146,6 +154,41 @@ class UnifiedEvent:
|
|
|
146
154
|
|
|
147
155
|
tags: Optional[List[str]] = None
|
|
148
156
|
"""Event tags"""
|
|
157
|
+
|
|
158
|
+
def search_markets(self, query: str, search_in: SearchIn = "both") -> List[UnifiedMarket]:
|
|
159
|
+
"""
|
|
160
|
+
Search for markets within this event by keyword.
|
|
161
|
+
|
|
162
|
+
Args:
|
|
163
|
+
query: Search query (case-insensitive)
|
|
164
|
+
search_in: Where to search - "title", "description", or "both"
|
|
165
|
+
|
|
166
|
+
Returns:
|
|
167
|
+
List of matching markets
|
|
168
|
+
|
|
169
|
+
Example:
|
|
170
|
+
>>> events = api.search_events('Fed Chair')
|
|
171
|
+
>>> event = events[0]
|
|
172
|
+
>>> warsh_markets = event.search_markets('Kevin Warsh')
|
|
173
|
+
"""
|
|
174
|
+
query_lower = query.lower()
|
|
175
|
+
results = []
|
|
176
|
+
|
|
177
|
+
for market in self.markets:
|
|
178
|
+
match = False
|
|
179
|
+
|
|
180
|
+
if search_in in ("title", "both"):
|
|
181
|
+
if query_lower in market.title.lower():
|
|
182
|
+
match = True
|
|
183
|
+
|
|
184
|
+
if search_in in ("description", "both") and market.description:
|
|
185
|
+
if query_lower in market.description.lower():
|
|
186
|
+
match = True
|
|
187
|
+
|
|
188
|
+
if match:
|
|
189
|
+
results.append(market)
|
|
190
|
+
|
|
191
|
+
return results
|
|
149
192
|
|
|
150
193
|
|
|
151
194
|
|
|
@@ -281,12 +324,6 @@ class Balance:
|
|
|
281
324
|
"""Locked in open orders"""
|
|
282
325
|
|
|
283
326
|
|
|
284
|
-
# Parameter types
|
|
285
|
-
CandleInterval = Literal["1m", "5m", "15m", "1h", "6h", "1d"]
|
|
286
|
-
SortOption = Literal["volume", "liquidity", "newest"]
|
|
287
|
-
SearchIn = Literal["title", "description", "both"]
|
|
288
|
-
OrderSide = Literal["buy", "sell"]
|
|
289
|
-
OrderType = Literal["market", "limit"]
|
|
290
327
|
|
|
291
328
|
|
|
292
329
|
@dataclass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/search_markets_request_args_inner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pmxt-1.3.3 → pmxt-1.3.4}/generated/pmxt_internal/models/watch_order_book_request_args_inner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|