Metadata-Version: 2.4
Name: geckoterminal-py
Version: 0.2.5
Author-email: cardosofede <federico.cardoso.e@gmail.com>
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: glom>=24.11.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: pandas>=2.2.3
Description-Content-Type: text/markdown

# GeckoTerminal Py

GeckoTerminal Py is a Python client for the [GeckoTerminal](https://www.geckoterminal.com). It provides a user-friendly way to fetch network and pool data asynchronously or synchronously.

## Installation

To install GeckoTerminal Py, use pip:

```bash
pip install geckoterminal-py
```

## Using uv for dependency management

### Installation

```bash
# Install uv
pip install uv

# Create and activate a virtual environment
uv venv

# Install dependencies
uv pip install -r requirements.txt
```

### Development

```bash
# Install all dependencies including dev dependencies
uv pip install -r requirements.txt

# Update dependencies
uv pip sync requirements.txt
```

## Usage

You can fetch data about networks using GeckoTerminal Py in two ways:

### Asynchronous usage

```python
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

```python
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):**

Endpoints to add:
- [ ] /simple/networks/{network}/token_price/{addresses}
- [ ] /search/pools
- [ ] / rest of tokens list