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

# VWAPIR: Volume Weighted Average Price with Interquartile Range Filter

> This page contains information about the VWAPIR pricing methodology.

The VWAPIR (Volume Weighted Average Price with Interquartile Range Clearing) filter is the application of the [Volume Weighted Average Price](/docs/guides/methodologies/pricing-methodologies/vwap-volume-weighted-average-price) filter to data that was previously cleared by the [Interquartile Range](/docs/guides/methodologies/pricing-methodologies/ir-interquartile-range-filter) filtering system.

With $F$ the set of trades that remain after the Interquartile Range filter (the middle two quartiles), the VWAP formula is applied to that filtered set:

$VWAPIR = \frac{\sum_{i \in F} p_i \cdot v_i}{\sum_{i \in F} v_i}$

## Filter Application

The VWAPIR filter is used in DIA's price determination. Our API can display the latest MEDIR-120 filter values, i.e., the filter results from a 120 second interval of all recorded trades for an asset.

## Implementation

The filter is implemented as part of the FiltersBlockService in [this file in our Github repository](https://github.com/diadata-org/diadata/blob/master/internal/pkg/filtersBlockService/FilterVWAPIR.go).
