# estimateOraclePriceCount

> This module provides utilities for estimating the number of oracle prices required for various GMX protocol operations. These functions help calculate gas costs and oracle price requirements for deposits, withdrawals, orders, shifts, and GLV operations.

# estimateOraclePriceCount

This module provides utilities for estimating the number of oracle prices required for various GMX protocol operations. These functions help calculate gas costs and oracle price requirements for deposits, withdrawals, orders, shifts, and GLV operations.

## Methods

Each function returns a `bigint` representing the number of oracle price signatures required for that operation type. Import any function directly from `@gmx-io/sdk/utils/fees`.

### estimateDepositOraclePriceCount

```typescript
estimateDepositOraclePriceCount(swapsCount: number | bigint): bigint
```

Estimates the number of oracle prices required for a deposit operation. Returns `3n + swapsCount`.

```typescript

const priceCount = estimateDepositOraclePriceCount(2);
console.log(priceCount); // 5n
```

### estimateWithdrawalOraclePriceCount

```typescript
estimateWithdrawalOraclePriceCount(swapsCount: bigint): bigint
```

Estimates the number of oracle prices required for a withdrawal operation. Returns `3n + swapsCount`.

```typescript

const priceCount = estimateWithdrawalOraclePriceCount(1n);
console.log(priceCount); // 4n
```

### estimateOrderOraclePriceCount

```typescript
estimateOrderOraclePriceCount(swapsCount: number): bigint
```

Estimates the number of oracle prices required for an order operation. Returns `3n + swapsCount`.

```typescript

const priceCount = estimateOrderOraclePriceCount(0);
console.log(priceCount); // 3n
```

### estimateShiftOraclePriceCount

```typescript
estimateShiftOraclePriceCount(): bigint
```

Estimates the number of oracle prices required for a shift operation. Always returns `4n`.

```typescript

const priceCount = estimateShiftOraclePriceCount();
console.log(priceCount); // 4n
```

### estimateGlvDepositOraclePriceCount

```typescript
estimateGlvDepositOraclePriceCount(marketCount: bigint, swapsCount?: bigint): bigint
```

Estimates the number of oracle prices required for a GLV deposit operation. Returns `2n + marketCount + swapsCount`. `swapsCount` defaults to `0n`.

```typescript

const priceCount = estimateGlvDepositOraclePriceCount(3n, 1n);
console.log(priceCount); // 6n
```

### estimateGlvWithdrawalOraclePriceCount

```typescript
estimateGlvWithdrawalOraclePriceCount(marketCount: bigint, swapsCount?: bigint): bigint
```

Estimates the number of oracle prices required for a GLV withdrawal operation. Returns `2n + marketCount + swapsCount`. `swapsCount` defaults to `0n`.

```typescript

const priceCount = estimateGlvWithdrawalOraclePriceCount(2n);
console.log(priceCount); // 4n
```
