Skip to main content

Welcome to Polyhush

The Polyhush SDK is a Python client that provides a simple, intuitive interface for trading on prediction markets through the Polyhush API.

Quickstart

Get up and running with Polyhush in under 5 minutes

SDK Reference

Explore the complete Python SDK documentation

API Reference

REST API endpoints with interactive “Try It” feature

Examples

Learn from real-world trading examples

Features

Place buy and sell orders with a clean, Pythonic API. Support for limit orders, market orders, and more.
# Limit order
client.buy(token_id="...", shares=10, price=0.55)

# Market order
client.buy(token_id="...", usdc_amount=50, order_type="FAK")
Monitor your positions with detailed P&L information, including unrealized gains and current market values.
positions = client.get_positions(detailed=True)
for pos in positions:
    print(f"{pos['market_question']}: ${pos['unrealized_pnl']:.2f}")
When markets resolve, your winnings are automatically credited to your balance. No manual action required - just trade and collect.
Keep your order status in sync with Polymarket. Perfect for bots and long-running applications.
# Sync all pending orders
result = client.sync_orders()
print(f"Synced {result['synced']} orders")

Installation

Install the Polyhush SDK using pip:
pip install polyhush

Quick Example

from polyhush import PolyhushClient

# Initialize the client
client = PolyhushClient(api_key="your-api-key")

# Check your balance
balance = client.get_balance()
print(f"Available: ${balance['available_balance']:.2f}")

# Place a limit buy order
result = client.buy(
    token_id="your-token-id",
    shares=10,
    price=0.55
)
print(f"Order placed: {result['orderID']}")

Documentation Structure

Get Started

Introduction, quickstart guide, and authentication setup

Core Concepts

Order types, syncing, and error handling

Examples

Trading basics, position management, bots, and strategies

Support

Need help? We’re here for you.

GitHub Issues

Report bugs or request features

Email Support

Contact our support team