Skip to main content

A Python SDK for the D2Y Exchange API

Project description

D2Y Python SDK

The D2Y Python SDK is a convenient and user-friendly library for interacting with the D2Y Exchange API. It simplifies the process of accessing and managing data from the D2Y platform and offers an easy-to-use interface for developers.

Installation

To install the D2Y Python SDK, use pip:

pip install d2y

Documentation

For comprehensive documentation, including getting started guides and detailed examples, please visit our official SDK documentation.

Running tests

  • Create a .env file inside the tests folder and populate with the following variables: API_KEY, API_SECRET, TEST_INSTRUMENT_NAME, LINKED_SIGNER_KEY
  • For tests to pass the api key and secret should be from a fresh user, linked signer key should be associated with the same user and the instrument name should have an empty book
  • Optionally specify API_BASE_URL env var if you want to test locally, by default it points to testnet
  • Create venv and install packages from requirements.txt and enter venv source venv/bin/activate
  • By default the last published version of d2y packge is installed. But for testing of the current d2y changes you must run pip install -e .
  • Run tests python tests/test_sdk.py

Updating package

  • Increment version number in setup.py
  • Delete existing dist/ directory
  • Add any new required packages to setup.py
  • Build package: python setup.py sdist bdist_wheel
  • Upload to PyPI: twine upload dist/*

TODO

  • Add constants for different environents like CHAIN_ID

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

d2y-0.0.11.tar.gz (12.9 kB view hashes)

Uploaded Source

Built Distribution

d2y-0.0.11-py3-none-any.whl (13.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page