pmxt 1.0.0__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 +58 -0
- pmxt/client.py +713 -0
- pmxt/models.py +296 -0
- pmxt/server_manager.py +242 -0
- pmxt-1.0.0.dist-info/METADATA +250 -0
- pmxt-1.0.0.dist-info/RECORD +56 -0
- pmxt-1.0.0.dist-info/WHEEL +5 -0
- pmxt-1.0.0.dist-info/top_level.txt +2 -0
- pmxt_internal/__init__.py +124 -0
- pmxt_internal/api/__init__.py +5 -0
- pmxt_internal/api/default_api.py +3722 -0
- pmxt_internal/api_client.py +804 -0
- pmxt_internal/api_response.py +21 -0
- pmxt_internal/configuration.py +578 -0
- pmxt_internal/exceptions.py +219 -0
- pmxt_internal/models/__init__.py +54 -0
- pmxt_internal/models/balance.py +93 -0
- pmxt_internal/models/base_request.py +91 -0
- pmxt_internal/models/base_response.py +93 -0
- pmxt_internal/models/cancel_order_request.py +94 -0
- pmxt_internal/models/create_order200_response.py +99 -0
- pmxt_internal/models/create_order_params.py +111 -0
- pmxt_internal/models/create_order_request.py +102 -0
- pmxt_internal/models/error_detail.py +87 -0
- pmxt_internal/models/error_response.py +93 -0
- pmxt_internal/models/exchange_credentials.py +93 -0
- pmxt_internal/models/fetch_balance200_response.py +103 -0
- pmxt_internal/models/fetch_markets200_response.py +103 -0
- pmxt_internal/models/fetch_markets_request.py +102 -0
- pmxt_internal/models/fetch_ohlcv200_response.py +103 -0
- pmxt_internal/models/fetch_ohlcv_request.py +102 -0
- pmxt_internal/models/fetch_ohlcv_request_args_inner.py +140 -0
- pmxt_internal/models/fetch_open_orders200_response.py +103 -0
- pmxt_internal/models/fetch_open_orders_request.py +94 -0
- pmxt_internal/models/fetch_order_book200_response.py +99 -0
- pmxt_internal/models/fetch_order_book_request.py +94 -0
- pmxt_internal/models/fetch_positions200_response.py +103 -0
- pmxt_internal/models/fetch_positions_request.py +94 -0
- pmxt_internal/models/fetch_trades200_response.py +103 -0
- pmxt_internal/models/fetch_trades_request.py +102 -0
- pmxt_internal/models/get_markets_by_slug_request.py +94 -0
- pmxt_internal/models/health_check200_response.py +89 -0
- pmxt_internal/models/history_filter_params.py +101 -0
- pmxt_internal/models/market_filter_params.py +113 -0
- pmxt_internal/models/market_outcome.py +95 -0
- pmxt_internal/models/order.py +139 -0
- pmxt_internal/models/order_book.py +106 -0
- pmxt_internal/models/order_level.py +89 -0
- pmxt_internal/models/position.py +101 -0
- pmxt_internal/models/price_candle.py +97 -0
- pmxt_internal/models/search_markets_request.py +102 -0
- pmxt_internal/models/search_markets_request_args_inner.py +140 -0
- pmxt_internal/models/trade.py +105 -0
- pmxt_internal/models/unified_market.py +120 -0
- pmxt_internal/py.typed +0 -0
- pmxt_internal/rest.py +263 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pmxt
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Unified prediction market data API - The ccxt for prediction markets
|
|
5
|
+
Author: PMXT Contributors
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/pmxt-dev/pmxt
|
|
8
|
+
Project-URL: Documentation, https://github.com/pmxt-dev/pmxt#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/pmxt-dev/pmxt
|
|
10
|
+
Project-URL: Issues, https://github.com/pmxt-dev/pmxt/issues
|
|
11
|
+
Keywords: prediction markets,polymarket,kalshi,trading,api
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Requires-Python: >=3.8
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
Requires-Dist: urllib3>=1.26.0
|
|
26
|
+
Requires-Dist: python-dateutil>=2.8.0
|
|
27
|
+
Requires-Dist: pydantic>=2.0.0
|
|
28
|
+
Requires-Dist: typing-extensions>=4.0.0
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
31
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
32
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
33
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
34
|
+
|
|
35
|
+
# PMXT Python SDK
|
|
36
|
+
|
|
37
|
+
A unified Python interface for interacting with multiple prediction market exchanges (Kalshi, Polymarket).
|
|
38
|
+
|
|
39
|
+
> **Note**: This SDK requires the PMXT sidecar server to be running. See [Installation](#installation) below.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install pmxt
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Prerequisites**: The Python SDK requires the PMXT server, which is distributed via npm:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install -g pmxtjs
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
That's it! The server will start automatically when you use the SDK.
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
import pmxt
|
|
59
|
+
|
|
60
|
+
# Initialize exchanges (server starts automatically!)
|
|
61
|
+
poly = pmxt.Polymarket()
|
|
62
|
+
kalshi = pmxt.Kalshi()
|
|
63
|
+
|
|
64
|
+
# Search for markets
|
|
65
|
+
markets = poly.search_markets("Trump")
|
|
66
|
+
print(markets[0].title)
|
|
67
|
+
|
|
68
|
+
# Get outcome details
|
|
69
|
+
outcome = markets[0].outcomes[0]
|
|
70
|
+
print(f"{outcome.label}: {outcome.price * 100:.1f}%")
|
|
71
|
+
|
|
72
|
+
# Fetch historical data (use outcome.id!)
|
|
73
|
+
candles = poly.fetch_ohlcv(
|
|
74
|
+
outcome.id,
|
|
75
|
+
pmxt.HistoryFilterParams(resolution="1d", limit=30)
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# Get current order book
|
|
79
|
+
order_book = poly.fetch_order_book(outcome.id)
|
|
80
|
+
spread = order_book.asks[0].price - order_book.bids[0].price
|
|
81
|
+
print(f"Spread: {spread * 100:.2f}%")
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### How It Works
|
|
85
|
+
|
|
86
|
+
The Python SDK automatically manages the PMXT sidecar server:
|
|
87
|
+
|
|
88
|
+
1. **First API call**: Checks if server is running
|
|
89
|
+
2. **Auto-start**: Starts server if needed (takes ~1-2 seconds)
|
|
90
|
+
3. **Reuse**: Multiple Python processes share the same server
|
|
91
|
+
4. **Zero config**: Just import and use!
|
|
92
|
+
|
|
93
|
+
### Manual Server Control (Optional)
|
|
94
|
+
|
|
95
|
+
If you prefer to manage the server yourself:
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
# Disable auto-start
|
|
99
|
+
poly = pmxt.Polymarket(auto_start_server=False)
|
|
100
|
+
|
|
101
|
+
# Or start the server manually in a separate terminal
|
|
102
|
+
# $ pmxt-server
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Authentication (for Trading)
|
|
106
|
+
|
|
107
|
+
### Polymarket
|
|
108
|
+
|
|
109
|
+
Requires your **Polygon Private Key**:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
import os
|
|
113
|
+
import pmxt
|
|
114
|
+
|
|
115
|
+
poly = pmxt.Polymarket(
|
|
116
|
+
private_key=os.getenv("POLYMARKET_PRIVATE_KEY")
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
# Check balance
|
|
120
|
+
balances = poly.fetch_balance()
|
|
121
|
+
print(f"Available: ${balances[0].available}")
|
|
122
|
+
|
|
123
|
+
# Place order
|
|
124
|
+
order = poly.create_order(pmxt.CreateOrderParams(
|
|
125
|
+
market_id="663583",
|
|
126
|
+
outcome_id="10991849...",
|
|
127
|
+
side="buy",
|
|
128
|
+
type="limit",
|
|
129
|
+
amount=10,
|
|
130
|
+
price=0.55
|
|
131
|
+
))
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Kalshi
|
|
135
|
+
|
|
136
|
+
Requires **API Key** and **Private Key**:
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
import os
|
|
140
|
+
import pmxt
|
|
141
|
+
|
|
142
|
+
kalshi = pmxt.Kalshi(
|
|
143
|
+
api_key=os.getenv("KALSHI_API_KEY"),
|
|
144
|
+
private_key=os.getenv("KALSHI_PRIVATE_KEY")
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
# Check positions
|
|
148
|
+
positions = kalshi.fetch_positions()
|
|
149
|
+
for pos in positions:
|
|
150
|
+
print(f"{pos.outcome_label}: ${pos.unrealized_pnl:.2f}")
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## API Reference
|
|
154
|
+
|
|
155
|
+
### Market Data Methods
|
|
156
|
+
|
|
157
|
+
- `fetch_markets(params?)` - Get active markets
|
|
158
|
+
- `search_markets(query, params?)` - Search markets by keyword
|
|
159
|
+
- `get_markets_by_slug(slug)` - Get market by URL slug/ticker
|
|
160
|
+
- `fetch_ohlcv(outcome_id, params)` - Get historical price candles
|
|
161
|
+
- `fetch_order_book(outcome_id)` - Get current order book
|
|
162
|
+
- `fetch_trades(outcome_id, params)` - Get trade history
|
|
163
|
+
|
|
164
|
+
### Trading Methods (require authentication)
|
|
165
|
+
|
|
166
|
+
- `create_order(params)` - Place a new order
|
|
167
|
+
- `cancel_order(order_id)` - Cancel an open order
|
|
168
|
+
- `fetch_order(order_id)` - Get order details
|
|
169
|
+
- `fetch_open_orders(market_id?)` - Get all open orders
|
|
170
|
+
|
|
171
|
+
### Account Methods (require authentication)
|
|
172
|
+
|
|
173
|
+
- `fetch_balance()` - Get account balance
|
|
174
|
+
- `fetch_positions()` - Get current positions
|
|
175
|
+
|
|
176
|
+
## Data Models
|
|
177
|
+
|
|
178
|
+
All methods return clean Python dataclasses:
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
@dataclass
|
|
182
|
+
class UnifiedMarket:
|
|
183
|
+
id: str
|
|
184
|
+
title: str
|
|
185
|
+
outcomes: List[MarketOutcome]
|
|
186
|
+
volume_24h: float
|
|
187
|
+
liquidity: float
|
|
188
|
+
url: str
|
|
189
|
+
# ... more fields
|
|
190
|
+
|
|
191
|
+
@dataclass
|
|
192
|
+
class MarketOutcome:
|
|
193
|
+
id: str # Use this for fetch_ohlcv/fetch_order_book
|
|
194
|
+
label: str # "Trump", "Yes", etc.
|
|
195
|
+
price: float # 0.0 to 1.0 (probability)
|
|
196
|
+
# ... more fields
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
See the [full API reference](../../API_REFERENCE.md) for complete documentation.
|
|
200
|
+
|
|
201
|
+
## Important Notes
|
|
202
|
+
|
|
203
|
+
### Use `outcome.id`, not `market.id`
|
|
204
|
+
|
|
205
|
+
For deep-dive methods like `fetch_ohlcv()`, `fetch_order_book()`, and `fetch_trades()`, you must use the **outcome ID**, not the market ID:
|
|
206
|
+
|
|
207
|
+
```python
|
|
208
|
+
markets = poly.search_markets("Trump")
|
|
209
|
+
outcome_id = markets[0].outcomes[0].id # ✅ Correct
|
|
210
|
+
|
|
211
|
+
candles = poly.fetch_ohlcv(outcome_id, ...) # ✅ Works
|
|
212
|
+
candles = poly.fetch_ohlcv(markets[0].id, ...) # ❌ Wrong!
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Prices are 0.0 to 1.0
|
|
216
|
+
|
|
217
|
+
All prices represent probabilities (0.0 to 1.0). Multiply by 100 for percentages:
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
outcome = markets[0].outcomes[0]
|
|
221
|
+
print(f"Price: {outcome.price * 100:.1f}%") # "Price: 55.3%"
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Timestamps are Unix milliseconds
|
|
225
|
+
|
|
226
|
+
```python
|
|
227
|
+
from datetime import datetime
|
|
228
|
+
|
|
229
|
+
candle = candles[0]
|
|
230
|
+
dt = datetime.fromtimestamp(candle.timestamp / 1000)
|
|
231
|
+
print(dt)
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Development
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Clone the repo
|
|
238
|
+
git clone https://github.com/qoery-com/pmxt.git
|
|
239
|
+
cd pmxt/sdks/python
|
|
240
|
+
|
|
241
|
+
# Install in development mode
|
|
242
|
+
pip install -e ".[dev]"
|
|
243
|
+
|
|
244
|
+
# Run tests
|
|
245
|
+
pytest
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## License
|
|
249
|
+
|
|
250
|
+
MIT
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
pmxt/__init__.py,sha256=2fXPrnojQs2iC8-f3CbFQrcOlfcpZw6Gmt23dhAVtBU,1150
|
|
2
|
+
pmxt/client.py,sha256=0UltGwG5_p96izSO7rhPnKM0rvIETW7jxrGc7vHsDRE,23163
|
|
3
|
+
pmxt/models.py,sha256=Mu0hLVjQU3PM5m68poK61VQcJtPQ8ZdLdLU7pq1lqjQ,6004
|
|
4
|
+
pmxt/server_manager.py,sha256=_RZ6bfTzmD4cnpsDcjgvoSEW_Ep6oCMHT6bGVpQNHdc,7812
|
|
5
|
+
pmxt_internal/__init__.py,sha256=Ej91FVyDp8KIBWJ3r3I8oekLcQfjU8sZ2Jj_BiH4utQ,5973
|
|
6
|
+
pmxt_internal/api_client.py,sha256=5jz0pLGtMs510i2nfDxGXdHu2bjpVXjiorcz5C2iLIo,27889
|
|
7
|
+
pmxt_internal/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
8
|
+
pmxt_internal/configuration.py,sha256=rRfzqNGjFtW4TJYkTvfrb-fl1km4jMJVG7pVx48DcXQ,18320
|
|
9
|
+
pmxt_internal/exceptions.py,sha256=txF8A7vlan57JS69kFPs-IZF-Qhp7IZobBTJVa4fOaM,6644
|
|
10
|
+
pmxt_internal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
pmxt_internal/rest.py,sha256=FMj4yaV6XLr842u_ScWHSzQsTFdk0jaUeuWLJoRbogQ,9760
|
|
12
|
+
pmxt_internal/api/__init__.py,sha256=ppJSCipQ5IAk2z6UZkFaGSsEmnoAnSSHb8sjb_DYUkY,101
|
|
13
|
+
pmxt_internal/api/default_api.py,sha256=V_-PxsEbTL4atCQR1r7GbeFvhtsVdbf3TSbTRM--Pv8,147482
|
|
14
|
+
pmxt_internal/models/__init__.py,sha256=KpXW3FEk-LTETIR0djQy7GX_NxGIElnIg_SzfHLmqAA,3196
|
|
15
|
+
pmxt_internal/models/balance.py,sha256=Dj5kFiLrsXOZyyXTC18bPjWrgw7qdWnTgTSCmk_l6xk,2962
|
|
16
|
+
pmxt_internal/models/base_request.py,sha256=ZNipF7ycXFkQJ6j3QmB1TzA0UO3fB54AMPlAgIA3KOA,2987
|
|
17
|
+
pmxt_internal/models/base_response.py,sha256=g-NG4Swxl3cg4-YOCPl65dUeHzOnA9S7ubTj8HOYZs0,2975
|
|
18
|
+
pmxt_internal/models/cancel_order_request.py,sha256=Q_tKEneDlyD9ZsqCifr4No9coPmzUWAiSnJFH2BhL5k,3153
|
|
19
|
+
pmxt_internal/models/create_order200_response.py,sha256=f4urlJUUhTCOON-alIg9Ac_q3ymHqHyP_BNtDB0pyh4,3345
|
|
20
|
+
pmxt_internal/models/create_order_params.py,sha256=byTxIMNeABia2D7j0UBPnr5qWPxq-kSI-wWJzOTRGvA,3638
|
|
21
|
+
pmxt_internal/models/create_order_request.py,sha256=prj6TnIFbhB8eDq-6e-MK2DtfDzAB6P-SoEEEST0cP8,3616
|
|
22
|
+
pmxt_internal/models/error_detail.py,sha256=590jlnQmIgqcjUQ5ef07_nWMn7fnyjuAvkUjmSoAkMs,2605
|
|
23
|
+
pmxt_internal/models/error_response.py,sha256=c5DgOpTGqx9Qoz7hYKhRPAM3UfoX4GBWkyhfxerMXEI,2979
|
|
24
|
+
pmxt_internal/models/exchange_credentials.py,sha256=BtZCkGnnGQ24KPolTRtoA_jtXp-5_1Y1FmQLe1L5WCo,3308
|
|
25
|
+
pmxt_internal/models/fetch_balance200_response.py,sha256=VN5yrsVSKnI_WprK1U4wbl60jGEiSnu4VAOGkSM5K4o,3539
|
|
26
|
+
pmxt_internal/models/fetch_markets200_response.py,sha256=olOMs8IBKPL2Foqw3r66jeGcRlJpOpGcGq0jNccUPuA,3564
|
|
27
|
+
pmxt_internal/models/fetch_markets_request.py,sha256=2kV2N3jVPy7qKMpVMt-QiTP_Ea0Unrkq2R-qBnB5xKk,3627
|
|
28
|
+
pmxt_internal/models/fetch_ohlcv200_response.py,sha256=npA7ztIBkBOIzxEX7M78eiQG03Ffb9Oko3DCw-SNLLo,3548
|
|
29
|
+
pmxt_internal/models/fetch_ohlcv_request.py,sha256=-pEeahFvLwUCYka6kSdEx81ulczmPIR5UDTMRnHC9jU,3686
|
|
30
|
+
pmxt_internal/models/fetch_ohlcv_request_args_inner.py,sha256=dmLOEq1cJWaIPYhik2k0urJ5-6mq5BW5uSiYTfcNQGY,5554
|
|
31
|
+
pmxt_internal/models/fetch_open_orders200_response.py,sha256=LuEsylHrv7T8YcywHZFimOxUTzlHS9USSJry_ak5D3k,3543
|
|
32
|
+
pmxt_internal/models/fetch_open_orders_request.py,sha256=RaE_WcwWR5EuumNQCgJYrqr2GRBYU33yjCnyJULextY,3172
|
|
33
|
+
pmxt_internal/models/fetch_order_book200_response.py,sha256=u9In7XRD0ImGC0gqVEYLGDFBRE5tkCrU3WH2lZtcJvA,3374
|
|
34
|
+
pmxt_internal/models/fetch_order_book_request.py,sha256=nDVf8SdXUwxwTd8-PUXvhJwObHNDzoGNt0Oq04XB5nU,3165
|
|
35
|
+
pmxt_internal/models/fetch_positions200_response.py,sha256=mzEq-rEYJaZHmjqjcaW9wwT0oIwakLFp3uWpPXJEc5k,3551
|
|
36
|
+
pmxt_internal/models/fetch_positions_request.py,sha256=F823DuKhltLMw04QrtSi1ZNVhkSISKz72evpWaEIaE8,3208
|
|
37
|
+
pmxt_internal/models/fetch_trades200_response.py,sha256=fdsEd4luXJpzk6MuM192PaZ62fOBA3He3VreZhCd4-w,3527
|
|
38
|
+
pmxt_internal/models/fetch_trades_request.py,sha256=GQZGh2dy-Y3n8DnR8x5b9bLH_nLmCmIJqjcTTNzcoSA,3690
|
|
39
|
+
pmxt_internal/models/get_markets_by_slug_request.py,sha256=PtjXAw6hixHuYzCvSGH1aka2rZrsHmT8ofXYSuuOh9k,3173
|
|
40
|
+
pmxt_internal/models/health_check200_response.py,sha256=yR_OkIlTPztO0zFmpyWllSwyaEbI48RpumfmVVCJAyc,2758
|
|
41
|
+
pmxt_internal/models/history_filter_params.py,sha256=0i9oQLwJsRWRyzPZuW467y_0ccKpc2_I6T2lgZCkHd4,3239
|
|
42
|
+
pmxt_internal/models/market_filter_params.py,sha256=Jun3HbQP05HEXlht1bYCrqrlgbO0QjP6vCOKCHkZn-E,3638
|
|
43
|
+
pmxt_internal/models/market_outcome.py,sha256=STS17FU7VmS7bgOfUejJqfqNs_An3NJVqPQByBKkdgI,3200
|
|
44
|
+
pmxt_internal/models/order.py,sha256=WniZ6JgnnhPBPyZje1wzgmsz4OjyOCIl5a-ksQFmUNM,4768
|
|
45
|
+
pmxt_internal/models/order_book.py,sha256=FZQ5g81szBtpCun3vFFTDZb_xZkwUMVyEIF1ZZPzqhI,3615
|
|
46
|
+
pmxt_internal/models/order_level.py,sha256=dMeuXlhBqe1kA-R1ysFjt77qJxx6ukrZHwO1y3hZ6EM,2735
|
|
47
|
+
pmxt_internal/models/position.py,sha256=a2v8JudGks66xtSU_BILwnEhxqfTu1o01g-ShWHpkeA,3740
|
|
48
|
+
pmxt_internal/models/price_candle.py,sha256=AebmNrnVl_JI0Vqy_IRoRh08qX9ZUdzzazKmnVTuyio,3151
|
|
49
|
+
pmxt_internal/models/search_markets_request.py,sha256=BARoy2GXgV7RQNIGck6UaOyQqf0NIJkyGGbFf2cfZKc,3714
|
|
50
|
+
pmxt_internal/models/search_markets_request_args_inner.py,sha256=PkusFd_OxhUsItsBpluPJA11zg0sXXjbOK-lPmemvLs,5561
|
|
51
|
+
pmxt_internal/models/trade.py,sha256=U6Fc18rbwILs9FmX8CSDYYL8dF6763l8QzeMQNRxQdo,3328
|
|
52
|
+
pmxt_internal/models/unified_market.py,sha256=mNyUrGKWxvI2f2KCa2uhGwq22cBdDia2hD5AtzFw8fE,4487
|
|
53
|
+
pmxt-1.0.0.dist-info/METADATA,sha256=M0jpHTPYIOK3Ey0aGpjZyWTfytC_2tjPAZKgGalIyfA,6300
|
|
54
|
+
pmxt-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
55
|
+
pmxt-1.0.0.dist-info/top_level.txt,sha256=J_jrcouJ-x-5lpcXMxeW0GOSi1HsBVR5_PdSfvigVrw,19
|
|
56
|
+
pmxt-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
PMXT Sidecar API
|
|
7
|
+
|
|
8
|
+
A unified local sidecar API for prediction markets (Polymarket, Kalshi). This API acts as a JSON-RPC-style gateway. Each endpoint corresponds to a specific method on the generic exchange implementation.
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: 0.4.4
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
|
+
|
|
13
|
+
Do not edit the class manually.
|
|
14
|
+
""" # noqa: E501
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
__version__ = "1.0.0"
|
|
18
|
+
|
|
19
|
+
# Define package exports
|
|
20
|
+
__all__ = [
|
|
21
|
+
"DefaultApi",
|
|
22
|
+
"ApiResponse",
|
|
23
|
+
"ApiClient",
|
|
24
|
+
"Configuration",
|
|
25
|
+
"OpenApiException",
|
|
26
|
+
"ApiTypeError",
|
|
27
|
+
"ApiValueError",
|
|
28
|
+
"ApiKeyError",
|
|
29
|
+
"ApiAttributeError",
|
|
30
|
+
"ApiException",
|
|
31
|
+
"Balance",
|
|
32
|
+
"BaseRequest",
|
|
33
|
+
"BaseResponse",
|
|
34
|
+
"CancelOrderRequest",
|
|
35
|
+
"CreateOrder200Response",
|
|
36
|
+
"CreateOrderParams",
|
|
37
|
+
"CreateOrderRequest",
|
|
38
|
+
"ErrorDetail",
|
|
39
|
+
"ErrorResponse",
|
|
40
|
+
"ExchangeCredentials",
|
|
41
|
+
"FetchBalance200Response",
|
|
42
|
+
"FetchMarkets200Response",
|
|
43
|
+
"FetchMarketsRequest",
|
|
44
|
+
"FetchOHLCV200Response",
|
|
45
|
+
"FetchOHLCVRequest",
|
|
46
|
+
"FetchOHLCVRequestArgsInner",
|
|
47
|
+
"FetchOpenOrders200Response",
|
|
48
|
+
"FetchOpenOrdersRequest",
|
|
49
|
+
"FetchOrderBook200Response",
|
|
50
|
+
"FetchOrderBookRequest",
|
|
51
|
+
"FetchPositions200Response",
|
|
52
|
+
"FetchPositionsRequest",
|
|
53
|
+
"FetchTrades200Response",
|
|
54
|
+
"FetchTradesRequest",
|
|
55
|
+
"GetMarketsBySlugRequest",
|
|
56
|
+
"HealthCheck200Response",
|
|
57
|
+
"HistoryFilterParams",
|
|
58
|
+
"MarketFilterParams",
|
|
59
|
+
"MarketOutcome",
|
|
60
|
+
"Order",
|
|
61
|
+
"OrderBook",
|
|
62
|
+
"OrderLevel",
|
|
63
|
+
"Position",
|
|
64
|
+
"PriceCandle",
|
|
65
|
+
"SearchMarketsRequest",
|
|
66
|
+
"SearchMarketsRequestArgsInner",
|
|
67
|
+
"Trade",
|
|
68
|
+
"UnifiedMarket",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
# import apis into sdk package
|
|
72
|
+
from pmxt_internal.api.default_api import DefaultApi as DefaultApi
|
|
73
|
+
|
|
74
|
+
# import ApiClient
|
|
75
|
+
from pmxt_internal.api_response import ApiResponse as ApiResponse
|
|
76
|
+
from pmxt_internal.api_client import ApiClient as ApiClient
|
|
77
|
+
from pmxt_internal.configuration import Configuration as Configuration
|
|
78
|
+
from pmxt_internal.exceptions import OpenApiException as OpenApiException
|
|
79
|
+
from pmxt_internal.exceptions import ApiTypeError as ApiTypeError
|
|
80
|
+
from pmxt_internal.exceptions import ApiValueError as ApiValueError
|
|
81
|
+
from pmxt_internal.exceptions import ApiKeyError as ApiKeyError
|
|
82
|
+
from pmxt_internal.exceptions import ApiAttributeError as ApiAttributeError
|
|
83
|
+
from pmxt_internal.exceptions import ApiException as ApiException
|
|
84
|
+
|
|
85
|
+
# import models into sdk package
|
|
86
|
+
from pmxt_internal.models.balance import Balance as Balance
|
|
87
|
+
from pmxt_internal.models.base_request import BaseRequest as BaseRequest
|
|
88
|
+
from pmxt_internal.models.base_response import BaseResponse as BaseResponse
|
|
89
|
+
from pmxt_internal.models.cancel_order_request import CancelOrderRequest as CancelOrderRequest
|
|
90
|
+
from pmxt_internal.models.create_order200_response import CreateOrder200Response as CreateOrder200Response
|
|
91
|
+
from pmxt_internal.models.create_order_params import CreateOrderParams as CreateOrderParams
|
|
92
|
+
from pmxt_internal.models.create_order_request import CreateOrderRequest as CreateOrderRequest
|
|
93
|
+
from pmxt_internal.models.error_detail import ErrorDetail as ErrorDetail
|
|
94
|
+
from pmxt_internal.models.error_response import ErrorResponse as ErrorResponse
|
|
95
|
+
from pmxt_internal.models.exchange_credentials import ExchangeCredentials as ExchangeCredentials
|
|
96
|
+
from pmxt_internal.models.fetch_balance200_response import FetchBalance200Response as FetchBalance200Response
|
|
97
|
+
from pmxt_internal.models.fetch_markets200_response import FetchMarkets200Response as FetchMarkets200Response
|
|
98
|
+
from pmxt_internal.models.fetch_markets_request import FetchMarketsRequest as FetchMarketsRequest
|
|
99
|
+
from pmxt_internal.models.fetch_ohlcv200_response import FetchOHLCV200Response as FetchOHLCV200Response
|
|
100
|
+
from pmxt_internal.models.fetch_ohlcv_request import FetchOHLCVRequest as FetchOHLCVRequest
|
|
101
|
+
from pmxt_internal.models.fetch_ohlcv_request_args_inner import FetchOHLCVRequestArgsInner as FetchOHLCVRequestArgsInner
|
|
102
|
+
from pmxt_internal.models.fetch_open_orders200_response import FetchOpenOrders200Response as FetchOpenOrders200Response
|
|
103
|
+
from pmxt_internal.models.fetch_open_orders_request import FetchOpenOrdersRequest as FetchOpenOrdersRequest
|
|
104
|
+
from pmxt_internal.models.fetch_order_book200_response import FetchOrderBook200Response as FetchOrderBook200Response
|
|
105
|
+
from pmxt_internal.models.fetch_order_book_request import FetchOrderBookRequest as FetchOrderBookRequest
|
|
106
|
+
from pmxt_internal.models.fetch_positions200_response import FetchPositions200Response as FetchPositions200Response
|
|
107
|
+
from pmxt_internal.models.fetch_positions_request import FetchPositionsRequest as FetchPositionsRequest
|
|
108
|
+
from pmxt_internal.models.fetch_trades200_response import FetchTrades200Response as FetchTrades200Response
|
|
109
|
+
from pmxt_internal.models.fetch_trades_request import FetchTradesRequest as FetchTradesRequest
|
|
110
|
+
from pmxt_internal.models.get_markets_by_slug_request import GetMarketsBySlugRequest as GetMarketsBySlugRequest
|
|
111
|
+
from pmxt_internal.models.health_check200_response import HealthCheck200Response as HealthCheck200Response
|
|
112
|
+
from pmxt_internal.models.history_filter_params import HistoryFilterParams as HistoryFilterParams
|
|
113
|
+
from pmxt_internal.models.market_filter_params import MarketFilterParams as MarketFilterParams
|
|
114
|
+
from pmxt_internal.models.market_outcome import MarketOutcome as MarketOutcome
|
|
115
|
+
from pmxt_internal.models.order import Order as Order
|
|
116
|
+
from pmxt_internal.models.order_book import OrderBook as OrderBook
|
|
117
|
+
from pmxt_internal.models.order_level import OrderLevel as OrderLevel
|
|
118
|
+
from pmxt_internal.models.position import Position as Position
|
|
119
|
+
from pmxt_internal.models.price_candle import PriceCandle as PriceCandle
|
|
120
|
+
from pmxt_internal.models.search_markets_request import SearchMarketsRequest as SearchMarketsRequest
|
|
121
|
+
from pmxt_internal.models.search_markets_request_args_inner import SearchMarketsRequestArgsInner as SearchMarketsRequestArgsInner
|
|
122
|
+
from pmxt_internal.models.trade import Trade as Trade
|
|
123
|
+
from pmxt_internal.models.unified_market import UnifiedMarket as UnifiedMarket
|
|
124
|
+
|