dydx-v4-python


Namedydx-v4-python JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/amiwrpremium/dydx-v4-python
SummarydYdX Chain Client
upload_time2023-12-18 15:26:07
maintainer
docs_urlNone
authorAMiWR
requires_python>=3.9,<4.0
licenseMIT
keywords dydx dydx-v4 dydx-v4-python dydx-python dydx-v4-client dydx-client dydx-v4-python-client dydx-python-client dydx-v4-python-sdk dydx-python-sdk dydx-v4-python-api dydx-python-api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center"><img src="https://dydx.exchange/icon.svg?" width="256" /></p>

<h1 align="center">dYdX Chain Client for Python</h1>

<div align="center">
  <a href='https://pypi.org/project/v4-client-py'>
    <img src='https://img.shields.io/pypi/v/v4-client-py.svg' alt='PyPI'/>
  </a>
  <a href='https://github.com/dydxprotocol/v4-clients/blob/main/v4-client-py/LICENSE'>
    <img src='https://img.shields.io/badge/License-AGPL_v3-blue.svg' alt='License' />
  </a>
</div>

Python client for dYdX (v4 API).

The library is currently tested against Python versions 3.9, and 3.11.

## Installation

The `v4-client-py` package is available on [PyPI](https://pypi.org/project/v4-client-py). Install with `pip`:

```bash
pip install v4-client-py
```

## Getting Started

Sample code is located in examples folder

## Development Setup - VS Code

Install Microsoft Python extensions
```
Shift-Command-P: Create Python Environment
Select Venv
Select Python 3.9 as interpreter
Select requirements.txt as the dependencies to install
```


Install requirements
```
pip install -r requirements.txt
```

VS Code will automatically switch to .venv environment when running example code. Or you can manually switch

```
source ~/<project_dir>/.venv/bin/activate
```

Set PYTHONPATH

```
export PYTHONPATH=~/<project_dir>/.venv/lib/<Python version>/site-packages
```

## Troubleshootimg

Cython and Brownie must be installed before cytoolz

If there is any issue with cytoolz, uninstall cytoolz, Brownie and Cython, reinstall Cython, Brownie and cytoolz sequentially.

VS Code may need to be restarted to have Cython functioning correctly


## Running examples

Select the file to be debugged
Select the debug button on the left
Select "Python: Current File" 

## Running tests

Integration tests uses testnet environment for testing. We use pytest.

To install pytest

```
pip install pytest
```

For read-only integration tests, run:

```
pytest -v
```

For integration tests with transactions, a subaccount must exist for the specified address.
This subaccount may be reset when testnet environment is reset. To create the subaccount, run

examples/faucet_endpoint.py

Wait for a few seconds for the faucet transaction to commit, then run

```
pytest -v -c pytest_integration.ini 
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/amiwrpremium/dydx-v4-python",
    "name": "dydx-v4-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "dydx,dydx-v4,dydx-v4-python,dydx-python,dydx-v4-client,dydx-client,dydx-v4-python-client,dydx-python-client,dydx-v4-python-sdk,dydx-python-sdk,dydx-v4-python-api,dydx-python-api",
    "author": "AMiWR",
    "author_email": "amiwrpremium@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/58/cf/6e54118265256bb6e6424acc65a75c83e6a14cd3b673d763401b3a5ce049/dydx_v4_python-0.0.4.tar.gz",
    "platform": null,
    "description": "<p align=\"center\"><img src=\"https://dydx.exchange/icon.svg?\" width=\"256\" /></p>\n\n<h1 align=\"center\">dYdX Chain Client for Python</h1>\n\n<div align=\"center\">\n  <a href='https://pypi.org/project/v4-client-py'>\n    <img src='https://img.shields.io/pypi/v/v4-client-py.svg' alt='PyPI'/>\n  </a>\n  <a href='https://github.com/dydxprotocol/v4-clients/blob/main/v4-client-py/LICENSE'>\n    <img src='https://img.shields.io/badge/License-AGPL_v3-blue.svg' alt='License' />\n  </a>\n</div>\n\nPython client for dYdX (v4 API).\n\nThe library is currently tested against Python versions 3.9, and 3.11.\n\n## Installation\n\nThe `v4-client-py` package is available on [PyPI](https://pypi.org/project/v4-client-py). Install with `pip`:\n\n```bash\npip install v4-client-py\n```\n\n## Getting Started\n\nSample code is located in examples folder\n\n## Development Setup - VS Code\n\nInstall Microsoft Python extensions\n```\nShift-Command-P: Create Python Environment\nSelect Venv\nSelect Python 3.9 as interpreter\nSelect requirements.txt as the dependencies to install\n```\n\n\nInstall requirements\n```\npip install -r requirements.txt\n```\n\nVS Code will automatically switch to .venv environment when running example code. Or you can manually switch\n\n```\nsource ~/<project_dir>/.venv/bin/activate\n```\n\nSet PYTHONPATH\n\n```\nexport PYTHONPATH=~/<project_dir>/.venv/lib/<Python version>/site-packages\n```\n\n## Troubleshootimg\n\nCython and Brownie must be installed before cytoolz\n\nIf there is any issue with cytoolz, uninstall cytoolz, Brownie and Cython, reinstall Cython, Brownie and cytoolz sequentially.\n\nVS Code may need to be restarted to have Cython functioning correctly\n\n\n## Running examples\n\nSelect the file to be debugged\nSelect the debug button on the left\nSelect \"Python: Current File\" \n\n## Running tests\n\nIntegration tests uses testnet environment for testing. We use pytest.\n\nTo install pytest\n\n```\npip install pytest\n```\n\nFor read-only integration tests, run:\n\n```\npytest -v\n```\n\nFor integration tests with transactions, a subaccount must exist for the specified address.\nThis subaccount may be reset when testnet environment is reset. To create the subaccount, run\n\nexamples/faucet_endpoint.py\n\nWait for a few seconds for the faucet transaction to commit, then run\n\n```\npytest -v -c pytest_integration.ini \n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "dYdX Chain Client",
    "version": "0.0.4",
    "project_urls": {
        "Homepage": "https://github.com/amiwrpremium/dydx-v4-python",
        "Repository": "https://github.com/amiwrpremium/dydx-v4-python"
    },
    "split_keywords": [
        "dydx",
        "dydx-v4",
        "dydx-v4-python",
        "dydx-python",
        "dydx-v4-client",
        "dydx-client",
        "dydx-v4-python-client",
        "dydx-python-client",
        "dydx-v4-python-sdk",
        "dydx-python-sdk",
        "dydx-v4-python-api",
        "dydx-python-api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5a10a6194ff873cf9850b3dca96da6cb8d04762afe9e457db143c55ff3a42b76",
                "md5": "429bd22f18fcc088d08c685c2943f7f2",
                "sha256": "54430abde25140b8f015141e610a2295bf1ab58bd6473ada65efec500dddae33"
            },
            "downloads": -1,
            "filename": "dydx_v4_python-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "429bd22f18fcc088d08c685c2943f7f2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 88348,
            "upload_time": "2023-12-18T15:26:06",
            "upload_time_iso_8601": "2023-12-18T15:26:06.519954Z",
            "url": "https://files.pythonhosted.org/packages/5a/10/a6194ff873cf9850b3dca96da6cb8d04762afe9e457db143c55ff3a42b76/dydx_v4_python-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58cf6e54118265256bb6e6424acc65a75c83e6a14cd3b673d763401b3a5ce049",
                "md5": "73c626aa34c0d0fdf6dafd5643b183f4",
                "sha256": "2ab0018abf3e6e706b1e9906ade7dd4a98ab83abed0714d087d4a8566ff810de"
            },
            "downloads": -1,
            "filename": "dydx_v4_python-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "73c626aa34c0d0fdf6dafd5643b183f4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 47188,
            "upload_time": "2023-12-18T15:26:07",
            "upload_time_iso_8601": "2023-12-18T15:26:07.839823Z",
            "url": "https://files.pythonhosted.org/packages/58/cf/6e54118265256bb6e6424acc65a75c83e6a14cd3b673d763401b3a5ce049/dydx_v4_python-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-18 15:26:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "amiwrpremium",
    "github_project": "dydx-v4-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "dydx-v4-python"
}
        
Elapsed time: 0.18052s