synpath 0.5.1__tar.gz → 0.6.0__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.
- {synpath-0.5.1 → synpath-0.6.0}/PKG-INFO +3 -2
- {synpath-0.5.1 → synpath-0.6.0}/README.md +2 -1
- {synpath-0.5.1 → synpath-0.6.0}/pyproject.toml +1 -1
- {synpath-0.5.1 → synpath-0.6.0}/synpath/__init__.py +7 -5
- {synpath-0.5.1 → synpath-0.6.0}/synpath/client.py +6 -1
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/__main__.py +1 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/feeds.py +8 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ids.py +1 -1
- synpath-0.6.0/synpath/limitless.py +620 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/server/serve.py +1 -1
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/__init__.py +4 -1
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/__main__.py +3 -1
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/credentials.py +58 -1
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/init.py +13 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/instruments.py +2 -0
- synpath-0.6.0/synpath/trading/limitless.py +755 -0
- synpath-0.6.0/synpath/trading/limitless_signing.py +153 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/types.py +30 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/__init__.py +4 -1
- synpath-0.6.0/synpath/ws/limitless.py +385 -0
- {synpath-0.5.1 → synpath-0.6.0}/Cargo.toml +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/LICENSE +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/Cargo.lock +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/Cargo.toml +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/src/kalshi.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/src/lib.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/src/objects.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/src/polymarket.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/src/pyjson.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/src/router.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/src/signing.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/bindings/python/src/venues.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/build_backend/synpath_build.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/Cargo.lock +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/Cargo.toml +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/examples/decode_timing.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/src/book.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/src/kalshi.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/src/lib.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/src/opinion.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/src/polymarket.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/src/polymarket_us.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/src/router.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/src/signing.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/crates/synpath-core/src/wire.rs +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/__main__.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/_native.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/base.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/bucket.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/__init__.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/alerts.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/engine.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/eod.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/events.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/fair_values.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/journal.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/ledger.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/__init__.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/base.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/day.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/iceberg.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/manager.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/oco.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/peg.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/routed.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/stop.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/taker.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/orders/twap.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/paper.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/reconcile.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/risk.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/engine/router.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/errors.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/history.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/hosted.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/hosted_auth.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/hyperliquid.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/kalshi.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/matching.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/opinion.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/polymarket.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/polymarket_us.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/predict_fun.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/remote.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/server/__init__.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/server/__main__.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/server/api.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/server/errors.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/server/local.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/server/models.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/server/store.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/server/trading.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/base.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/errors.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/hyperliquid.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/hyperliquid_signing.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/kalshi.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/limiter.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/money.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/opinion.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/opinion_signing.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/polymarket.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/polymarket_signing.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/polymarket_us.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/polymarket_us_exchange.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/predict_fun.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/predict_fun_signing.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/trading/types.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/base.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/grpc.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/hyperliquid.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/kalshi.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/opinion.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/polymarket.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/polymarket_us.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/polymarket_us_exchange.py +0 -0
- {synpath-0.5.1 → synpath-0.6.0}/synpath/ws/predict_fun.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: synpath
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
|
5
5
|
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -76,6 +76,7 @@ One order, both order books combined, filled from the cheapest price after fees.
|
|
|
76
76
|
| | [Opinion](https://opinion.trade) | `opinion` | ✓ | ✓ | WebSocket (API key) | one book per outcome token |
|
|
77
77
|
| | [Hyperliquid](https://app.hyperliquid.xyz) | `hyperliquid` | ✓ outcome markets (HIP-4) | ✓ | WebSocket (no key) | one book per market, both sides read it |
|
|
78
78
|
| | [predict.fun](https://predict.fun) | `predict_fun` | ✓ (API key) | ✓ | WebSocket (API key) | one book per market, both sides read it |
|
|
79
|
+
| | [Limitless](https://limitless.exchange) | `limitless` | ✓ | ✓ | WebSocket | one book per market, both sides read it |
|
|
79
80
|
|
|
80
81
|
## Why Synpath
|
|
81
82
|
|
|
@@ -125,7 +126,7 @@ fee.estimate(price=0.50, contracts=100) # 1.75
|
|
|
125
126
|
**Same code, every venue**
|
|
126
127
|
|
|
127
128
|
```python
|
|
128
|
-
for venue_id in synpath.exchanges: # ['kalshi', 'polymarket', 'polymarket_us', 'opinion', 'hyperliquid', 'predict_fun']
|
|
129
|
+
for venue_id in synpath.exchanges: # ['kalshi', 'polymarket', 'polymarket_us', 'opinion', 'hyperliquid', 'predict_fun', 'limitless']
|
|
129
130
|
with synpath.exchange(venue_id) as venue:
|
|
130
131
|
page = venue.fetch_markets(limit=5)
|
|
131
132
|
|
|
@@ -30,6 +30,7 @@ One order, both order books combined, filled from the cheapest price after fees.
|
|
|
30
30
|
| | [Opinion](https://opinion.trade) | `opinion` | ✓ | ✓ | WebSocket (API key) | one book per outcome token |
|
|
31
31
|
| | [Hyperliquid](https://app.hyperliquid.xyz) | `hyperliquid` | ✓ outcome markets (HIP-4) | ✓ | WebSocket (no key) | one book per market, both sides read it |
|
|
32
32
|
| | [predict.fun](https://predict.fun) | `predict_fun` | ✓ (API key) | ✓ | WebSocket (API key) | one book per market, both sides read it |
|
|
33
|
+
| | [Limitless](https://limitless.exchange) | `limitless` | ✓ | ✓ | WebSocket | one book per market, both sides read it |
|
|
33
34
|
|
|
34
35
|
## Why Synpath
|
|
35
36
|
|
|
@@ -79,7 +80,7 @@ fee.estimate(price=0.50, contracts=100) # 1.75
|
|
|
79
80
|
**Same code, every venue**
|
|
80
81
|
|
|
81
82
|
```python
|
|
82
|
-
for venue_id in synpath.exchanges: # ['kalshi', 'polymarket', 'polymarket_us', 'opinion', 'hyperliquid', 'predict_fun']
|
|
83
|
+
for venue_id in synpath.exchanges: # ['kalshi', 'polymarket', 'polymarket_us', 'opinion', 'hyperliquid', 'predict_fun', 'limitless']
|
|
83
84
|
with synpath.exchange(venue_id) as venue:
|
|
84
85
|
page = venue.fetch_markets(limit=5)
|
|
85
86
|
|
|
@@ -9,7 +9,7 @@ backend-path = ["build_backend"]
|
|
|
9
9
|
|
|
10
10
|
[project]
|
|
11
11
|
name = "synpath"
|
|
12
|
-
version = "0.
|
|
12
|
+
version = "0.6.0"
|
|
13
13
|
description = "One API for prediction markets. Kalshi and Polymarket, normalized, with every price labelled by source and time."
|
|
14
14
|
readme = "README.md"
|
|
15
15
|
requires-python = ">=3.10"
|
|
@@ -45,6 +45,7 @@ from .polymarket_us import PolymarketUS
|
|
|
45
45
|
from .opinion import Opinion
|
|
46
46
|
from .hyperliquid import Hyperliquid
|
|
47
47
|
from .predict_fun import PredictFun
|
|
48
|
+
from .limitless import Limitless
|
|
48
49
|
from .matching import match_event, match_market
|
|
49
50
|
from .history import fetch_order_book_at, fetch_order_book_range, fetch_trades_range
|
|
50
51
|
from .bucket import Bucket, BucketMember, BucketOrderReport, BucketPosition
|
|
@@ -78,7 +79,7 @@ from .types import (
|
|
|
78
79
|
TradesRangeResponse,
|
|
79
80
|
)
|
|
80
81
|
|
|
81
|
-
__version__ = "0.
|
|
82
|
+
__version__ = "0.6.0"
|
|
82
83
|
|
|
83
84
|
exchanges: dict[str, type[Exchange]] = {
|
|
84
85
|
"kalshi": Kalshi,
|
|
@@ -87,6 +88,7 @@ exchanges: dict[str, type[Exchange]] = {
|
|
|
87
88
|
"opinion": Opinion,
|
|
88
89
|
"hyperliquid": Hyperliquid,
|
|
89
90
|
"predict_fun": PredictFun,
|
|
91
|
+
"limitless": Limitless,
|
|
90
92
|
}
|
|
91
93
|
"""Every venue this library speaks, by id."""
|
|
92
94
|
|
|
@@ -107,7 +109,7 @@ def exchange(venue: str, **kwargs) -> Exchange:
|
|
|
107
109
|
# keeps working. Imported last, after the read API it builds on.
|
|
108
110
|
from .trading import (
|
|
109
111
|
TradingExchange, KalshiTrading, PolymarketTrading, PolymarketUSTrading, PolymarketUSExchangeTrading,
|
|
110
|
-
OpinionTrading, HyperliquidTrading, PredictFunTrading,
|
|
112
|
+
OpinionTrading, HyperliquidTrading, PredictFunTrading, LimitlessTrading,
|
|
111
113
|
Account, Balance, EditRequest, FeeEstimate, Fill, HeldBy, Liquidity,
|
|
112
114
|
Order, OrderRequest, OrderStatus, OrderType, Position, PositionSide,
|
|
113
115
|
Precision, Settlement, SettlementState, Side, TimeInForce,
|
|
@@ -136,7 +138,7 @@ _STREAM_CLASSES = (
|
|
|
136
138
|
"PolymarketUSExchangeInstrumentStream", "PolymarketUSExchangePositionStream",
|
|
137
139
|
"PolymarketUSExchangeMarketDataStream", "PolymarketUSExchangeBalanceLedgerStream",
|
|
138
140
|
"OpinionMarketStream", "OpinionUserStream", "HyperliquidMarketStream", "HyperliquidUserStream",
|
|
139
|
-
"PredictFunMarketStream", "PredictFunUserStream",
|
|
141
|
+
"PredictFunMarketStream", "PredictFunUserStream", "LimitlessMarketStream", "LimitlessUserStream",
|
|
140
142
|
)
|
|
141
143
|
_SERVER_NAMES = ("create_app", "create_trading_app", "VenueRegistry", "ControlStore", "Principal")
|
|
142
144
|
|
|
@@ -158,7 +160,7 @@ def __getattr__(name: str):
|
|
|
158
160
|
|
|
159
161
|
|
|
160
162
|
__all__ = [
|
|
161
|
-
"Kalshi", "Polymarket", "PolymarketUS", "Opinion", "Hyperliquid", "PredictFun", "Exchange", "exchange", "exchanges",
|
|
163
|
+
"Kalshi", "Polymarket", "PolymarketUS", "Opinion", "Hyperliquid", "PredictFun", "Limitless", "Exchange", "exchange", "exchanges",
|
|
162
164
|
"Capability", "HttpClient", "RateLimiter",
|
|
163
165
|
"Market", "Event", "Outcome", "Quote", "MarketStats", "OrderBook",
|
|
164
166
|
"OrderLevel", "Trade", "Candle", "FeeSchedule", "Series", "Page",
|
|
@@ -175,7 +177,7 @@ __all__ = [
|
|
|
175
177
|
"MarketNotFound", "NotSupported", "AuthenticationError",
|
|
176
178
|
# order entry
|
|
177
179
|
"TradingExchange", "KalshiTrading", "PolymarketTrading", "PolymarketUSTrading", "PolymarketUSExchangeTrading",
|
|
178
|
-
"OpinionTrading", "HyperliquidTrading", "PredictFunTrading",
|
|
180
|
+
"OpinionTrading", "HyperliquidTrading", "PredictFunTrading", "LimitlessTrading",
|
|
179
181
|
"Account", "Balance", "EditRequest", "FeeEstimate", "Fill", "HeldBy", "Liquidity",
|
|
180
182
|
"Order", "OrderRequest", "OrderStatus", "OrderType", "Position", "PositionSide",
|
|
181
183
|
"Precision", "Settlement", "SettlementState", "Side", "TimeInForce",
|
|
@@ -368,7 +368,12 @@ def _predict_fun(creds: Credentials) -> TradingExchange:
|
|
|
368
368
|
return PredictFunTrading(creds) # type: ignore[arg-type]
|
|
369
369
|
|
|
370
370
|
|
|
371
|
+
def _limitless(creds: Credentials) -> TradingExchange:
|
|
372
|
+
from .trading.limitless import LimitlessTrading
|
|
373
|
+
return LimitlessTrading(creds) # type: ignore[arg-type]
|
|
374
|
+
|
|
375
|
+
|
|
371
376
|
_TRADING = {
|
|
372
377
|
"kalshi": _kalshi, "polymarket": _polymarket, "polymarket_us": _polymarket_us, "opinion": _opinion,
|
|
373
|
-
"hyperliquid": _hyperliquid, "predict_fun": _predict_fun,
|
|
378
|
+
"hyperliquid": _hyperliquid, "predict_fun": _predict_fun, "limitless": _limitless,
|
|
374
379
|
}
|
|
@@ -63,6 +63,7 @@ ADAPTERS = {
|
|
|
63
63
|
"opinion": ("..trading.opinion", "OpinionTrading"),
|
|
64
64
|
"hyperliquid": ("..trading.hyperliquid", "HyperliquidTrading"),
|
|
65
65
|
"predict_fun": ("..trading.predict_fun", "PredictFunTrading"),
|
|
66
|
+
"limitless": ("..trading.limitless", "LimitlessTrading"),
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
|
|
@@ -94,6 +94,14 @@ def default_streams(adapters: Mapping[str, Any], credentials: Mapping[str, Any])
|
|
|
94
94
|
market=PredictFunMarketStream(api_key=creds.api_key),
|
|
95
95
|
private=PredictFunUserStream(api_key=creds.api_key, jwt=jwt) if jwt else None,
|
|
96
96
|
)
|
|
97
|
+
elif venue == "limitless":
|
|
98
|
+
from ..ws.limitless import LimitlessMarketStream, LimitlessUserStream
|
|
99
|
+
token_id, secret = getattr(creds, "token_id", None), getattr(creds, "secret", None)
|
|
100
|
+
catalog = getattr(adapter, "catalog", None)
|
|
101
|
+
out[venue] = VenueStreams(
|
|
102
|
+
market=LimitlessMarketStream(),
|
|
103
|
+
private=LimitlessUserStream(token_id=token_id, secret=secret, catalog=catalog) if token_id and secret else None,
|
|
104
|
+
)
|
|
97
105
|
else:
|
|
98
106
|
log.info("synpath.engine.feeds: no stream for %s; its orders reach the engine by polling", venue)
|
|
99
107
|
return out
|
|
@@ -15,7 +15,7 @@ The colon is safe as a separator: no venue's native id contains one.
|
|
|
15
15
|
"""
|
|
16
16
|
from __future__ import annotations
|
|
17
17
|
|
|
18
|
-
VENUES: tuple[str, ...] = ("kalshi", "polymarket", "polymarket_us", "opinion", "hyperliquid", "predict_fun")
|
|
18
|
+
VENUES: tuple[str, ...] = ("kalshi", "polymarket", "polymarket_us", "opinion", "hyperliquid", "predict_fun", "limitless")
|
|
19
19
|
"""Every venue this library speaks, by id. `synpath.exchanges` is the same
|
|
20
20
|
list with the adapter classes attached; this one exists so the id helpers do
|
|
21
21
|
not import the adapters."""
|