Skip to content

Repository files navigation

token price oracle

just a tiny cli that reads config.yaml, hits a few price feeds, and spits out one blended (median) price as json so you can pipe it wherever.

quick start

  • pnpm install
  • pnpm start BTC or TOKEN=ETH pnpm start

endpoints

  • coinmarketcap https://pro-api.coinmarketcap.com/v2/cryptocurrency/quotes/latest (needs your X-CMC_PRO_API_KEY)
  • coingecko https://api.coingecko.com/api/v3/simple/price using the token map in the config
  • 1inch https://api.1inch.dev/pricing/v1.1 for on-chain quotes
  • paraswap https://apiv5.paraswap.io/prices/ with the preset amount + network

tweak stuff in config.yaml/config.example.yaml if you want different tokens, weights, or endpoints.

About

TypeScript token price oracle with clean architecture

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages