# 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](https://d2y.readme.io/docs/getting-started).

## 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
- Make sure correct version of d2y is installed in requirements.txt and update with any new packages that are required
- Delete existing `dist/` directory
- Build package: `python setup.py sdist bdist_wheel`
- Upload to PyPI: `twine upload dist/*`