# IPriceAggregator

*Contains the types for the GNSPriceAggregator facet*

## PriceAggregatorStorage

```solidity
struct PriceAggregatorStorage {
  contract IChainlinkFeed linkUsdPriceFeed;
  uint24 twapInterval;
  uint8 minAnswers;
  bytes32[2] jobIds;
  address[] oracles;
  mapping(uint8 => struct IPriceAggregator.LiquidityPoolInfo) collateralGnsLiquidityPools;
  mapping(uint8 => contract IChainlinkFeed) collateralUsdPriceFeed;
  mapping(bytes32 => struct IPriceAggregator.Order) orders;
  mapping(address => mapping(uint32 => struct IPriceAggregator.OrderAnswer[])) orderAnswers;
  contract LinkTokenInterface linkErc677;
  uint96 __placeholder;
  uint256 requestCount;
  mapping(bytes32 => address) pendingRequests;
  uint256[39] __gap;
}
```

## LiquidityPoolInfo

```solidity
struct LiquidityPoolInfo {
  contract ILiquidityPool pool;
  bool isGnsToken0InLp;
  enum IPriceAggregator.PoolType poolType;
  uint80 __placeholder;
}
```

## Order

```solidity
struct Order {
  address user;
  uint32 index;
  enum ITradingStorage.PendingOrderType orderType;
  uint16 pairIndex;
  bool isLookback;
  uint32 __placeholder;
}
```

## OrderAnswer

```solidity
struct OrderAnswer {
  uint64 open;
  uint64 high;
  uint64 low;
  uint64 ts;
}
```

## LiquidityPoolInput

```solidity
struct LiquidityPoolInput {
  contract ILiquidityPool pool;
  enum IPriceAggregator.PoolType poolType;
}
```

## PoolType

```solidity
enum PoolType {
  UNISWAP_V3,
  ALGEBRA_v1_9
}
```


---

# 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/ipriceaggregator.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.
