PredictEngine Developers
Quick Start

Get started in 5 minutes

Generate an API key, make your first call, and start trading — all in a few lines of code.

1

Create an account & generate an API key

Sign up at predictengine.ai and navigate to Dashboard → API Keys to create your first key.

You'll receive two credentials:

pe_live_...Your API key (safe to expose in client code)
pe_secret_...Your secret — shown only once, store securely
Manage API Keys
2

Make your first API call

Pass your credentials via the X-API-Key and X-API-Secret headers:

curl https://predictengine.ai/api/v1/markets \
  -H "X-API-Key: pe_live_abc123..." \
  -H "X-API-Secret: pe_secret_xyz789..."
3

Execute a trade

To trade, your API key needs the trade permission. Send a POST request with the market details:

# Buy shares in a market
curl -X POST https://predictengine.ai/api/v1/trade \
  -H "X-API-Key: pe_live_abc123..." \
  -H "X-API-Secret: pe_secret_xyz789..." \
  -H "Content-Type: application/json" \
  -d '{
    "token_id": "0x1234...",
    "side": "buy",
    "outcome": "Yes",
    "amount": 10.00,
    "min_price": 0.40,
    "max_price": 0.60
  }'

Permissions

Each key has scoped permissions: read, trade, bots. Only enable what you need.

Rate Limits

Default: 60 requests/min. 429 responses include a Retry-After header. Upgrade for higher limits.

Credits

API calls consume credits based on the endpoint. Read endpoints cost less, trade endpoints cost more. Check usage in your dashboard.