Skip to main content

Crate eth_prices

Crate eth_prices 

Source
Expand description

eth-prices is a pricing library & routing engine for EVM assets.

This crate currently exposes protocol-specific quoters that can read a rate at a specific block height.

§Overview

Here is a simple example showing off some of the features of eth-prices:

use eth_prices::{quoter::Quoter, token::Token};
use alloy::primitives::address;

let quoter = UniswapV3Quoter::from_pool(address!());

Today, the main building blocks are:

§Quoters

Currently supported quoters include:

§Routing

Routing is currently in-progress and will be available in a future release.

§Examples

You can find more examples in the examples directory.

Re-exports§

pub use error::EthPricesError;
pub use error::Result;

Modules§

builder
Builder API for constructing routers from loaded quoters.
config
error
quoter
Quote sources for converting one asset into another at a given block height.
router
token
Token metadata and identifier helpers.