Polymarket Trade Executor
Trade execution library for Polymarket CLOB API.
Installation
pip install polymarket-trade-executor
For merge/split/redeem (gasless transactions):
pip install polymarket-trade-executor[relayer]
Quick Start
import asyncio
from polymarket_trade_executor import TradeExecutor, OrderSide
async def main():
executor = TradeExecutor(
host="https://clob.polymarket.com",
private_key="0x...",
funder="0x...", # optional
# For merge/split/redeem (optional)
builder_api_key="xxx",
builder_secret="xxx",
builder_passphrase="xxx",
)
# Get balance
balance = await executor.get_balance()
print(f"Balance: ${balance:.2f}")
# Place market order
result = await executor.place_market_order(
asset_id="token_id_here",
side=OrderSide.BUY,
amount=10.0,
)
if result:
print(f"Order: {result.order_id} - {result.size_matched} tokens @ ${result.price}")
asyncio.run(main())
Features
| Feature | Requires Builder API |
|---|---|
place_order / place_market_order |
❌ |
post_orders (batch) |
❌ |
get_balance / get_token_balance |
❌ |
buy_market / sell_all (with retry) |
❌ |
split_positions |
✅ |
merge_positions / merge_all |
✅ |
redeem_positions |
✅ |
Simulation Mode
from polymarket_trade_executor import SimulateTradeExecutor
executor = SimulateTradeExecutor(starting_balance=1000.0)
# Same API as TradeExecutor, no real API calls
License
MIT
Metadata
Release files for polymarket-trade-executor 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| polymarket_trade_executor-0.1.3.tar.gz | 17.2 kB | Without provenance | Details for polymarket_trade_executor-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| polymarket_trade_executor-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for polymarket_trade_executor-0.1.3-py3-none-any.whl |
Total release size: 32.1 kB
Release files / polymarket_trade_executor-0.1.3.tar.gz
| Download URL | polymarket_trade_executor-0.1.3.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f670661e522efffd7bf1766f34c75bba5ecd093d1d668b5d95274800310ffbef
|
|
BLAKE2b-256 checksum How to use checksums |
1135f10b48849cf8738041bb73be0e7fd26cbe59c1f0017de7f3d5fe84384cac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|
Release files / polymarket_trade_executor-0.1.3-py3-none-any.whl
| Download URL | polymarket_trade_executor-0.1.3-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f83268468b7440149e002c3a4392c15947185be90cfe4b6c0a94f059fd676d1c
|
|
BLAKE2b-256 checksum How to use checksums |
55e2dd1b3bb760223837d9d17701535cec1b22b7a7498977a7db7d2cd2e569db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.6
|
Security for polymarket-trade-executor 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.