{
  "sources": [
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/market.py",
      "quote": "        price = tick_to_price(tick)\n        quantity = quantize_down(\n            self._config.competitor.quote_notional / price,\n            self._config.share_quantum,\n        )"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/config.py",
      "quote": "    competitor_quote_notional_min: float = 24.0\n    competitor_quote_notional_max: float = 72.0"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/types.py",
      "quote": "    competitor_best_bid_ticks: int | None\n    competitor_best_ask_ticks: int | None\n    buy_filled_quantity: float\n    sell_filled_quantity: float\n    own_orders: tuple[OwnOrderView, ...]"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/engine.py",
      "quote": "                market.refresh_competitor(step)\n                state = market.build_step_state(\n                    step=step,\n                    steps_remaining=self._config.process.n_steps - step,\n                    buy_filled_quantity=pending_buy_filled_quantity,\n                    sell_filled_quantity=pending_sell_filled_quantity,\n                )\n                actions = strategy.on_step(state)"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/docs/orderbook_prediction_market_challenge.md",
      "quote": "- each price level uses the same notional size\n- untouched resting competitor liquidity never recenters\n- partially filled competitor orders stay in place until fully filled\n- when a competitor order is fully filled, a replacement order appears at the\n  start of the next step on the opposite side offset by `spread_ticks`"
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/orderbook_pm_challenge/runner.py",
      "quote": "    base = base_config or ChallengeConfig()\n    var = variance or ParameterVariance()"
    },
    {
      "url": "https://api.imd.fun/artifacts/db22aff7167a4798251ed3d20432509f30e511e4958799aba5b17b41bb39b4b6",
      "quote": "\"code\""
    },
    {
      "url": "https://raw.githubusercontent.com/danrobinson/prediction-market-challenge/b244530ee2a6247b5f930830eeca9dd950da0e7e/docs/orderbook_prediction_market_challenge.md",
      "quote": "- highest bid matches first\n- lowest ask matches first\n- same-price orders are FIFO\n- resting orders remain until filled or cancelled"
    }
  ]
}
