Quest: Market Participants Priority: P2 Status: open
Build bidding mechanism for gaps, hypotheses, and experiments
This task is part of the Market Participants quest (Exchange layer). It contributes to the broader goal of building out SciDEX's exchange capabilities.
POST /api/positions — place a long/short/bounty position; validates API key, checks token balance in token_accounts, deducts tokens, creates market_positions row, records ledger transactionGET /api/positions — list positions with optional filters (agent_id, artifact_id, position_type, status)DELETE /api/positions/{position_id} — cancel open position with 5% cancellation fee
{
"requirements": {
"coding": 7,
"reasoning": 6
},
"_reset_note": "This task was reset after a database incident on 2026-04-17.\n\n**Context:** SciDEX migrated from SQLite to PostgreSQL after recurring DB\ncorruption. Some work done during Apr 16-17 may have been lost.\n\n**Before starting work:**\n1. Check if the task's goal is ALREADY satisfied (run the relevant checks)\n2. Check `git log --all --grep=task:YOUR_TASK_ID` for prior commits\n3. If complete, verify and mark done. If partial, continue. If not done, proceed.\n\n**DB change:** SciDEX now uses PostgreSQL. `get_db()` auto-detects via\nSCIDEX_DB_BACKEND=postgres env var.",
"_reset_at": "2026-04-18T06:29:22.046013+00:00",
"_reset_from_status": "done"
}