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

# Oracle Management

## **updateMidprice**

Update your pools midprice. Midprice can be updated when pools are in the `RejectSwaps` mode.

```typescript theme={null}
pool.updateMidprice(authority, { midpriceQ32: newMidQ32 });
```

| **Param**            | **Type** | **Description**                       |
| :------------------- | :------- | :------------------------------------ |
| `params.midpriceQ32` | `bigint` | New midprice in Q32 format            |
| `params.sequence?`   | `bigint` | Optional sequence number for ordering |

<Tip>
  Q32 (more precisely Q32.32) is a fixed-point number format where the value is stored as an integer scaled by 2^32.

  In short: **stored = realValue \* 2^32**

  The SDK offers a **.toQ32()** helpers to convert numbers to fixed point numbers
</Tip>

## **updateMidpriceAndBaseSpread**

Atomic update of both mid price and base spread values in a single instruction.

```typescript theme={null}
pool.updateMidpriceAndBaseSpread(authority, { 
midpriceQ32: newMidQ32, 
spreadFactorQ32: newSpreadQ32, 
});
```

## **updateDeltaStaleness**

Delta staleness is a kill-switch. It allows the operator to set the threshold after which, if no oracle update exists, the pool stops quoting the asset.

```typescript theme={null}
pool.updateDeltaStaleness(authority, { deltaStaleness: 150 }); //measured in slots, up to 255
```
