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

# Get Key Price

> Retrieve the current Mann Co. Supply Crate Key price based on marketplace sales

## Overview

Returns the current Mann Co. Supply Crate Key price derived from the weighted average of all key sales on the marketplace over the past 30 days.

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Your site API key
</ParamField>

## Rate Limit

**1 request per minute**

## Response

<ResponseField name="key_price" type="integer">
  Current key price in cents
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.liquid.tf/api/dev/get_key_price" \
    -H "X-API-Key: YOUR_SITE_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.liquid.tf/api/dev/get_key_price', {
    headers: {
      'X-API-Key': 'YOUR_SITE_API_KEY'
    }
  });

  const data = await response.json();
  console.log(`Key price: $${data.key_price / 100}`);
  ```

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

  response = requests.get(
      'https://api.liquid.tf/api/dev/get_key_price',
      headers={'X-API-Key': 'YOUR_SITE_API_KEY'}
  )

  data = response.json()
  print(f"Key price: ${data['key_price'] / 100:.2f}")
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "key_price": 165
  }
  ```
</ResponseExample>

## How the Price Is Calculated

The key price is a weighted average of all Mann Co. Supply Crate Key (`5021;6`) sales on the marketplace over the past 30 days:

```
key_price = sum(price × quantity) / sum(quantity)
```

## Use Cases

* Convert TF2 metal or key-based prices to USD for display in your application
* Determine a reference price when creating key listings or buy orders
* Calibrate automated pricing relative to the current key value
