Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blog post on how to fetch asset price using DIA oracles #2996

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

amarantha-k
Copy link
Collaborator

No description provided.

@amarantha-k amarantha-k requested a review from oeggert February 12, 2025 19:07
Copy link
Collaborator

@oeggert oeggert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused on what directions this blog is outline. It seems like it's supposed to explain how to access oracle prices on XRPL, but then the steps don't make sense, given how oracles work in the XRPL.

editPage:
hide: true
---
# How to Fetch Asset Price Information Using DIA Oracles
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember Rome mentioning inconsistent header and seo titles could be an issue.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a technical issue but it is confusing—can be a bad user experience if they click one title and end up at a page with a different title.


dApps building on XRP Ledger can utilize DIA oracles to obtain up-to-date asset price information. These deployed oracles are suitable for use in production environments. They come with a list of supported assets and settings. However, if dApps require a custom oracle with a different set of assets and configurations, they should [contact DIA on Telegram](https://t.me/diabdteam).

## Deployed Contracts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the correct term? As far as I know oracles are just a ledger entry.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be renamed as "Oracle Document IDs"


1. Access the oracle registry on XRPL.

2. Call the retrieve function with the argument being the full pair name such as BTC/USD.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the method for pulling a price oracle on XRPL? This step sounds like there's some sort of messaging happening with the oracle network itself, rather than looking up the price of an asset on the oracle object in the XRPL.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also a "Oracle Document ID" involved. For testnet, 1 is the current ID, for mainnet it is 42. We can change that if needed, but 1 on mainnet is already full (there is a limit of assets), so we moved to 42.

@amarantha-k
Copy link
Collaborator Author

Waiting for clarification on the open questions, will update once a response is available.

|:-----------|:----------|:-------------|:-----------|
| ETH | Ethereum | 0x0000000000000000000000000000000000000000 | [ETH Asset Information](https://www.diadata.org/app/price/asset/Ethereum/0x0000000000000000000000000000000000000000/) |
| BTC | Bitcoin | 0x0000000000000000000000000000000000000000 | [BTC Asset Information](https://www.diadata.org/app/price/asset/Bitcoin/0x0000000000000000000000000000000000000000/) |
| XRP | XRP Ledger | 0x0000000000000000000000000000000000000000 | [XRP Asset Information](https://www.diadata.org/app/price/asset/XRPL/0x0000000000000000000000000000000000000000/) |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are more assets added now, namely RLUSD, USDC and USDT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants