{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/predixsport-com/json-schema/predixsport-com-nbafantasy-transfers-response-schema.json",
  "title": "NBAFantasyTransfersResponse",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/predixsport-com-openapi.json#/components/schemas/NBAFantasyTransfersResponse",
  "properties": {
    "sport": {
      "type": "string",
      "enum": [
        "nba"
      ],
      "const": "nba",
      "title": "Sport",
      "default": "nba"
    },
    "mode": {
      "type": "string",
      "enum": [
        "transfers"
      ],
      "const": "transfers",
      "title": "Mode",
      "default": "transfers"
    },
    "snapshot_id": {
      "type": "integer",
      "title": "Snapshot Id"
    },
    "season": {
      "type": "string",
      "title": "Season"
    },
    "preset": {
      "type": "string",
      "title": "Preset"
    },
    "policy_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Policy Version"
    },
    "champion": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Champion"
    },
    "value_basis": {
      "type": "string",
      "enum": [
        "fielded_five"
      ],
      "const": "fielded_five",
      "title": "Value Basis",
      "description": "What every total on this plan measures: the five the game would field each Gameday, never a sum of the ten.",
      "default": "fielded_five"
    },
    "search": {
      "type": "string",
      "enum": [
        "exact",
        "certified",
        "truncated"
      ],
      "title": "Search",
      "description": "'exact' means every legal squad your bank can reach was compared, one program per number of moves, maximising the fielded value itself, and it is what a transfer plan always answers. 'certified' means the search stopped inside its optimality tolerance and `search_gap` says how close to the best plan there is it was proved to be. 'truncated' means the search ran out of time and the plan is the best found so far, not the best there is.",
      "default": "exact"
    },
    "search_gap": {
      "type": "number",
      "minimum": 0.0,
      "title": "Search Gap",
      "description": "How close to the best plan there is this one was PROVED to be, as a fraction. Zero on an exact search, which is every transfer plan.",
      "default": 0.0
    },
    "search_gap_tolerance": {
      "type": "number",
      "minimum": 0.0,
      "title": "Search Gap Tolerance",
      "description": "The optimality gap the search was allowed to stop at. Zero means it was not allowed to stop before it had the best there is.",
      "default": 0.0
    },
    "window_days": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Window Days",
      "description": "Gamedays of the window the plan was decided over.",
      "default": 0
    },
    "value_wording": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Value Wording"
    },
    "court_source": {
      "type": "string",
      "enum": [
        "official_market"
      ],
      "const": "official_market",
      "title": "Court Source",
      "default": "official_market"
    },
    "board_digest": {
      "type": "string",
      "title": "Board Digest"
    },
    "roster_revision": {
      "type": "integer",
      "title": "Roster Revision"
    },
    "market": {
      "$ref": "#/$defs/NBAFantasyMarketReference"
    },
    "window": {
      "$ref": "#/$defs/NBAFantasyGameweekWindow"
    },
    "free_transfers": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Free Transfers"
    },
    "extra_transfer_point_cost": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Extra Transfer Point Cost"
    },
    "transfer_rules_source": {
      "type": "string",
      "title": "Transfer Rules Source"
    },
    "sale_value_basis": {
      "type": "string",
      "enum": [
        "current_price",
        "owner_override"
      ],
      "title": "Sale Value Basis"
    },
    "sale_overrides": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Sale Overrides"
    },
    "max_incoming": {
      "type": "integer",
      "maximum": 10.0,
      "minimum": 0.0,
      "title": "Max Incoming"
    },
    "bank_before": {
      "type": "number",
      "title": "Bank Before"
    },
    "squad_value": {
      "type": "number",
      "title": "Squad Value"
    },
    "purchasing_power": {
      "type": "number",
      "title": "Purchasing Power"
    },
    "keep": {
      "$ref": "#/$defs/NBAFantasyTransferOption"
    },
    "options": {
      "items": {
        "$ref": "#/$defs/NBAFantasyTransferOption"
      },
      "type": "array",
      "title": "Options"
    },
    "alternatives": {
      "items": {
        "$ref": "#/$defs/NBAFantasyTransferOption"
      },
      "type": "array",
      "title": "Alternatives"
    },
    "recommended_moves": {
      "type": "integer",
      "maximum": 10.0,
      "minimum": 0.0,
      "title": "Recommended Moves"
    },
    "recommended": {
      "$ref": "#/$defs/NBAFantasyTransferOption"
    },
    "no_change": {
      "type": "boolean",
      "title": "No Change"
    },
    "counts": {
      "additionalProperties": {
        "type": "integer"
      },
      "type": "object",
      "title": "Counts"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "snapshot_id",
    "season",
    "preset",
    "board_digest",
    "roster_revision",
    "market",
    "window",
    "free_transfers",
    "extra_transfer_point_cost",
    "transfer_rules_source",
    "sale_value_basis",
    "max_incoming",
    "bank_before",
    "squad_value",
    "purchasing_power",
    "keep",
    "recommended_moves",
    "recommended",
    "no_change"
  ],
  "$defs": {
    "NBAFantasyGameweekWindow": {
      "properties": {
        "source": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "official",
                "iso_week_approximation"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Source",
          "description": "'official' is the game's own Gameweek calendar. 'iso_week_approximation' is the ISO week of the slate day and is NOT an official Gameweek: say so wherever the window is shown."
        },
        "gameweek": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gameweek"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label"
        },
        "start": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Start"
        },
        "end": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "End"
        },
        "today": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Today"
        },
        "days_counted": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Days Counted",
          "description": "The days inside the window our published calendar can see."
        },
        "players_with_games": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Players With Games",
          "description": "Priced players with at least one game left in the window. Zero means there is nothing left to plan for in this Gameweek, which is a state and not a failure.",
          "default": 0
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "NBAFantasyGameweekWindow",
      "description": "The Gameweek a transfer plan was made for, and how we know it."
    },
    "NBAFantasyMarketReference": {
      "properties": {
        "snapshot_id": {
          "type": "integer",
          "title": "Snapshot Id"
        },
        "revision": {
          "type": "integer",
          "title": "Revision"
        },
        "period_kind": {
          "type": "string",
          "enum": [
            "gameday",
            "calendar_day"
          ],
          "title": "Period Kind"
        },
        "period_key": {
          "type": "string",
          "title": "Period Key"
        },
        "source_observed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Observed At"
        },
        "collected_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Collected At"
        },
        "deadline_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deadline At",
          "description": "The official Gameday deadline this market was frozen before."
        },
        "player_count": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Player Count"
        },
        "priced_players": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Priced Players",
          "description": "How many priced players we could place against our own player identity. The rest are on the market and not in this plan."
        },
        "duplicate_identities": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Duplicate Identities",
          "default": 0
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "snapshot_id",
        "revision",
        "period_kind",
        "period_key",
        "player_count",
        "priced_players"
      ],
      "title": "NBAFantasyMarketReference",
      "description": "Which frozen snapshot of the official market a plan was priced from."
    },
    "NBAFantasySquadRow": {
      "properties": {
        "player_name": {
          "type": "string",
          "title": "Player Name"
        },
        "court": {
          "type": "string",
          "enum": [
            "BC",
            "FC"
          ],
          "title": "Court"
        },
        "team_code": {
          "type": "string",
          "title": "Team Code"
        },
        "price": {
          "type": "number",
          "title": "Price"
        },
        "expected_points": {
          "type": "number",
          "title": "Expected Points"
        },
        "games_left": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Games Left"
        },
        "status": {
          "type": "string",
          "enum": [
            "rule_valued",
            "no_form_record",
            "no_games_left",
            "not_transactable"
          ],
          "title": "Status"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "player_name",
        "court",
        "team_code",
        "price",
        "expected_points",
        "games_left",
        "status"
      ],
      "title": "NBAFantasySquadRow"
    },
    "NBAFantasyTransferMove": {
      "properties": {
        "player_name": {
          "type": "string",
          "title": "Player Name"
        },
        "team_code": {
          "type": "string",
          "title": "Team Code"
        },
        "court": {
          "type": "string",
          "enum": [
            "BC",
            "FC"
          ],
          "title": "Court"
        },
        "price": {
          "type": "number",
          "title": "Price",
          "description": "Frozen market price in millions."
        },
        "sale_value": {
          "type": "number",
          "title": "Sale Value",
          "description": "What selling him returns: his current price, or the price the owner entered for him."
        },
        "expected_points": {
          "type": "number",
          "title": "Expected Points",
          "description": "Expected Gameweek points on the Predixsport weekly rule, which is built from season performance, recent form and the calendar. Zero when the rule cannot value the player."
        },
        "games_left": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Games Left"
        },
        "status": {
          "type": "string",
          "enum": [
            "rule_valued",
            "no_form_record",
            "no_games_left",
            "not_transactable"
          ],
          "title": "Status"
        },
        "reason": {
          "type": "string",
          "title": "Reason"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "player_name",
        "team_code",
        "court",
        "price",
        "sale_value",
        "expected_points",
        "games_left",
        "status",
        "reason"
      ],
      "title": "NBAFantasyTransferMove"
    },
    "NBAFantasyTransferOption": {
      "properties": {
        "moves": {
          "type": "integer",
          "maximum": 10.0,
          "minimum": 0.0,
          "title": "Moves"
        },
        "paid_transfers": {
          "type": "integer",
          "maximum": 10.0,
          "minimum": 0.0,
          "title": "Paid Transfers"
        },
        "transfer_point_cost": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Transfer Point Cost",
          "description": "Official points this plan costs beyond the free transfers of the Gameweek. The allowance and the price of an extra move are on the official rules page, not in the market payload."
        },
        "expected_points": {
          "type": "number",
          "title": "Expected Points",
          "description": "What this squad is expected to score: the best legal five it fields each Gameday of the window, summed over the window. It is the number every other line on this plan is decided on."
        },
        "fielded_points": {
          "type": "number",
          "title": "Fielded Points",
          "description": "The same number, named for what it measures."
        },
        "proxy_points": {
          "type": "number",
          "title": "Proxy Points",
          "description": "The old linear ranking, which counts every game of all ten players. It is kept beside the fielded total for provenance and decides nothing."
        },
        "net_expected_points": {
          "type": "number",
          "title": "Net Expected Points",
          "description": "Fielded points after the paid-transfer cost."
        },
        "gain_vs_keep": {
          "type": "number",
          "title": "Gain Vs Keep",
          "description": "Net expected points against keeping the squad."
        },
        "squad_value": {
          "type": "number",
          "title": "Squad Value"
        },
        "bank_after": {
          "type": "number",
          "title": "Bank After"
        },
        "incoming": {
          "items": {
            "$ref": "#/$defs/NBAFantasyTransferMove"
          },
          "type": "array",
          "title": "Incoming"
        },
        "outgoing": {
          "items": {
            "$ref": "#/$defs/NBAFantasyTransferMove"
          },
          "type": "array",
          "title": "Outgoing"
        },
        "squad": {
          "items": {
            "$ref": "#/$defs/NBAFantasySquadRow"
          },
          "type": "array",
          "title": "Squad"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "moves",
        "paid_transfers",
        "transfer_point_cost",
        "expected_points",
        "fielded_points",
        "proxy_points",
        "net_expected_points",
        "gain_vs_keep",
        "squad_value",
        "bank_after",
        "incoming",
        "outgoing",
        "squad"
      ],
      "title": "NBAFantasyTransferOption"
    }
  }
}