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

# XRP Ledger (XRPL)

> dApps built on XRPL can leverage DIA oracles to access up-to-date asset price information.

[DIA](https://diadata.org/) is a cross-chain oracle provider that sources granular market data from diverse exchanges, including CEXs and DEXs. Its data sourcing is thorough, enabling unparalleled transparency and customizability for resilient price feeds for 20,000+ assets. Its versatile data processing and delivery ensures adaptability and reliability for any decentralized application.

## Oracle Details

| Chain   | Address                                                                      |
| ------- | ---------------------------------------------------------------------------- |
| Mainnet | **Provider:** diadata (hex. 64696164617461) <br />**Oracle Document ID:** 42 |
| Testnet | **Provider:** diadata (hex: 64696164617461) <br />**Oracle Document ID:** 1  |

## Oracle Configuration

|                                   |                                                                                                                            |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Pricing Methodology               | [VWAPIR](/docs/guides/methodologies/pricing-methodologies/vwapir-volume-weighted-average-price-with-interquartile-range-filter) |
| Deviation (%) & Refresh Frequency | 1% and 120 seconds                                                                                                         |
| Heartbeat                         | 24h                                                                                                                        |

## Gas Wallets

The gas wallets used to push updates to the oracle are the following:

| Chain   | Address                                                                                                    |
| ------- | ---------------------------------------------------------------------------------------------------------- |
| Mainnet | [rP24Lp7bcUHvEW7T7c8xkxtQKKd9fZyra7](https://livenet.xrpl.org/accounts/rP24Lp7bcUHvEW7T7c8xkxtQKKd9fZyra7) |
| Testnet | [r3U1mL5u2SCPr4mApqYyF96nvwvKoGf7aH](https://testnet.xrpl.org/accounts/r3U1mL5u2SCPr4mApqYyF96nvwvKoGf7aH) |

## Available Asset Feeds

| Asset Ticker | Asset Ticker (Hex)                       | Asset Markets                                                                                                 |
| ------------ | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| BTC          | 4254430000000000000000000000000000000000 | [BTC markets](https://www.diadata.org/app/price/asset/Bitcoin/0x0000000000000000000000000000000000000000/)    |
| ETH          | 4554480000000000000000000000000000000000 | [ETH markets](https://www.diadata.org/app/price/asset/Ethereum/0x0000000000000000000000000000000000000000/)   |
| XRP          | 5852500000000000000000000000000000000000 | [XRP markets](https://www.diadata.org/app/price/asset/XRPL/0x0000000000000000000000000000000000000000/)       |
| RLUSD        | 524C555344000000000000000000000000000000 | [RLUSD markets](https://www.diadata.org/app/price/asset/XRPL/rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De/)             |
| USDC         | 5553444300000000000000000000000000000000 | [USDC markets](https://www.diadata.org/app/price/asset/Ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/)  |
| USDT         | 5553445400000000000000000000000000000000 | [USDT markets](https://www.diadata.org/app/price/asset/Ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7/)  |
| EUROP        | 4555524F50000000000000000000000000000000 | [EUROP markets](https://www.diadata.org/app/price/asset/Ethereum/0x888883b5F5D21fb10Dfeb70e8f9722B9FB0E5E51/) |

## How to Access Data

The DIA oracle object can be retrieved with the [ledger\_entry API](https://xrpl.org/resources/dev-tools/websocket-api-tool#ledger_entry-oracle) call by specifying the account and oracle\_document\_id.

This is the Request JSON for mainnet:

```json theme={"system"}
{
  "id": "example_get_oracle",
  "command": "ledger_entry",
  "oracle": {
    "account": "rP24Lp7bcUHvEW7T7c8xkxtQKKd9fZyra7",
    "oracle_document_id": 42
  },
  "ledger_index": "validated"
}
```

It will return the current price of all the assets in hexadecimal format, which can then be converted to decimal and scaled to obtain the actual price with 8 decimal places.

## Request a Custom Oracle

DIA offers highly customizable oracles that are individually tailored to each dApp's needs. Each oracle can be customized in the following ways, including:

* Data Sources & Asset Feeds
* Pricing Methodologies
* Update Triggers (Frequency, Deviation, Heartbeat, ...etc)

Get a tailored oracle for your dApp, request one below:

<CardGroup>
  <Card title="Request Custom Oracle" href="/docs/guides/how-to-guides/request-a-custom-oracle" icon="angle-right" iconType="solid" horizontal />
</CardGroup>

## Support

For developer assistance, connect with the DIA team directly on [Discord](https://discord.gg/ZvGjVY5uvs) or [Telegram](https://t.me/diadata_org).
