Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/XRPL-Labs/XRPL-Persist-Price-Oracle
Persist XRP-USD price(s) on the XRPL ('oracle')
https://github.com/XRPL-Labs/XRPL-Persist-Price-Oracle
Last synced: 2 months ago
JSON representation
Persist XRP-USD price(s) on the XRPL ('oracle')
- Host: GitHub
- URL: https://github.com/XRPL-Labs/XRPL-Persist-Price-Oracle
- Owner: XRPL-Labs
- Created: 2021-01-28T16:16:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-04T20:27:36.000Z (10 months ago)
- Last Synced: 2024-04-14T01:02:17.642Z (6 months ago)
- Language: JavaScript
- Size: 56.6 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-xrpl - XRPL-Persist-Price-Oracle - Open source code that persists price information on-ledger, providing a price feed. (DEX Dev Tools / XRPL Token Ratings)
README
# Persist XRP-USD rate on the XRPL
Persists the data fetched with [XRP-Price-Aggregator](https://github.com/XRPL-Labs/XRP-Price-Aggregator) on the XRP
Ledger. This data is persisted by xrpl-labs.com on [`rXUMMaPpZqPutoRszR29jtC8amWq3APkx`](https://xahauexplorer.com/explorer/rXUMMaPpZqPutoRszR29jtC8amWq3APkx).Background info: https://dev.to/wietse/aggregated-xrp-usd-price-info-on-the-xrp-ledger-1087
Fetch the XRP-USD rate live from the XRPL with this command (XXRPL ahau WebSocket Node connection required, eg. using wss://xrplcluster.com)
```json
{
"command": "account_lines",
"account": "rXUMMaPpZqPutoRszR29jtC8amWq3APkx"
}
```Want to get the last transaction updating the price data (eg. to compare ledger index / timestamp, or to view the raw data (in the transaction Memos)) simply get the last transaction:
```json
{
"command": "account_tx",
"account": "rXUMMaPpZqPutoRszR29jtC8amWq3APkx",
"limit": 1
}
```The account (`rXUMMaPpZqPutoRszR29jtC8amWq3APkx`) history will show you the source data (using CSV in Memo's)