A python wrapper for the Unleash Nfts API
Project description
unleashSDK
Overview
The unleashSDK Python package simplifies interaction with comprehensive NFT and blockchain analytics APIs. This package allows developers to fetch, process, and analyze data with ease, offering extensive features such as market metrics, whale and shark analytics, transaction trends, and wash trade evaluations.
Features
- Fetch data on NFT collections, traders, transactions, and market activity.
- Access whale and shark metrics for detailed insights.
- Analyze wash trading activities with advanced indexes.
- Retrieve market state scores and trends.
- Support for various time ranges: 24h, 7d, 30d, 90d, or custom ranges.
- Handles edge cases like unavailable data, infinity values, and precision rounding.
Installation
Install the package via pip:
pip install unleashSDK
Usage
Initialization
Start by importing the package and initializing the client with your API key:
from UnleashSDK import unleashSDK
client = unleashSDK.UnleashNFTApi()
client.set_api_key_token("***")
Examples
Fetch Market Analytics
Retrieve market metrics for a specific NFT collection:
response = client.market_analytics_report(blockchain="ethereum", time_range="7d")
print(response)
Analyze Wallet Trades
Fetch wallet trade data for a given blockchain:
response = client.wallet_traders(blockchain="ethereum", time_range="30d")
print(response)
Gaming Metrics
Analyze gamming metrics activities:
response = client.gaming_metrics()
print(response)
Error Handling
The package gracefully handles API errors and missing data. For example:
try:
response = client.get_market_metrics(collection_id="invalid_id")
except unleashSDK.exceptions.APIError as e:
print(f"An error occurred: {e}")
API Endpoints
Currencies
- Description: All currency values are string-serialized to prevent rounding issues.
- Format: Monetary values are returned in the requested currency and, if applicable, the original currency.
Percentages
- Percentages are returned as ratios (e.g., 0.394 for 39.4%).
Missing/Unavailable Data
- Missing data points are returned as
"NA".
Infinity Values
- Positive infinity:
"INF_POS" - Negative infinity:
"INF_NEG"
Date/Datetime
- All date and datetime values are formatted in ISO 8601.
Metrics
The following metrics are available through the APIs:
| Metric | Description |
|---|---|
assets |
Number of assets in a collection. |
holders |
Number of traders currently holding NFTs. |
marketcap |
Total market value of the NFT collection. |
price_avg |
Average price at which NFTs are sold. |
sales |
Number of NFTs sold. |
transactions |
Number of transactions. |
washtrade_volume |
Total trade value suspected of wash trading. |
traders_ratio |
Percentage of active traders compared to total traders. |
Trend Time Ranges and Periods
| Time Range | Parameter | Period of One Data Point | Number of Data Points |
|---|---|---|---|
| 24 hours | 24h |
1 hour | 24 |
| 7 days | 7d |
4 hours | 42 |
| 30 days | 30d |
1 day | 30 |
| 90 days | 90d |
1 day | 90 |
| Custom Range | range |
1 day | Based on range |
Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file UnleashSDK-0.1.0.tar.gz.
File metadata
- Download URL: UnleashSDK-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be122b8a7365d450cabe71d04341fc4f6ad22f9802fe0ff45dd7a283a9a590b8
|
|
| MD5 |
48c7df6a39fbb61c96dae75b913acd77
|
|
| BLAKE2b-256 |
b237660aaaa694ce5045556b1f97bb70e78a4eff955bea9fecee29000d06477a
|
File details
Details for the file UnleashSDK-0.1.0-py3-none-any.whl.
File metadata
- Download URL: UnleashSDK-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc6cda5ef49ce5e92cf362e78ffa125e5c74b12f5c98ba81aee4a5f571d79c4d
|
|
| MD5 |
5ff8cfbc9fb58571181cb8caaa0c3b41
|
|
| BLAKE2b-256 |
a25b06243b9cdac4fecec3ecaf570018fcd4956ef2f69a67b374d398c6197541
|