ApeWorX / ape-tokens

Tokens converter plugin for the Ape Framework
https://www.apeworx.io/
Apache License 2.0
10 stars 7 forks source link

Add Price Info #40

Open fubuloubu opened 8 months ago

fubuloubu commented 8 months ago

Overview

Add a way to query live and historical pricing information

Specification

Might be too much to ask here, but could define a query type that could be fulfilled by like uniswap or other sources of pricing information in order to fetch prices (maybe coinbase, coingecko, etc.)

>>> from ape_tokens import price
>>> price["USDC"]["$"]
Decimal("1.00")
>>> price.query(quote="USDC", base="$", start_block=1000000, stop_block=1200000)
# dataframe containing per-block prices

Dependencies

n/a

linear[bot] commented 8 months ago

APE-1689 Add Price Info