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

# Get Asset Valuation

> Retrieve historical valuation data for a specific asset.

Retrieve historical valuation data for a specific asset. Lookup can be performed by either `assetKey` or `itemId` (one is required). The `range` parameter defines the lookback period in days (30/90/180). Defaults to 90.

## Query parameters

<ParamField query="assetKey" type="string">
  Asset key of the asset to query. Either `assetKey` or `itemId` is required.
</ParamField>

<ParamField query="itemId" type="integer">
  Item ID of the asset to query. Either `assetKey` or `itemId` is required.
</ParamField>

<ParamField query="range" type="integer">
  Lookback period in days. Accepted values: `30`, `90`, `180`. Defaults to `90`.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="avgPrice" type="number">
      Average trade price over the requested period
    </ResponseField>

    <ResponseField name="tradeCount" type="string">
      Total number of trades over the requested period
    </ResponseField>

    <ResponseField name="date" type="string">
      Aggregation reference date
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://openapi.msu.io/v1rc1/market/valuation/asset?itemId=0&range=90' \
    --header 'Content-Type: application/json' \
    --header 'x-nxopen-api-key: YOUR_API_KEY'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://openapi.msu.io/v1rc1/market/valuation/asset?itemId=0&range=90', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
      'x-nxopen-api-key': 'YOUR_API_KEY'
    }
  });
  const data = await response.json();
  ```

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

  url = "https://openapi.msu.io/v1rc1/market/valuation/asset"
  params = {
    "itemId": 0,
    "range": 90
  }
  headers = {
    "x-nxopen-api-key": "YOUR_API_KEY"
  }

  response = requests.get(url, params=params, headers=headers)
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "avgPrice": 0,
      "tradeCount": "string",
      "date": "string"
    }
  }
  ```
</ResponseExample>
