https://github.com/dineshpinto/geckoterminal-api
Lightweight Python wrapper for GeckoTerminal DeFi & DeX aggregator.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.6%) to scientific vocabulary
Keywords
Repository
Lightweight Python wrapper for GeckoTerminal DeFi & DeX aggregator.
Basic Info
- Host: GitHub
- Owner: dineshpinto
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://pypi.org/project/geckoterminal-api/
- Size: 270 KB
Statistics
- Stars: 42
- Watchers: 6
- Forks: 7
- Open Issues: 0
- Releases: 3
Topics
Metadata Files
README.md
GeckoTerminal API
A lightweight Python wrapper for the GeckoTerminal DeFi & DeX aggregator, supporting 90+ chains and 500+ DEXs.
Key Features
- Market Data: Fetch price, volume, and historical charts for any token.
- Pool Discovery: Identify pools trading a specific token.
- Candlestick Charts: Generate OHLCV-based candlestick charts.
- Sync/Async support: Supports both synchronous and asynchronous API.
Note: The API is currently in beta and subject to change. Please report issues.
Installation
bash
pip install geckoterminal-api
Documentation
Refer to the official GeckoTerminal API docs for detailed information.
Quickstart
Synchronous API Example
```python from geckoterminal_api import GeckoTerminalAPI
gt = GeckoTerminalAPI()
Fetch supported networks and their IDs
gt.networks() ```
Asynchronous API Example
```python import asyncio from geckoterminal_api import AsyncGeckoTerminalAPI
agt = AsyncGeckoTerminalAPI()
Fetch supported networks and their IDs
asyncio.run(agt.networks()) ```
Usage Examples
Fetch Trades for a Specific Pool
```python
Query $ANALOS pool on Solana
trades = gt.networkpooltrades(network="solana", pool="69grLw4PcSypZnn3xpsozCJFT8vs8WA5817VUVnzNGTh")
for tradedata in trades["data"]: trade = tradedata["attributes"] print(f'{trade["blocktimestamp"]} -- {trade["kind"]}: {float(trade["volumein_usd"]):.2f} USD') ```
(truncated output)
text
2023-12-27T08:27:24Z -- buy: 0.06 USD
2023-12-27T08:27:22Z -- buy: 54.73 USD
2023-12-27T08:27:22Z -- sell: 43.11 USD
2023-12-27T08:27:22Z -- sell: 105.08 USD
2023-12-27T08:27:20Z -- sell: 552.80 USD
2023-12-27T08:27:17Z -- buy: 1116.88 USD
2023-12-27T08:27:14Z -- sell: 1110.02 USD
2023-12-27T08:27:12Z -- buy: 52.44 USD
2023-12-27T08:27:02Z -- buy: 41.72 USD
2023-12-27T08:26:59Z -- sell: 15.31 USD
Discover Trending Pools
```python
Trending pools on Solana
trendingpools = gt.networktrendingpools(network="solana") print(trendingpools) ```
(truncated output)
json
{
"id": "solana_EP2ib6dYdEeqD8MfE2ezHCxX3kP3K2eLKkirfPm5eyMx",
"type": "pool",
"attributes": {
"base_token_price_usd": "0.216341",
"address": "EP2ib6dYdEeqD8MfE2ezHCxX3kP3K2eLKkirfPm5eyMx",
"name": "$WIF / SOL",
"fdv_usd": "214518552",
"market_cap_usd": "201410163.369506",
"price_change_percentage": {
"h1": "2.75",
"h24": "-11.76"
},
"transactions": {
"h1": {
"buys": 1143,
"sells": 494,
"buyers": 282,
"sellers": 249
},
"h24": {
"buys": 33874,
"sells": 21413,
"buyers": 6790,
"sellers": 5363
}
},
"volume_usd": {
"h1": "782023.141511",
"h24": "41413570.131944"
}
}
}
Discover New Pools
```python
New pools on Arbitrum
newpools = gt.networknewpools(network="arbitrum") print(newpools) ```
(truncated output)
json
{
"id": "arbitrum_0x9405117878d3a7ff7968b3d6f322bf428c168ca7",
"type": "pool",
"attributes": {
"base_token_price_usd": "0.000463649357219151",
"address": "0x9405117878d3a7ff7968b3d6f322bf428c168ca7",
"name": "JUPITER / WETH",
"pool_created_at": "2023-12-23T22:19:36Z",
"fdv_usd": "9736.64",
"price_change_percentage": {
"h1": "55.09",
"h24": "55.09"
},
"transactions": {
"h1": {
"buys": 24,
"sells": 4,
"buyers": 24,
"sellers": 4
},
"h24": {
"buys": 24,
"sells": 4,
"buyers": 24,
"sellers": 4
}
},
"volume_usd": {
"h1": "3191.9671827550049",
"h24": "3191.9671827550049"
},
"reserve_in_usd": "14348.4777"
}
}
and many more...
Proxy Support
Synchronous API Proxy Setup
```python from geckoterminal_api import GeckoTerminalAPI
proxies = { 'http': 'http://10.10.10.10:8000', 'https': 'http://10.10.10.10:8000', } gt = GeckoTerminalAPI(proxies=proxies) ```
Asynchronous API Proxy Setup
```python from geckoterminal_api import AsyncGeckoTerminalAPI
proxy = "http://proxy.com" agt = AsyncGeckoTerminalAPI(proxy=proxy) ```
Disclaimer
This project is for educational purposes only. You should not construe any such information or other material as legal, tax, investment, financial, or other advice. Nothing contained here constitutes a solicitation, recommendation, endorsement, or offer by me or any third party service provider to buy or sell any securities or other financial instruments in this or in any other jurisdiction in which such solicitation or offer would be unlawful under the securities laws of such jurisdiction.
Under no circumstances will I be held responsible or liable in any way for any claims, damages, losses, expenses, costs, or liabilities whatsoever, including, without limitation, any direct or indirect damages for loss of profits.
Owner
- Name: Dinesh Pinto
- Login: dineshpinto
- Kind: user
- Location: Switzerland/Germany
- Website: dineshpinto.github.io
- Twitter: dineshkpinto
- Repositories: 6
- Profile: https://github.com/dineshpinto
quantum info PhD student @ EPFL, pythonista & rustacean
GitHub Events
Total
- Release event: 1
- Watch event: 22
- Issue comment event: 2
- Push event: 5
- Pull request event: 8
- Fork event: 5
- Create event: 1
Last Year
- Release event: 1
- Watch event: 22
- Issue comment event: 2
- Push event: 5
- Pull request event: 8
- Fork event: 5
- Create event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| dineshpinto | a****z@i****m | 67 |
| piatsko | p****y@m****i | 4 |
| zaza | p****y@g****m | 2 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 5
- Average time to close issues: 22 days
- Average time to close pull requests: 1 day
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 1.0
- Average comments per pull request: 0.6
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 5
- Average time to close issues: N/A
- Average time to close pull requests: 1 day
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.6
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- MatrixA (1)
Pull Request Authors
- piatsko (6)
- HoPHNiDev (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 150 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 11
- Total maintainers: 1
pypi.org: geckoterminal-api
RESTful (sync + async) Python client for GeckoTerminal API
- Documentation: https://geckoterminal-api.readthedocs.io/
- License: MIT
-
Latest release: 0.9.0
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- Gr1N/setup-poetry v8 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- python ^3.10
- requests ^2.31.0