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

# Pyth Network (pyth)

> Oracle network providing price feeds from institutional sources. Uses a pull-based model for on-chain price updates.

Oracle network providing price feeds from institutional sources. Uses a pull-based model for on-chain price updates.

| Fact | Value |
| - | - |
| Category | Oracles |
| Family | none |
| Namespace | `Pyth` on ethereum |
| Chains | ethereum |

## What it offers

* **getPrice**: Read price from Pyth oracle by price feed ID

## Notes

* Pull-based oracle: users must call updatePriceFeeds before reading prices
* Sub-second latency from institutional market data providers
* Actual price = price \* 10^expo (e.g. price=12345, expo=-2 means \$123.45)
* Price feed IDs are bytes32 - see Pyth docs for specific feed IDs per asset
* updatePriceFeeds requires sending ETH to pay the update fee (use getUpdateFee to check)
* Get price update data from Pyth Hermes API off-chain, then submit on-chain

## Its names in a program

On Ethereum, `Pyth` is a namespace: its contracts need no import.

```ts theme={null}
function main() {
  // Ethereum's oracle, `0x4305FB66699C3B2702D4d05CF36551390A4c69C6`.
  require(Pyth.Oracle != 0);
}
```

## Deployments

| Chain | Contract | Address | In a program |
| - | - | - | - |
| [Ethereum](https://docs.eco.com/sauce-sdk/reference/chains/ethereum.md) | oracle | `0x4305FB66699C3B2702D4d05CF36551390A4c69C6` | `Pyth.Oracle` |

## ABI

### `PythOracleABI`

`import PythOracleABI from "./protocols/pyth/PythOracleABI.json";` Speaks for: oracle.

* `updatePriceFeeds(bytes[] updateData) payable`
* `getPrice(bytes32 id) view returns ((int64 price, uint64 conf, int32 expo, uint256 publishTime) price)`
* `getUpdateFee(bytes[] updateData) view returns (uint256 feeAmount)`

## Next steps

* [Protocols](https://docs.eco.com/sauce-sdk/reference/protocols.md): the other protocols, by what they do.
* [Protocols and tokens](https://docs.eco.com/sauce/names.md): calling a contract by its namespace, or through its ABI.
* [Glossary](https://docs.eco.com/sauce/glossary.md): the words these pages use, in plain terms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.