Skip to main content

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:

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.

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.

# 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.

# 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.

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:

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

Metadata

Release files for deltadefi 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deltadefi 1.1.1
File Size Uploaded Provenance Actions
deltadefi-1.1.1.tar.gz 109.0 kB Without provenance Details for deltadefi-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deltadefi 1.1.1
File Interpreter ABI Platform Actions
deltadefi-1.1.1-py3-none-any.whl Python 3 none any Details for deltadefi-1.1.1-py3-none-any.whl

Total release size: 132.1 kB

Release files / deltadefi-1.1.1.tar.gz

Download URL deltadefi-1.1.1.tar.gz
Size 109.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c2bc703d12c5d15f9f517340a274d6174e95ea00347ab8012a37ae9cf19740b7
BLAKE2b-256 checksum
How to use checksums
583c3373fd3469a89e9388224a4e554970c2b1b4e453aec684b7f5759decb9a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / deltadefi-1.1.1-py3-none-any.whl

Download URL deltadefi-1.1.1-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59bd2bc8b7470efc7d4bc84c080c5f6f9c2a483f248f6b45ad745cc3e300f905
BLAKE2b-256 checksum
How to use checksums
676984b2ba2134a4a5794feded714b980db3ebab9781c98dc46b5db6b68a7505
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for deltadefi 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page