[ Getting Started ]

Build trading bots and integrate prediction markets into your applications in just 5 minutes.

? What is EVENT TRADER?

EVENT TRADER is a prediction market platform where you can bet on which cryptocurrency or stock will perform best over a given time period. It provides a complete REST API for building trading bots, a Python SDK, and real-time WebSocket feeds.

📊 Prediction Markets

Create and trade on markets predicting asset performance

📚 Order Book Trading

Place limit orders and trade on a real order book

🤖 Bot-Friendly API

RESTful API with incentives for automated traders

🔌 Real-Time Data

WebSocket streams for live prices and trades

1 Get Your API Key

All API requests require authentication. Generate a free API key to get started.

cURL
# Generate a free API key
curl -X POST "http://localhost:8000/api/v1/api_keys/generate" \
     -H "Content-Type: application/json" \
     -d '{"name": "My First Bot", "tier": "standard"}'

You'll receive a response like:

JSON
{
  "key": "evt_a1b2c3d4e5f6g7h8i9j0...",
  "name": "My First Bot",
  "tier": "standard",
  "rate_limit_per_minute": 100
}
Important: Save your API key immediately! It won't be shown again.
Tip: For testing, you can use the default key: user-secret-key

2 Install the Python SDK

The easiest way to interact with EVENT TRADER is through our Python SDK.

Bash
pip install event-trader

Initialize the Client

Python
from event_trader import EventTraderClient

# Initialize with your API key
client = EventTraderClient(
    base_url="http://localhost:8000",
    api_key="evt_a1b2c3d4e5f6..."  # Your API key
)
Pro Tip: Store your API key in an environment variable: export EVENT_TRADER_API_KEY=evt_...

3 Explore Markets

Browse available prediction markets and find opportunities to trade.

Python
# List all active markets
markets = await client.markets.list(status="active")

for market in markets:
    print(f"📈 {market.name}")
    print(f"   Contract: {market.contract_address}")
    print(f"   Assets: {', '.join(market.assets)}")
    print(f"   Ends: {market.end_time}")
    print()

Get Market Details

Python
# Get a specific market
market = await client.markets.get("0x1234...")

print(f"Market: {market.name}")
print(f"Assets: {market.assets}")
print(f"Total Pool: ${market.total_pool:,.2f}")

# Get current results/standings
results = await client.markets.results("0x1234...")
for asset in results.standings:
    print(f"  {asset.symbol}: {asset.price_change_pct:+.2f}%")

4 Place Your First Trade

You can place simple bets or use the order book for limit orders.

Simple Bet

Python
# Bet $100 on Bitcoin winning
bet = await client.trading.place_bet(
    contract_address="0x1234...",
    user_id="my_user_id",
    asset="BTC",
    amount=100.0
)

print(f"✅ Bet placed!")
print(f"   Bet ID: {bet.id}")
print(f"   Amount: ${bet.amount}")

Limit Order

Python
# Place a buy limit order at 60% probability
order = await client.trading.place_order(
    contract_address="0x1234...",
    user_id="my_user_id",
    asset="BTC",
    side="buy",
    price=0.60,     # 60% implied probability
    quantity=500.0  # Number of contracts
)

print(f"✅ Order placed: {order.id}")
Congrats! You've placed your first trade on EVENT TRADER!

5 Register Your Bot (Optional)

Register as a trading bot to earn rewards, climb tiers, and unlock fee discounts.

Python
# Register your bot
bot = await client.incentives.register_bot(
    name="My Trading Bot",
    wallet_address="0x742d35Cc6634C0532925a3b844Bc9e7595f3E6",
    strategy_type="market_maker",
    description="My first automated trading bot"
)

print(f"🤖 Bot registered!")
print(f"   Bot ID: {bot.id}")
print(f"   Tier: {bot.tier}")  # Starts at Bronze

Tier Benefits

🥉 Bronze (Starting Tier)

Base rates, 1x reward multiplier

🥈 Silver ($10K+ Volume)

5% fee discount, 1.25x rewards

🥇 Gold ($50K+ Volume)

10% fee discount, 1.5x rewards

💎 Diamond ($250K+ Volume)

20% fee discount, 2x rewards

6 Architecture Overview

Understanding how EVENT TRADER components work together.

Your Bot / App
REST API / WebSocket
Order Matching Engine


Price Feeds
Market Resolution
Payouts

API Endpoints

🚀 What's Next?

Now that you're set up, explore these resources to build more advanced integrations:

Quick Start Checklist