https://github.com/0xpuddi/qd-oracleserver
QuarryDraw's on-chain price feed Oracle infrastructure. Oracle Server.
https://github.com/0xpuddi/qd-oracleserver
javascript oracle server
Last synced: 8 months ago
JSON representation
QuarryDraw's on-chain price feed Oracle infrastructure. Oracle Server.
- Host: GitHub
- URL: https://github.com/0xpuddi/qd-oracleserver
- Owner: 0xPuddi
- License: mit
- Created: 2023-03-12T15:36:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-08T14:05:29.000Z (over 2 years ago)
- Last Synced: 2024-12-27T05:06:36.426Z (over 1 year ago)
- Topics: javascript, oracle, server
- Language: JavaScript
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quarry Draw Oracle
This is a three repo project: [Quarry Draw Oracle](https://github.com/Puddi1/QD-Oracle), Quarry Draw Oracle Server and [Quarry Draw Validator Contracts](https://github.com/Puddi1/QD-Validator-Contracts).
The project consist of an on-chain price feed Oracle.
The Oracle Server uses Moralis APIs endpoints and a suite of QuarryDraw endpoints to fetch on-chain data on request, clean it and send it back. It offers multiple GET endpoints which the Orcale Script can make requests with ease:
All NFTs based on user address and chain:
* `GET /Moralis/WalletNFTs/:chain/:address/`
Filtered NFTs based on chain, user address and collection address:
* `GET /Moralis/WalletNFTs/:chain/:address/:collection/`
Get price of a specific ERC20 token based on chain and token address:
* `GET /Moralis/TokenPrice/:chain/:address/:assetPriceId/`
Get opensea collection Infos based on collection name:
* `GET /QuarryDraw/OpenseaCollection/:collectionName/`
Get opensea collection floor and/or marketcap based on collection name and valued by asset:
* `GET /QuarryDraw/OpenseaCollection/:collectionName/:assetPriceId/:floor/:marketcap/`
## Usage
Start with adding the environment variables in your `.env` that are needed in the oracle, where:
- `MORALIS_API_KEY` is the Moralis API key.
- `PORT` is the port the Server will listen for requests.
For syntax example refer to `.env.example`
Before running the script install all required packages:
```sh
npm i
```
Then run the Oracle with any js runtime (node):
```sh
node index.js
```