rwa-sdk-qdf


Namerwa-sdk-qdf JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://quantdefi.ai
SummaryQuantDeFi.ai RWA SDK - Professional toolkit for tokenized asset data analysis | $297B+ tracked assets
upload_time2025-09-16 03:38:58
maintainerNone
docs_urlNone
authorsamthedataman
requires_python>=3.8
licenseMIT
keywords rwa blockchain tokenization stablecoins treasuries api sdk defi crypto web3 real-world-assets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RWA SDK QDF - by QuantDeFi.ai

🚀 **Professional Python SDK for Real-World Asset Data Analysis**

Access comprehensive tokenized asset data from RWA.xyz platform through QuantDeFi.ai's optimized SDK. Track $297B+ in global assets including stablecoins, tokenized treasuries, and real-world assets across 26+ blockchain networks.

**Built by [QuantDeFi.ai](https://quantdefi.ai) - Advanced Quantitative DeFi Analytics**

## Features

- **Async and Sync Support**: Both asynchronous and synchronous client implementations
- **Complete API Coverage**: Access to all RWA.xyz API endpoints
- **Type Safety**: Full type hints for better IDE support
- **Easy to Use**: Simple, intuitive API design
- **Comprehensive Data Models**: Well-structured data models for all API responses

## Installation

### From PyPI
```bash
pip install rwa-sdk-qdf
```

### From Source
```bash
git clone https://github.com/quantdefi/rwa-sdk-qdf.git
cd rwa-sdk-qdf
pip install -e .
```

## Quick Start

### Synchronous Usage

```python
from rwa_sdk import RWAClientSync

# Initialize the client
client = RWAClientSync()

# Get USDT stablecoin data
usdt = client.get_stablecoin("USDT")
print(f"USDT Market Cap: ${usdt['marketCap']:,.2f}")

# Get stablecoins overview
stables = client.get_stablecoins_overview()
print(f"Total Stablecoin Market: ${stables['total']:,.2f}")

# Get treasuries overview
treasuries = client.get_treasuries_overview()
print(f"Total Tokenized Treasuries: ${treasuries['total']:,.2f}")
```

### Asynchronous Usage

```python
import asyncio
from rwa_sdk import RWAClient, RWAAuth

async def main():
    # Initialize with authentication (optional)
    auth = RWAAuth(email="user@example.com")

    async with RWAClient(auth=auth) as client:
        # Get USDC details
        usdc = await client.get_stablecoin("USDC")
        print(f"USDC Data: {usdc}")

        # Get stablecoins overview
        stables = await client.assets.get_stablecoins_overview()
        print(f"Stablecoins Overview: {stables}")

        # Get transactions for a specific token
        txns = await client.transactions.query(
            token_address="0x45804880de22913dafe09f4980848ece6ecbaf78",
            per_page=5
        )
        print(f"Recent Transactions: {txns}")

# Run the async example
asyncio.run(main())
```

## API Modules

### Assets
Access asset-related data including stablecoins, treasuries, and other tokenized assets.

```python
# Get specific asset
asset = await client.assets.get_asset("USDT")

# Get timeseries data with custom query
from rwa_sdk import TimeseriesQuery, Filter, FilterOperator, MeasureID

query = TimeseriesQuery(
    filter=Filter("measureID", FilterOperator.EQUALS, MeasureID.MARKET_CAP.value)
)
data = await client.assets.get_timeseries(query)
```

### Transactions
Query blockchain transactions for tokens.

```python
# Get transactions for a token
transactions = await client.transactions.query(
    token_address="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    per_page=10
)
```

### Token Holders
Get information about token holders.

```python
# Get top holders for a token
holders = await client.token_holders.query(
    token_id=123,
    per_page=100
)
```

### Platforms
Access platform-specific data.

```python
# Get platform details
platform = await client.platforms.get_platform("tether-holdings")

# List all platforms
platforms = await client.platforms.list_platforms()
```

### Networks
Get blockchain network information.

```python
# Get network details
from rwa_sdk import Network

ethereum = await client.networks.get_network(Network.ETHEREUM.value)

# List all networks
networks = await client.networks.list_networks()
```

## Data Models

The SDK provides comprehensive data models for working with the API:

- **AssetClass**: Enum for asset categories (STABLECOINS, TREASURIES, etc.)
- **Network**: Enum for blockchain networks
- **Filter/CompositeFilter**: Build complex queries
- **Sort**: Define sorting parameters
- **Pagination**: Control result pagination
- **TimeseriesQuery**: Create timeseries queries

## Advanced Usage

### Custom Queries

```python
from rwa_sdk import (
    TimeseriesQuery,
    CompositeFilter,
    Filter,
    FilterOperator,
    Sort,
    SortField,
    SortDirection,
    Pagination,
    Aggregate,
    AggregateFunction
)

# Build a complex query
query = TimeseriesQuery(
    filter=CompositeFilter(
        operator=FilterOperator.AND,
        filters=[
            Filter("assetClassID", FilterOperator.EQUALS, 28),
            Filter("date", FilterOperator.ON_OR_AFTER, "2023-01-01"),
            Filter("isInvestable", FilterOperator.EQUALS, True)
        ]
    ),
    sort=Sort(SortField.DATE, SortDirection.DESC),
    pagination=Pagination(page=1, per_page=50),
    aggregate=Aggregate(
        group_by="asset",
        aggregate_function=AggregateFunction.SUM,
        interval="day"
    )
)

result = await client.assets.get_timeseries(query)
```

### Error Handling

```python
from rwa_sdk import RWAAPIError, RWANetworkError

try:
    asset = await client.assets.get_asset("USDT")
except RWAAPIError as e:
    print(f"API error: {e.message}, Status: {e.status_code}")
except RWANetworkError as e:
    print(f"Network error: {e.message}")
```

## Authentication

Some endpoints require authentication. You can provide authentication credentials:

```python
from rwa_sdk import RWAAuth

# With email
auth = RWAAuth(email="user@example.com")

# With session token
auth = RWAAuth(session_token="your-session-token")

# Set session later
auth.set_session("new-session-token")

client = RWAClient(auth=auth)
```

## Known Limitations

### Compressed Data Responses

Some API endpoints return compressed data in a proprietary Next.js format. These responses appear as base64-like encoded strings. The SDK currently returns this data as-is. For most use cases, we recommend using endpoints that return standard JSON data, such as:

- Platform listings and details
- Direct asset queries
- Network information

If you encounter compressed data and need to access it, consider:
1. Using alternative endpoints that provide uncompressed data
2. Checking the RWA.xyz official documentation for data format specifications
3. Using the web interface at https://app.rwa.xyz for visual data access

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Support

For support, please open an issue on the GitHub repository or contact support@rwa.xyz

## Disclaimer

This SDK is provided as-is. Please ensure you comply with RWA.xyz's terms of service when using this SDK.

            

Raw data

            {
    "_id": null,
    "home_page": "https://quantdefi.ai",
    "name": "rwa-sdk-qdf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "rwa blockchain tokenization stablecoins treasuries api sdk defi crypto web3 real-world-assets",
    "author": "samthedataman",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/38/b5/cb6a3f484c563d8902b504a499bc6a0b3810d005c0c9a3f18305de25168b/rwa-sdk-qdf-0.1.0.tar.gz",
    "platform": null,
    "description": "# RWA SDK QDF - by QuantDeFi.ai\n\n\ud83d\ude80 **Professional Python SDK for Real-World Asset Data Analysis**\n\nAccess comprehensive tokenized asset data from RWA.xyz platform through QuantDeFi.ai's optimized SDK. Track $297B+ in global assets including stablecoins, tokenized treasuries, and real-world assets across 26+ blockchain networks.\n\n**Built by [QuantDeFi.ai](https://quantdefi.ai) - Advanced Quantitative DeFi Analytics**\n\n## Features\n\n- **Async and Sync Support**: Both asynchronous and synchronous client implementations\n- **Complete API Coverage**: Access to all RWA.xyz API endpoints\n- **Type Safety**: Full type hints for better IDE support\n- **Easy to Use**: Simple, intuitive API design\n- **Comprehensive Data Models**: Well-structured data models for all API responses\n\n## Installation\n\n### From PyPI\n```bash\npip install rwa-sdk-qdf\n```\n\n### From Source\n```bash\ngit clone https://github.com/quantdefi/rwa-sdk-qdf.git\ncd rwa-sdk-qdf\npip install -e .\n```\n\n## Quick Start\n\n### Synchronous Usage\n\n```python\nfrom rwa_sdk import RWAClientSync\n\n# Initialize the client\nclient = RWAClientSync()\n\n# Get USDT stablecoin data\nusdt = client.get_stablecoin(\"USDT\")\nprint(f\"USDT Market Cap: ${usdt['marketCap']:,.2f}\")\n\n# Get stablecoins overview\nstables = client.get_stablecoins_overview()\nprint(f\"Total Stablecoin Market: ${stables['total']:,.2f}\")\n\n# Get treasuries overview\ntreasuries = client.get_treasuries_overview()\nprint(f\"Total Tokenized Treasuries: ${treasuries['total']:,.2f}\")\n```\n\n### Asynchronous Usage\n\n```python\nimport asyncio\nfrom rwa_sdk import RWAClient, RWAAuth\n\nasync def main():\n    # Initialize with authentication (optional)\n    auth = RWAAuth(email=\"user@example.com\")\n\n    async with RWAClient(auth=auth) as client:\n        # Get USDC details\n        usdc = await client.get_stablecoin(\"USDC\")\n        print(f\"USDC Data: {usdc}\")\n\n        # Get stablecoins overview\n        stables = await client.assets.get_stablecoins_overview()\n        print(f\"Stablecoins Overview: {stables}\")\n\n        # Get transactions for a specific token\n        txns = await client.transactions.query(\n            token_address=\"0x45804880de22913dafe09f4980848ece6ecbaf78\",\n            per_page=5\n        )\n        print(f\"Recent Transactions: {txns}\")\n\n# Run the async example\nasyncio.run(main())\n```\n\n## API Modules\n\n### Assets\nAccess asset-related data including stablecoins, treasuries, and other tokenized assets.\n\n```python\n# Get specific asset\nasset = await client.assets.get_asset(\"USDT\")\n\n# Get timeseries data with custom query\nfrom rwa_sdk import TimeseriesQuery, Filter, FilterOperator, MeasureID\n\nquery = TimeseriesQuery(\n    filter=Filter(\"measureID\", FilterOperator.EQUALS, MeasureID.MARKET_CAP.value)\n)\ndata = await client.assets.get_timeseries(query)\n```\n\n### Transactions\nQuery blockchain transactions for tokens.\n\n```python\n# Get transactions for a token\ntransactions = await client.transactions.query(\n    token_address=\"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48\",\n    per_page=10\n)\n```\n\n### Token Holders\nGet information about token holders.\n\n```python\n# Get top holders for a token\nholders = await client.token_holders.query(\n    token_id=123,\n    per_page=100\n)\n```\n\n### Platforms\nAccess platform-specific data.\n\n```python\n# Get platform details\nplatform = await client.platforms.get_platform(\"tether-holdings\")\n\n# List all platforms\nplatforms = await client.platforms.list_platforms()\n```\n\n### Networks\nGet blockchain network information.\n\n```python\n# Get network details\nfrom rwa_sdk import Network\n\nethereum = await client.networks.get_network(Network.ETHEREUM.value)\n\n# List all networks\nnetworks = await client.networks.list_networks()\n```\n\n## Data Models\n\nThe SDK provides comprehensive data models for working with the API:\n\n- **AssetClass**: Enum for asset categories (STABLECOINS, TREASURIES, etc.)\n- **Network**: Enum for blockchain networks\n- **Filter/CompositeFilter**: Build complex queries\n- **Sort**: Define sorting parameters\n- **Pagination**: Control result pagination\n- **TimeseriesQuery**: Create timeseries queries\n\n## Advanced Usage\n\n### Custom Queries\n\n```python\nfrom rwa_sdk import (\n    TimeseriesQuery,\n    CompositeFilter,\n    Filter,\n    FilterOperator,\n    Sort,\n    SortField,\n    SortDirection,\n    Pagination,\n    Aggregate,\n    AggregateFunction\n)\n\n# Build a complex query\nquery = TimeseriesQuery(\n    filter=CompositeFilter(\n        operator=FilterOperator.AND,\n        filters=[\n            Filter(\"assetClassID\", FilterOperator.EQUALS, 28),\n            Filter(\"date\", FilterOperator.ON_OR_AFTER, \"2023-01-01\"),\n            Filter(\"isInvestable\", FilterOperator.EQUALS, True)\n        ]\n    ),\n    sort=Sort(SortField.DATE, SortDirection.DESC),\n    pagination=Pagination(page=1, per_page=50),\n    aggregate=Aggregate(\n        group_by=\"asset\",\n        aggregate_function=AggregateFunction.SUM,\n        interval=\"day\"\n    )\n)\n\nresult = await client.assets.get_timeseries(query)\n```\n\n### Error Handling\n\n```python\nfrom rwa_sdk import RWAAPIError, RWANetworkError\n\ntry:\n    asset = await client.assets.get_asset(\"USDT\")\nexcept RWAAPIError as e:\n    print(f\"API error: {e.message}, Status: {e.status_code}\")\nexcept RWANetworkError as e:\n    print(f\"Network error: {e.message}\")\n```\n\n## Authentication\n\nSome endpoints require authentication. You can provide authentication credentials:\n\n```python\nfrom rwa_sdk import RWAAuth\n\n# With email\nauth = RWAAuth(email=\"user@example.com\")\n\n# With session token\nauth = RWAAuth(session_token=\"your-session-token\")\n\n# Set session later\nauth.set_session(\"new-session-token\")\n\nclient = RWAClient(auth=auth)\n```\n\n## Known Limitations\n\n### Compressed Data Responses\n\nSome API endpoints return compressed data in a proprietary Next.js format. These responses appear as base64-like encoded strings. The SDK currently returns this data as-is. For most use cases, we recommend using endpoints that return standard JSON data, such as:\n\n- Platform listings and details\n- Direct asset queries\n- Network information\n\nIf you encounter compressed data and need to access it, consider:\n1. Using alternative endpoints that provide uncompressed data\n2. Checking the RWA.xyz official documentation for data format specifications\n3. Using the web interface at https://app.rwa.xyz for visual data access\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Support\n\nFor support, please open an issue on the GitHub repository or contact support@rwa.xyz\n\n## Disclaimer\n\nThis SDK is provided as-is. Please ensure you comply with RWA.xyz's terms of service when using this SDK.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "QuantDeFi.ai RWA SDK - Professional toolkit for tokenized asset data analysis | $297B+ tracked assets",
    "version": "0.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/quantdefi/rwa-sdk-qdf/issues",
        "Documentation": "https://github.com/quantdefi/rwa-sdk-qdf#readme",
        "Homepage": "https://quantdefi.ai",
        "QuantDeFi Platform": "https://quantdefi.ai",
        "Repository": "https://github.com/quantdefi/rwa-sdk-qdf"
    },
    "split_keywords": [
        "rwa",
        "blockchain",
        "tokenization",
        "stablecoins",
        "treasuries",
        "api",
        "sdk",
        "defi",
        "crypto",
        "web3",
        "real-world-assets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0016f51059bf3c3e55355a7ca622c4d7bea8a57f72d1ff9fec2797e5efb5a24c",
                "md5": "4239df6a94f4c30d2b0cced5e24566e5",
                "sha256": "1bb3182c06cb90647314fc91a2a96e4a4d44e1748fdd570e2ba8488afba6d2e0"
            },
            "downloads": -1,
            "filename": "rwa_sdk_qdf-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4239df6a94f4c30d2b0cced5e24566e5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 18936,
            "upload_time": "2025-09-16T03:38:57",
            "upload_time_iso_8601": "2025-09-16T03:38:57.001096Z",
            "url": "https://files.pythonhosted.org/packages/00/16/f51059bf3c3e55355a7ca622c4d7bea8a57f72d1ff9fec2797e5efb5a24c/rwa_sdk_qdf-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "38b5cb6a3f484c563d8902b504a499bc6a0b3810d005c0c9a3f18305de25168b",
                "md5": "f759c2c03a759205e1fca50e0e21b3e3",
                "sha256": "a5a5c5fda8599aee7bf16d90202da77c83444d87aafecbc824f9c5c129fd8e21"
            },
            "downloads": -1,
            "filename": "rwa-sdk-qdf-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f759c2c03a759205e1fca50e0e21b3e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16650,
            "upload_time": "2025-09-16T03:38:58",
            "upload_time_iso_8601": "2025-09-16T03:38:58.187081Z",
            "url": "https://files.pythonhosted.org/packages/38/b5/cb6a3f484c563d8902b504a499bc6a0b3810d005c0c9a3f18305de25168b/rwa-sdk-qdf-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-16 03:38:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "quantdefi",
    "github_project": "rwa-sdk-qdf",
    "github_not_found": true,
    "lcname": "rwa-sdk-qdf"
}
        
Elapsed time: 2.96733s