Documentation Index
Fetch the complete documentation index at: https://docs.duelduck.com/llms.txt
Use this file to discover all available pages before exploring further.
In this document, the term Duel refers to a Prediction as it’s used as the internal name on Duel Duck
Partner Admin (role = 1), Partner (role = 2).Result: duel created, participants voted, winners received their rewards. All admin prediction endpoints require:
Authorization: Bearer <ACCESS_TOKEN>,X-API-Key: <API_KEY>.
Step 1 — Sign in
Follow steps 1–2 from Flow “Project creation” using the appropriate account email.Step 2 — Create a duel
Create a prediction by providing:- question,
- asset,
- source of truth,
- entry price,
- commission,
- deadline,
- image.
id field needed for the resolve step.
status: 2 = Active. is_owner_resolving: false means the duel is resolved by the role that created it, not the owner.
Step 3 — Users join the duel
While the prediction is active and the deadline has not passed, users can join it. Users choose an outcome (for example, Yes or No) and submit a blockchain transaction to enter the prediction. This process has two parts:- Request a prepared transaction from the API.
- Sign and submit the transaction to the blockchain.
- Confirm the transaction using its hash.
3.1 Get the signed transaction
POST /duel/solana/join/sign-tx Authorization: Bearer <USER_ACCESS_TOKEN> X-API-Key: <API_KEY> Content-Type: application/jsonanswer: 1 = Yes, answer: 0 = No.
Response: { "tx": "<BASE64_TRANSACTION>" }
3.2 The user signs and submits the transaction to Solana, obtaining a tx_hash.
3.3 Confirm the join
POST /duel/solana/join Authorization: Bearer <USER_ACCESS_TOKEN> X-API-Key: <API_KEY> Content-Type: application/jsonStep 4 — Resolve the duel
After the deadline the duel automatically moves toWaitingForResolve state (status = 3). An authorized administrator submits the correct outcome.
PUT /admin/duel/resolve
Authorization: Bearer <ACCESS_TOKEN>
X-API-Key: <API_KEY>
Content-Type: application/json
answer is the correct outcome. Participants who voted for it receive their reward.
Response:
status: 4 = Resolved