deltadefi


Namedeltadefi JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryPython SDK for DeltaDeFi protocol.
upload_time2025-09-01 21:55:32
maintainerNone
docs_urlNone
authorNone
requires_python<4.0.0,>3.11
licenseNone
keywords cardano defi sdk trading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DeltaDeFi Python SDK

The DeltaDeFi Python SDK provides a convenient way to interact with the DeltaDeFi API. This SDK allows developers to easily integrate DeltaDeFi's features into their Python applications.

## Installation

To install the SDK, use `pip`:

```sh
pip install deltadefi
```

## Requirements

- Python 3.11 or higher

## Usage

### Initialization

To use the SDK, you need to initialize the ApiClient with your API configuration and wallet.

```python
from deltadefi.clients import ApiClient
from sidan_gin import HDWallet

# Initialize API configuration
network="preprod",
api_key="your_api_key",

# Initialize ApiClient
api = ApiClient(network=network, api_key=api_key)
```

### Accounts

The Accounts client allows you to interact with account-related endpoints.

```python
# Get account balance
account_balance = api.accounts.get_account_balance()
print(account_balance)
```

### Markets

The Market client allows you to interact with market-related endpoints.

```python
# Get market depth
market_depth = api.markets.get_depth("ADAUSDM")
print(market_depth_response)

# Get market price
market_price_response = api.markets.get_market_price("ADAUSDM")
print(market_price_response)
```

### Orders

The Order client allows you to interact with order-related endpoints.

```python
api_key = os.environ.get("DELTADEFI_API_KEY")
password = os.environ.get("TRADING_PASSWORD")

api = ApiClient(api_key=api_key)
api.load_operation_key(password)

res = api.post_order(
    symbol="ADAUSDM",
    side="sell",
    type="limit",
    quantity=51,
    price=15,
)

print("Order submitted successfully.", res)
```

## Development

### Tests

Testing sdk:

```sh
DELTADEFI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx make test
```

## License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "deltadefi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>3.11",
    "maintainer_email": null,
    "keywords": "cardano, defi, sdk, trading",
    "author": null,
    "author_email": "HinsonSIDAN <wongkahinhinson@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d1/70/cabebdf03c04474a15ca2c309329127bc70566a26fd8c5668834be4d17e3/deltadefi-0.1.1.tar.gz",
    "platform": null,
    "description": "# DeltaDeFi Python SDK\n\nThe DeltaDeFi Python SDK provides a convenient way to interact with the DeltaDeFi API. This SDK allows developers to easily integrate DeltaDeFi's features into their Python applications.\n\n## Installation\n\nTo install the SDK, use `pip`:\n\n```sh\npip install deltadefi\n```\n\n## Requirements\n\n- Python 3.11 or higher\n\n## Usage\n\n### Initialization\n\nTo use the SDK, you need to initialize the ApiClient with your API configuration and wallet.\n\n```python\nfrom deltadefi.clients import ApiClient\nfrom sidan_gin import HDWallet\n\n# Initialize API configuration\nnetwork=\"preprod\",\napi_key=\"your_api_key\",\n\n# Initialize ApiClient\napi = ApiClient(network=network, api_key=api_key)\n```\n\n### Accounts\n\nThe Accounts client allows you to interact with account-related endpoints.\n\n```python\n# Get account balance\naccount_balance = api.accounts.get_account_balance()\nprint(account_balance)\n```\n\n### Markets\n\nThe Market client allows you to interact with market-related endpoints.\n\n```python\n# Get market depth\nmarket_depth = api.markets.get_depth(\"ADAUSDM\")\nprint(market_depth_response)\n\n# Get market price\nmarket_price_response = api.markets.get_market_price(\"ADAUSDM\")\nprint(market_price_response)\n```\n\n### Orders\n\nThe Order client allows you to interact with order-related endpoints.\n\n```python\napi_key = os.environ.get(\"DELTADEFI_API_KEY\")\npassword = os.environ.get(\"TRADING_PASSWORD\")\n\napi = ApiClient(api_key=api_key)\napi.load_operation_key(password)\n\nres = api.post_order(\n    symbol=\"ADAUSDM\",\n    side=\"sell\",\n    type=\"limit\",\n    quantity=51,\n    price=15,\n)\n\nprint(\"Order submitted successfully.\", res)\n```\n\n## Development\n\n### Tests\n\nTesting sdk:\n\n```sh\nDELTADEFI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx make test\n```\n\n## License\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python SDK for DeltaDeFi protocol.",
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [
        "cardano",
        " defi",
        " sdk",
        " trading"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c5b027139508b0ee375162d52e90ea8b15dbb77575d299d405fd4df95f681613",
                "md5": "dfc254120ebd25a58d09a1be0f90089d",
                "sha256": "6efdd52edf99a81d62129cbe38cd5504a106180a81921890cf4fc6b2eb1708b4"
            },
            "downloads": -1,
            "filename": "deltadefi-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dfc254120ebd25a58d09a1be0f90089d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>3.11",
            "size": 16876,
            "upload_time": "2025-09-01T21:55:31",
            "upload_time_iso_8601": "2025-09-01T21:55:31.071196Z",
            "url": "https://files.pythonhosted.org/packages/c5/b0/27139508b0ee375162d52e90ea8b15dbb77575d299d405fd4df95f681613/deltadefi-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d170cabebdf03c04474a15ca2c309329127bc70566a26fd8c5668834be4d17e3",
                "md5": "6191d3ad0046d2e257fc2e3c57352f2d",
                "sha256": "49495418dc47fb8b34677202165de953efe72989637914512316d6c1417ad292"
            },
            "downloads": -1,
            "filename": "deltadefi-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "6191d3ad0046d2e257fc2e3c57352f2d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>3.11",
            "size": 103490,
            "upload_time": "2025-09-01T21:55:32",
            "upload_time_iso_8601": "2025-09-01T21:55:32.232656Z",
            "url": "https://files.pythonhosted.org/packages/d1/70/cabebdf03c04474a15ca2c309329127bc70566a26fd8c5668834be4d17e3/deltadefi-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-01 21:55:32",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "deltadefi"
}
        
Elapsed time: 4.25943s