pmxt 1.5.0__py3-none-any.whl → 1.5.2__py3-none-any.whl
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/__init__.py +3 -2
- pmxt/_server/server/bundled.js +18 -7
- pmxt/client.py +36 -0
- {pmxt-1.5.0.dist-info → pmxt-1.5.2.dist-info}/METADATA +1 -1
- {pmxt-1.5.0.dist-info → pmxt-1.5.2.dist-info}/RECORD +10 -10
- pmxt_internal/__init__.py +1 -1
- pmxt_internal/api_client.py +1 -1
- pmxt_internal/configuration.py +1 -1
- {pmxt-1.5.0.dist-info → pmxt-1.5.2.dist-info}/WHEEL +0 -0
- {pmxt-1.5.0.dist-info → pmxt-1.5.2.dist-info}/top_level.txt +0 -0
pmxt/__init__.py
CHANGED
|
@@ -16,7 +16,7 @@ Example:
|
|
|
16
16
|
>>> print(markets[0].title)
|
|
17
17
|
"""
|
|
18
18
|
|
|
19
|
-
from .client import Polymarket, Kalshi, Exchange
|
|
19
|
+
from .client import Polymarket, Kalshi, Limitless, Exchange
|
|
20
20
|
from .server_manager import ServerManager
|
|
21
21
|
from .models import (
|
|
22
22
|
UnifiedMarket,
|
|
@@ -33,11 +33,12 @@ from .models import (
|
|
|
33
33
|
CreateOrderParams,
|
|
34
34
|
)
|
|
35
35
|
|
|
36
|
-
__version__ = "1.5.
|
|
36
|
+
__version__ = "1.5.2"
|
|
37
37
|
__all__ = [
|
|
38
38
|
# Exchanges
|
|
39
39
|
"Polymarket",
|
|
40
40
|
"Kalshi",
|
|
41
|
+
"Limitless",
|
|
41
42
|
"Exchange",
|
|
42
43
|
# Server Management
|
|
43
44
|
"ServerManager",
|
pmxt/_server/server/bundled.js
CHANGED
|
@@ -105198,8 +105198,14 @@ var require_searchEvents2 = __commonJS({
|
|
|
105198
105198
|
});
|
|
105199
105199
|
const markets = response.data?.markets || [];
|
|
105200
105200
|
return markets.map((market) => {
|
|
105201
|
-
|
|
105202
|
-
|
|
105201
|
+
let marketsList = [];
|
|
105202
|
+
if (market.markets && Array.isArray(market.markets)) {
|
|
105203
|
+
marketsList = market.markets.map((child) => (0, utils_1.mapMarketToUnified)(child)).filter((m) => m !== null);
|
|
105204
|
+
} else {
|
|
105205
|
+
const unifiedMarket = (0, utils_1.mapMarketToUnified)(market);
|
|
105206
|
+
if (unifiedMarket)
|
|
105207
|
+
marketsList = [unifiedMarket];
|
|
105208
|
+
}
|
|
105203
105209
|
return {
|
|
105204
105210
|
id: market.slug,
|
|
105205
105211
|
title: market.title || market.question,
|
|
@@ -105212,7 +105218,7 @@ var require_searchEvents2 = __commonJS({
|
|
|
105212
105218
|
tags: market.tags || [],
|
|
105213
105219
|
searchMarkets: function(marketQuery) {
|
|
105214
105220
|
const lowerMarketQuery = marketQuery.toLowerCase();
|
|
105215
|
-
return this.markets.filter((m) => m.title.toLowerCase().includes(lowerMarketQuery) || m.description.toLowerCase().includes(lowerMarketQuery));
|
|
105221
|
+
return this.markets.filter((m) => m.title.toLowerCase().includes(lowerMarketQuery) || m.description && m.description.toLowerCase().includes(lowerMarketQuery));
|
|
105216
105222
|
}
|
|
105217
105223
|
};
|
|
105218
105224
|
});
|
|
@@ -106002,16 +106008,21 @@ var require_fetchMarkets3 = __commonJS({
|
|
|
106002
106008
|
events = cachedEvents;
|
|
106003
106009
|
seriesMap = cachedSeriesMap;
|
|
106004
106010
|
} else {
|
|
106005
|
-
const
|
|
106011
|
+
const isSorted = params?.sort && (params.sort === "volume" || params.sort === "liquidity");
|
|
106012
|
+
const fetchLimit = isSorted ? 1e3 : limit;
|
|
106006
106013
|
const [allEvents, fetchedSeriesMap] = await Promise.all([
|
|
106007
106014
|
fetchActiveEvents(fetchLimit),
|
|
106008
106015
|
fetchSeriesMap()
|
|
106009
106016
|
]);
|
|
106010
106017
|
events = allEvents;
|
|
106011
106018
|
seriesMap = fetchedSeriesMap;
|
|
106012
|
-
|
|
106013
|
-
|
|
106014
|
-
|
|
106019
|
+
events = allEvents;
|
|
106020
|
+
seriesMap = fetchedSeriesMap;
|
|
106021
|
+
if (fetchLimit >= 1e3) {
|
|
106022
|
+
cachedEvents = allEvents;
|
|
106023
|
+
cachedSeriesMap = fetchedSeriesMap;
|
|
106024
|
+
lastCacheTime = now;
|
|
106025
|
+
}
|
|
106015
106026
|
}
|
|
106016
106027
|
const allMarkets = [];
|
|
106017
106028
|
for (const event of events) {
|
pmxt/client.py
CHANGED
|
@@ -990,3 +990,39 @@ class Kalshi(Exchange):
|
|
|
990
990
|
base_url=base_url,
|
|
991
991
|
auto_start_server=auto_start_server,
|
|
992
992
|
)
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
class Limitless(Exchange):
|
|
996
|
+
"""
|
|
997
|
+
Limitless exchange client.
|
|
998
|
+
|
|
999
|
+
Example:
|
|
1000
|
+
>>> # Public data (no auth)
|
|
1001
|
+
>>> limitless = Limitless()
|
|
1002
|
+
>>> markets = limitless.search_markets("Trump")
|
|
1003
|
+
>>>
|
|
1004
|
+
>>> # Trading (requires auth)
|
|
1005
|
+
>>> limitless = Limitless(private_key=os.getenv("LIMITLESS_PRIVATE_KEY"))
|
|
1006
|
+
>>> balance = limitless.fetch_balance()
|
|
1007
|
+
"""
|
|
1008
|
+
|
|
1009
|
+
def __init__(
|
|
1010
|
+
self,
|
|
1011
|
+
private_key: Optional[str] = None,
|
|
1012
|
+
base_url: str = "http://localhost:3847",
|
|
1013
|
+
auto_start_server: bool = True,
|
|
1014
|
+
):
|
|
1015
|
+
"""
|
|
1016
|
+
Initialize Limitless client.
|
|
1017
|
+
|
|
1018
|
+
Args:
|
|
1019
|
+
private_key: Ethereum private key (required for trading)
|
|
1020
|
+
base_url: Base URL of the PMXT sidecar server
|
|
1021
|
+
auto_start_server: Automatically start server if not running (default: True)
|
|
1022
|
+
"""
|
|
1023
|
+
super().__init__(
|
|
1024
|
+
exchange_name="limitless",
|
|
1025
|
+
private_key=private_key,
|
|
1026
|
+
base_url=base_url,
|
|
1027
|
+
auto_start_server=auto_start_server,
|
|
1028
|
+
)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
pmxt/__init__.py,sha256=
|
|
2
|
-
pmxt/client.py,sha256=
|
|
1
|
+
pmxt/__init__.py,sha256=paszN64bZUmov6Xstbx--iHnq7dajljWFQOj8bwTG28,1178
|
|
2
|
+
pmxt/client.py,sha256=YEArwWnyDbd5Hb_HxMWXIqsihUD0RZDaTrBZh4hOlq4,34026
|
|
3
3
|
pmxt/models.py,sha256=-jiQ9mmv_qnF6mzj3DrvNgEA77tE_Pl0RCblM1VbV7o,8581
|
|
4
4
|
pmxt/server_manager.py,sha256=6uS1LIZ2d5d_K-MtbMUAlCZvbvhZ_iyofKok55HEofc,11606
|
|
5
5
|
pmxt/_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
pmxt/_server/bin/pmxt-ensure-server,sha256=kXIond0UbxS52FAVQD7kHmSBaL_s6cbIyapLRr4KZJw,4544
|
|
7
7
|
pmxt/_server/bin/pmxt-ensure-server.js,sha256=kXIond0UbxS52FAVQD7kHmSBaL_s6cbIyapLRr4KZJw,4544
|
|
8
|
-
pmxt/_server/server/bundled.js,sha256=
|
|
9
|
-
pmxt_internal/__init__.py,sha256=
|
|
10
|
-
pmxt_internal/api_client.py,sha256=
|
|
8
|
+
pmxt/_server/server/bundled.js,sha256=YMUXCGZZZCnoroBJb0VY3mFN_SeMO0TZPWHU-sSUFQI,4229211
|
|
9
|
+
pmxt_internal/__init__.py,sha256=g4Xvuf1ct--iqBOJfjonb8NJUDkYzqxyp9B7CWa0Ed4,7578
|
|
10
|
+
pmxt_internal/api_client.py,sha256=J77BQ7Qr80D0tSRKLo6f8Uw4hN644FfswtFC7zREtog,27889
|
|
11
11
|
pmxt_internal/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
12
|
-
pmxt_internal/configuration.py,sha256=
|
|
12
|
+
pmxt_internal/configuration.py,sha256=0ZIq43H06952X8CqiYmRQ-jZpBssvlRq3IE3U78Hhgs,18320
|
|
13
13
|
pmxt_internal/exceptions.py,sha256=txF8A7vlan57JS69kFPs-IZF-Qhp7IZobBTJVa4fOaM,6644
|
|
14
14
|
pmxt_internal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
pmxt_internal/rest.py,sha256=FMj4yaV6XLr842u_ScWHSzQsTFdk0jaUeuWLJoRbogQ,9760
|
|
@@ -65,7 +65,7 @@ pmxt_internal/models/unified_market.py,sha256=DoYhiH4HycYGlq858PEeB-CIA7haT6rxmJ
|
|
|
65
65
|
pmxt_internal/models/watch_order_book_request.py,sha256=kavGUI-SLz2-Kam_jcJ_h0GDe0-9UkxqCmVsAi6Uios,3726
|
|
66
66
|
pmxt_internal/models/watch_order_book_request_args_inner.py,sha256=ZHrjmFDGxRG5MXbuz4mUp9KFfo3XS7zuXWTyMNgi4xI,5464
|
|
67
67
|
pmxt_internal/models/watch_trades_request.py,sha256=brrg8JbEe-aeg7mIe_Y2HzRPogp-IfRhkXChrxzqoLU,3722
|
|
68
|
-
pmxt-1.5.
|
|
69
|
-
pmxt-1.5.
|
|
70
|
-
pmxt-1.5.
|
|
71
|
-
pmxt-1.5.
|
|
68
|
+
pmxt-1.5.2.dist-info/METADATA,sha256=rEfVz-9U84IYfzvtRQjfeQtHnJjs-_KVf9bJZ0xyAyc,6449
|
|
69
|
+
pmxt-1.5.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
70
|
+
pmxt-1.5.2.dist-info/top_level.txt,sha256=J_jrcouJ-x-5lpcXMxeW0GOSi1HsBVR5_PdSfvigVrw,19
|
|
71
|
+
pmxt-1.5.2.dist-info/RECORD,,
|
pmxt_internal/__init__.py
CHANGED
pmxt_internal/api_client.py
CHANGED
|
@@ -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.5.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/1.5.2/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
pmxt_internal/configuration.py
CHANGED
|
@@ -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.5.
|
|
509
|
+
"SDK Package Version: 1.5.2".\
|
|
510
510
|
format(env=sys.platform, pyversion=sys.version)
|
|
511
511
|
|
|
512
512
|
def get_host_settings(self) -> List[HostSetting]:
|
|
File without changes
|
|
File without changes
|