No project description provided
Project description
GeckoTerminal
Python wrapper for GeckoTerminal's API. Access DEX data across >100 networks through an easy-to-use library.
Installation
pip3 install geckoterminal
GeckoTerminal Docs
https://www.geckoterminal.com/dex-api
Quick Start
import geckoterminal
Get networks
networks = geckoterminal.get_networks(page=1)
Get prices
Supports up to 30 token addressses.
prices = geckoterminal.get_prices(
network='eth',
token_addresses=[
'0xdac17f958d2ee523a2206206994597c13d831ec7', # USDT
'0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', # USDC
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', # WETH
]
)
Get DEXes
dexes = geckoterminal.get_dexes(
network='eth',
page=1
)
Get pool
weth_usdc = geckoterminal.get_pool(
network='eth',
pool_address='0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', # WETH/USDC Uniswap v3 0.05%
include=['base_token', 'quote_token', 'dex']
)
Get pool info
weth_usdc_info = geckoterminal.get_pool_info(
network='eth',
pool_address='0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', # WETH/USDC Uniswap v3 0.05%
)
Get multiple pools
solana_pools = geckoterminal.get_pools(
network='solana',
pool_addresses=[
'FpCMFDFGYotvufJ7HrFHsWEiiQCGbkLCtwHiDnh7o28Q', # SOL/USDC Orca
'3ne4mWqdYuNiYrYZC9TrA3FcfuFdErghH97vNPbjicr1', # BONK/SOL Orca
'EP2ib6dYdEeqD8MfE2ezHCxX3kP3K2eLKkirfPm5eyMx', # $WIF/SOL Raydium
]
)
Get top pools on a network
polygon_top_pools = geckoterminal.get_top_pools(
network='polygon_pos',
include=['base_token', 'quote_token', 'dex'],
page=1,
)
Get top pools on a DEX by network
blast_thruster_top_pools = geckoterminal.get_top_pools(
network='blast',
dex='thruster-v3', # Get id through geckoterminal.get_dexes(),
include=['base_token', 'quote_token', 'dex']
)
Get new pools
new_pools = geckoterminal.get_new_pools(
network=None, # If None, returns latest pools from all networks.
include=['base_token', 'quote_token', 'dex']
)
Search pools
pools_with_cat = geckoterminal.search_pools(
query='cat',
network=None, # If None, searches all networks
include=['base_token', 'quote_token', 'dex'],
page=1
)
Get token
weth = geckoterminal.get_token(
network='eth',
token_address='0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', # WETH
include=['top_pools']
)
Get trades
weth_usdc_trades = geckoterminal.get_trades(
network='eth',
pool_address='0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', # WETH/USDC Uniswap v3 0.05%
trade_volume_in_usd_greater_than=10000
)
Get pool OHLCV
Gets OHLCV data up to 6 months ago.
wbtc_weth_ohlcv = geckoterminal.get_pool_ohlcv(
network='eth',
pool_address='0xcbcdf9626bc03e24f779434178a73a0b4bad62ed', # WBTC/WETH Uniswap v3
timeframe='day', # One of day, hour, or minute
aggregate=1,
before_timestamp=None, # Unix timestamp in seconds
limit=100, # Default 100, max is 1000
currency='usd', # One of usd or token
token='base', # One of base, quote, or a specific token address
df=True # Returns a
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file geckoterminal-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: geckoterminal-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f94624a6c0d78d2806a7f91c64867cd559b999f92ebd3b6b13225c282a7b062b |
|
MD5 | 67686de78d00ee7130e2647daaa718e8 |
|
BLAKE2b-256 | c61f5e21aae6097c640946eeba013a9a05606611aef064af027b77a94ef1b9b5 |