A high-performance price oracle system that fetches real-time token prices from Pyth Network and stores them in a PostgreSQL database using SeaORM. This system combines the functionality of the original Price Submitter and Pricing Keeper.
- Language: Rust
- Database: PostgreSQL
- ORM: SeaORM
- Price Source: Pyth Network
- Data Granularity: Supports candle generation for
5m,15m,1h,4h, and1dintervals. - Chains Supported:
- Monad Testnet
- Submits price of tokens to DB every 5 seconds.
- Built-in support for token candles over multiple timeframes.
- Uses Pyth price feeds (ideal for tokens not listed on CEX).
- Easily scalable to support new tokens or chains.
- Maintains data indexed by timestamp and chain ID for quick retrieval.
To run this project, you will need to add the following environment variables to your .env file
DATABASE_URL: Postgresql connection URL
ENVJSON : Path of env.json file
cargo install sea-orm-clisea migrate up cargo buildcargo run
-
src/utils/helpers.rs-
SUPPORTED_TOKENS -
CHAINID_MAP -
TOKEN_INFO
-
Check : entity/src/price_candle.rs