# DuelDuck API (Prediction Market API)

DuelDuck provides a REST-style API and a TypeScript SDK for embedding **on-chain prediction markets (duels)** into your Web3 product. You keep full control of the user experience and branding, while DuelDuck handles smart contracts, escrow, settlement, and automated reward distribution on Solana.

## Quick links

- Dashboard (sign in / create API key): https://app.duelduck.com/
- Full documentation: https://docs.duelduck.com/overview
- Quickstart: https://docs.duelduck.com/quickstart
- OpenAPI spec (public): https://docs.duelduck.com/api-reference/openapi.json

## What you can build

- White-label prediction markets inside your dApp, game, or community product
- Fixed-price predictions (simple ticket price formats)
- Flexible stake predictions (user-selected stake within a range)
- Commission-based monetization (you set up to 10% operator commission)
- Markets in SOL, USDC, USDT, or **any SPL token**

## Core concepts

- **Duel**: a binary market (Yes/No, Team A/Team B, etc.)
- **Reward pool**: total entry fees minus platform + operator fees, distributed to winners
- **Commission**: operator fee (up to 10%) paid to your wallet on resolution
- **Resolution**: you (the operator) resolves outcomes manually via dashboard/API (oracle-free by design)

## Integration overview (high-level)

1. Create an account and generate your API key in the dashboard.
2. Read the Quickstart to connect and authenticate.
3. Create and manage duels through the API; build the UI in your frontend.
4. Resolve duels to trigger automatic on-chain distribution to winners and commissions.

For endpoint details and schemas, use the OpenAPI spec linked above.

