No project description provided
Project description
GeckoTerminal Py
GeckoTerminal Py is a Python client for the GeckoTerminal. It provides a user-friendly way to fetch network and pool data asynchronously or synchronously.
Installation
To install GeckoTerminal Py, use pip:
pip install geckoterminal-py
Usage
You can fetch data about networks using GeckoTerminal Py in two ways:
Asynchronous usage
from geckoterminal_py import GeckoTerminalAsyncClient
import asyncio
async def main():
client = GeckoTerminalAsyncClient()
networks_df = await client.get_networks()
print(networks_df)
await client.close()
# In an asyncio environment, you'd use:
asyncio.run(main())
Synchronous usage
from geckoterminal_py import GeckoTerminalSyncClient
def main():
client = GeckoTerminalSyncClient()
networks_df = client.get_networks()
print(networks_df)
client.close()
main()
Methods Available
Here is a brief description of the methods available in the GeckoTerminalClient: Please check the examples notebook where you can find the usage of all of them.
Methods:
- get_networks():
- get_dexes_by_network(network_id: str):
- get_top_pools_by_network(network_id: str):
- get_top_pools_by_network_dex(network_id: str, dex_id: str):
- get_top_pools_by_network_token(network_id: str, token_id: str):
- get_new_pools_by_network(network_id: str):
- get_new_pools_all_networks():
- get_ohlcv(network_id: str, pool_address: str, timeframe: str, before_timestamp: int = None, currency: str = "usd", token: str = "base", limit: int = 1000):
TODO:
- Add pagination for the points
- Add sort by in the query parameters
Endpoints to add:
- /simple/networks/{network}/token_price/{addresses}
- /search/pools
- / rest of tokens list
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
geckoterminal_py-0.2.1.tar.gz
(16.9 kB
view hashes)
Built Distribution
Close
Hashes for geckoterminal_py-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2151a6f688ead1d6e25f7ab4770231a5612780abe10e39b44e995e8c2aa5c071 |
|
MD5 | 81f23613cce207689d94126114ee1d07 |
|
BLAKE2b-256 | 3439edbb33f90678f0e172cb530cec2c0aa298a07a7a6e6f5d6c21cd54ef0d29 |