> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squadassist.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get expected transfer value for a player

> GET /expected_transfer_value — returns the expected market transfer fee for a player, with optional buying-club and contract date context.

The `GET /expected_transfer_value` endpoint returns the current expected market transfer fee for a player. The valuation is calculated using SquadAssist's transfer fee prediction model, which accounts for the player's current club, the prospective buying club (if provided), and contract situation (and more). Both the requested currency and EUR values are always returned so you can display or compare values without additional conversion.

## Request

<ParamField query="player_id" type="string" required>
  The SquadAssist player ID. Use `POST /query_player` to look up the ID from a Transfermarkt or Wyscout ID.
</ParamField>

<ParamField query="target_club_id" type="string">
  The SquadAssist ID of the club that may be buying the player. When provided, the model uses buying-club context to adjust the predicted fee. Use `POST /query_club` to look up the club ID.
</ParamField>

<ParamField query="currency" type="string">
  An [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code (e.g. `EUR`, `GBP`, `USD`). When provided, this overrides your account's preferred currency. Defaults to `EUR`.
</ParamField>

<ParamField query="contract_end_date" type="string">
  The end date of the player's current contract in `YYYY-MM-DD` format. Providing this date allows the model to factor contract length into the valuation — players in the final year of their contract are typically valued lower.
</ParamField>

## Response

<ResponseField name="currency" type="string">
  The ISO 4217 currency code of the returned `expected_transfer_value`. Matches the `currency` query parameter you sent, or `EUR` if none was provided.
</ResponseField>

<ResponseField name="expected_transfer_value" type="integer">
  The expected market transfer fee in the requested currency. Always returned as a whole number.
</ResponseField>

<ResponseField name="expected_transfer_value_in_eur" type="integer">
  The expected market transfer fee in EUR, regardless of the `currency` parameter. Use this field when you need a stable base-currency value for comparisons.
</ResponseField>

## Example

<CodeGroup>
  ```bash PowerShell theme={null}
  $headers = @{
      "x-api-key"    = "YOUR_API_KEY"
      "Content-Type" = "application/json"
  }

  curl "https://api.squadassist.ai/v1/expected_transfer_value?player_id=P01K0WPQJPWZCNCYH1KXHTJ9R31&target_club_id=C01JJBSWKE71ZEN2E52257YQGP5&currency=EUR" -H $headers
  ```

  ```python Python theme={null}
  import requests

      url = "https://api.squadassist.ai/v1/expected_transfer_value"

      headers = {
          "x-api-key": API_KEY,
          "Content-Type": "application/json"
      }

      # Define the parameters as a dictionary
      params = {
          "player_id": "P01K0WPQJPWZCNCYH1KXHTJ9R31",
          "target_club_id": "C01JJBSWKE71ZEN2E52257YQGP5",
          "currency": "EUR"
      }

      # Make the request
      response = requests.get(url, headers=headers, params=params)

      if response.status_code == 200:
          etv_data = response.json()
          print(etv_data)
      else:
          print(f"Error {response.status_code}: {response.text}")
  ```

  ```text R theme={null}
  library(httr2)

  # Define the request
  req <- request("https://api.squadassist.ai/v1/expected_transfer_value") |>
    req_headers(
      "x-api-key" = "YOUR_API_KEY",
      "Content-Type" = "application/json"
    ) |>
    # Add all query parameters here
    req_url_query(
      player_id = "P01K0WPQJPWZCNCYH1KXHTJ9R31",
      target_club_id = "C01JJBSWKE71ZEN2E52257YQGP5",
      currency = "EUR"
    )

  # Execute and parse
  resp <- req_perform(req)
  etv_data <- resp_body_json(resp)

  print(etv_data)
  ```
</CodeGroup>

<CodeGroup>
  ```json Response theme={null}
  {
    "currency": "EUR",
    "expected_transfer_value": 16868385,
    "expected_transfer_value_in_eur": 16868385
  }
  ```
</CodeGroup>

## Errors

| Status | Body                                                                       | Cause                                             |
| ------ | -------------------------------------------------------------------------- | ------------------------------------------------- |
| `400`  | `{"error": "player_id is required"}`                                       | The `player_id` query parameter was not provided  |
| `400`  | `{"error": "Invalid contract_end_date, must be in the format YYYY-MM-DD"}` | The `contract_end_date` value could not be parsed |
| `400`  | `{"error": "<message>"}`                                                   | The `currency` code is not a valid ISO 4217 code  |
| `400`  | `{"error": "Invalid player_id"}`                                           | The `player_id` format is not valid               |
| `400`  | `{"error": "Invalid target_club_id"}`                                      | The `target_club_id` format is not valid          |
| `403`  | `{"error": "Player is not in the allowed leagues"}`                        | The player is not in your current coverage        |
