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.4.tar.gz
(17.0 kB
view details)
Built Distribution
File details
Details for the file geckoterminal_py-0.2.4.tar.gz
.
File metadata
- Download URL: geckoterminal_py-0.2.4.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.9 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db9b8906120bfb3c15106751d58b3b3e3afae0ce0061f393cd8a6da9048d44db |
|
MD5 | ae5d27a40f47a4d3d1686e513b111747 |
|
BLAKE2b-256 | 6f3b3abc6aa9440843790bde1626e40b382d421ac686b76260b6a2614c778941 |
File details
Details for the file geckoterminal_py-0.2.4-py3-none-any.whl
.
File metadata
- Download URL: geckoterminal_py-0.2.4-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.10.9 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8757cd5ead5372f8008578cbd5b09f0aca775dbcf20f6813f8d18cb37d6ce7fe |
|
MD5 | bebb84d2a075441016caf1b8cf992be3 |
|
BLAKE2b-256 | ea77bdf934bc590265a23fa2fdb6290ccb959143dd0abaa488c1b69ee0272b1c |