# IPriceImpact

*Contains the types for the GNSPriceImpact facet*

## PriceImpactStorage

```solidity
struct PriceImpactStorage {
  struct IPriceImpact.OiWindowsSettings oiWindowsSettings;
  mapping(uint48 => mapping(uint256 => mapping(uint256 => struct IPriceImpact.PairOi))) windows;
  mapping(uint256 => struct IPriceImpact.PairDepth) pairDepths;
  mapping(address => mapping(uint32 => struct IPriceImpact.TradePriceImpactInfo)) tradePriceImpactInfos;
  mapping(uint256 => struct IPriceImpact.PairFactors) pairFactors;
  uint40 negPnlCumulVolMultiplier;
  uint216 __placeholder;
  mapping(address => bool) protectionCloseFactorWhitelist;
  uint256[43] __gap;
}
```

## OiWindowsSettings

```solidity
struct OiWindowsSettings {
  uint48 startTs;
  uint48 windowsDuration;
  uint48 windowsCount;
}
```

## PairOi

```solidity
struct PairOi {
  uint128 oiLongUsd;
  uint128 oiShortUsd;
}
```

## OiWindowUpdate

```solidity
struct OiWindowUpdate {
  address trader;
  uint32 index;
  uint48 windowsDuration;
  uint256 pairIndex;
  uint256 windowId;
  bool long;
  bool open;
  bool isPnlPositive;
  uint128 openInterestUsd;
}
```

## PairDepth

```solidity
struct PairDepth {
  uint128 onePercentDepthAboveUsd;
  uint128 onePercentDepthBelowUsd;
}
```

## PairFactors

```solidity
struct PairFactors {
  uint40 protectionCloseFactor;
  uint32 protectionCloseFactorBlocks;
  uint40 cumulativeFactor;
  bool exemptOnOpen;
  bool exemptAfterProtectionCloseFactor;
  uint128 __placeholder;
}
```

## TradePriceImpactInfo

```solidity
struct TradePriceImpactInfo {
  uint128 lastWindowOiUsd;
  uint128 __placeholder;
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/ipriceimpact.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
