> For the complete documentation index, see [llms.txt](https://docs.gravity.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gravity.xyz/legacy-alpha-mainnet-l2/pyth-price-feeds.md).

# Oracles (legacy L2)

> **Legacy.** This page documents third-party oracle integrations from the legacy **Gravity Alpha Mainnet (L2)**. **Gravity Mainnet (L1)** is integrating a range of oracle services; for now the protocol-level [**Native Oracle**](/research-and-development/native-oracle.md) — validator-attested external data with consensus-grade security — is supported by default.

## Overview

Blockchain oracles act as bridges between smart contracts and real-world data. They provide essential off-chain information such as price feeds, random numbers, and event outcomes that blockchains cannot access natively. Oracles vary in design, with some using push models (regular on-chain updates) and others using pull models (on-demand data requests). The quality of an oracle is measured by its speed, accuracy, cost-efficiency, and security against manipulation.

## Third-Party Oracles

### Pyth

The [Pyth Network](https://pyth.network/) is the largest first-party Oracle network, delivering real-time data across [a vast number of chains](https://docs.pyth.network/price-feeds/contract-addresses). Pyth introduces an innovative low-latency [pull oracle design](https://docs.pyth.network/documentation/pythnet-price-feeds/on-demand), where users can pull price updates on-chain when needed, enabling everyone in the blockchain environment to access that data point most efficiently. Pyth network updates the prices every 400ms, making Pyth the fastest on-chain oracle.

Users can also opt to use push model oracles through Pyth by running a [scheduler](https://docs.pyth.network/price-feeds/schedule-price-updates/using-scheduler).

Pyth Oracle Features:

* 400ms latency
* Most efficient and cost-effective Oracle
* [First-party](https://pyth.network/publishers) data sourced directly from financial institutions
* [Price feeds ranging from Crypto, Stock, FX, Metals](https://pyth.network/developers/price-feed-ids)
* [Available on all the largest chains](https://docs.pyth.network/price-feeds/contract-addresses)

Check out the following links to get started with Pyth.

* [Pyth EVM Integration Guide](https://docs.pyth.network/price-feeds/use-real-time-data/evm)
* [Pyth Docs](https://docs.pyth.network/home)
* [Pyth API Reference](https://api-reference.pyth.network/price-feeds/evm/getPrice)
* [Pyth Examples](https://github.com/pyth-network/pyth-examples)
* [Pyth Price Feed Ids](https://pyth.network/developers/price-feed-ids)
* [Website](https://pyth.network/)
* [Twitter](https://x.com/PythNetwork)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.gravity.xyz/legacy-alpha-mainnet-l2/pyth-price-feeds.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
