Build trading bots and integrate prediction markets into your applications in just 5 minutes.
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.
Create and trade on markets predicting asset performance
Place limit orders and trade on a real order book
RESTful API with incentives for automated traders
WebSocket streams for live prices and trades
All API requests require authentication. Generate a free API key to get started.
# 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:
{
"key": "evt_a1b2c3d4e5f6g7h8i9j0...",
"name": "My First Bot",
"tier": "standard",
"rate_limit_per_minute": 100
}
user-secret-key
The easiest way to interact with EVENT TRADER is through our Python SDK.
pip install event-trader
from event_trader import EventTraderClient
# Initialize with your API key
client = EventTraderClient(
base_url="http://localhost:8000",
api_key="evt_a1b2c3d4e5f6..." # Your API key
)
export EVENT_TRADER_API_KEY=evt_...
Browse available prediction markets and find opportunities to trade.
# 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 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}%")
You can place simple bets or use the order book for limit orders.
# 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}")
# 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}")
Register as a trading bot to earn rewards, climb tiers, and unlock fee discounts.
# 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
Base rates, 1x reward multiplier
5% fee discount, 1.25x rewards
10% fee discount, 1.5x rewards
20% fee discount, 2x rewards
Understanding how EVENT TRADER components work together.
Now that you're set up, explore these resources to build more advanced integrations:
20+ code examples in Python, JavaScript, and cURL
Full SDK documentation with all services
Complete REST API documentation
Interactive API explorer