uniswap-sdk


Nameuniswap-sdk JSON
Version 0.1.0b3 PyPI version JSON
download
home_pagehttps://github.com/ApeWorX/uniswap-sdk
Summaryuniswap-sdk: SDK for Uniswap smart contracts
upload_time2024-10-26 15:11:49
maintainerNone
docs_urlNone
authorApeWorX Ltd.
requires_python<4,>=3.8
licenseApache-2.0
keywords ethereum
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Uniswap SDK

**NOTE: Work In Progress**

## Usage

**NOTE: Sketch of potential usage**
```py
from ape_tokens import tokens
from uniswap_sdk import v2 as uni_v2

# Uses v2's TWAP oracle pricing algorithm
price = uni_v2.price(base=tokens["USDC"], quote=tokens["YFI"])
print(f"Buying 100k USDC worth of YFI at {price} USDC/YFI")

# Will automatically discover best possible route for given trade on Uniswap v2
# NOTE: Slippage and timeout are configurable
uni_v2.swap(base=tokens["USDC"], quote=tokens["YFI"], amount_in="100_000 USDC", sender=trader)
```

```py
# Eventual goal?
import uniswap_sdk as uni

# Finds most liquid price across v2 and v3
price = uni.price(base=tokens["USDC"], quote=tokens["YFI"])

# Performs best swap between v2 and v3
uni.swap(base=tokens["USDC"], quote=tokens["YFI"], amount_in="100_000 USDC", sender=trader)
```

## Dependencies

* [python3](https://www.python.org/downloads) version 3.7 or greater, python3-dev

## Installation

### via `pip`

You can install the latest release via [`pip`](https://pypi.org/project/pip/):

```bash
pip install uniswap_sdk
```

### via `setuptools`

You can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:

```bash
git clone https://github.com/SilverBackLtd/uniswap-sdk.git
cd uniswap-sdk
python3 setup.py install
```

## Quick Usage

TODO: Describe library overview in code

## Development

This project is in development and should be considered a beta.
Things might not be in their final state and breaking changes may occur.
Comments, questions, criticisms and pull requests are welcomed.

## License

This project is licensed under the [Apache 2.0](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ApeWorX/uniswap-sdk",
    "name": "uniswap-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.8",
    "maintainer_email": null,
    "keywords": "ethereum",
    "author": "ApeWorX Ltd.",
    "author_email": "admin@apeworx.io",
    "download_url": "https://files.pythonhosted.org/packages/22/ec/9a6259abd13def2d4d8ee66da1b54dd650dc6b6f89507ad9106847024944/uniswap-sdk-0.1.0b3.tar.gz",
    "platform": null,
    "description": "# Uniswap SDK\n\n**NOTE: Work In Progress**\n\n## Usage\n\n**NOTE: Sketch of potential usage**\n```py\nfrom ape_tokens import tokens\nfrom uniswap_sdk import v2 as uni_v2\n\n# Uses v2's TWAP oracle pricing algorithm\nprice = uni_v2.price(base=tokens[\"USDC\"], quote=tokens[\"YFI\"])\nprint(f\"Buying 100k USDC worth of YFI at {price} USDC/YFI\")\n\n# Will automatically discover best possible route for given trade on Uniswap v2\n# NOTE: Slippage and timeout are configurable\nuni_v2.swap(base=tokens[\"USDC\"], quote=tokens[\"YFI\"], amount_in=\"100_000 USDC\", sender=trader)\n```\n\n```py\n# Eventual goal?\nimport uniswap_sdk as uni\n\n# Finds most liquid price across v2 and v3\nprice = uni.price(base=tokens[\"USDC\"], quote=tokens[\"YFI\"])\n\n# Performs best swap between v2 and v3\nuni.swap(base=tokens[\"USDC\"], quote=tokens[\"YFI\"], amount_in=\"100_000 USDC\", sender=trader)\n```\n\n## Dependencies\n\n* [python3](https://www.python.org/downloads) version 3.7 or greater, python3-dev\n\n## Installation\n\n### via `pip`\n\nYou can install the latest release via [`pip`](https://pypi.org/project/pip/):\n\n```bash\npip install uniswap_sdk\n```\n\n### via `setuptools`\n\nYou can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:\n\n```bash\ngit clone https://github.com/SilverBackLtd/uniswap-sdk.git\ncd uniswap-sdk\npython3 setup.py install\n```\n\n## Quick Usage\n\nTODO: Describe library overview in code\n\n## Development\n\nThis project is in development and should be considered a beta.\nThings might not be in their final state and breaking changes may occur.\nComments, questions, criticisms and pull requests are welcomed.\n\n## License\n\nThis project is licensed under the [Apache 2.0](LICENSE).\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "uniswap-sdk: SDK for Uniswap smart contracts",
    "version": "0.1.0b3",
    "project_urls": {
        "Homepage": "https://github.com/ApeWorX/uniswap-sdk"
    },
    "split_keywords": [
        "ethereum"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6766d78e03dc66ef414325da0f702a3b0512eade58bcb77065a113c84e9e59eb",
                "md5": "576a11bb62a53cfdc7f31cb43fe9ba68",
                "sha256": "8609f05e9fb57219a434b4a84dbdc3eba4a4438a1f7230ee764c02bd4be582d2"
            },
            "downloads": -1,
            "filename": "uniswap_sdk-0.1.0b3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "576a11bb62a53cfdc7f31cb43fe9ba68",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.8",
            "size": 20900,
            "upload_time": "2024-10-26T15:11:47",
            "upload_time_iso_8601": "2024-10-26T15:11:47.541632Z",
            "url": "https://files.pythonhosted.org/packages/67/66/d78e03dc66ef414325da0f702a3b0512eade58bcb77065a113c84e9e59eb/uniswap_sdk-0.1.0b3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22ec9a6259abd13def2d4d8ee66da1b54dd650dc6b6f89507ad9106847024944",
                "md5": "318ea440d94de75505daa0dd8005d448",
                "sha256": "7059272d063d0b5b28977cfac9ea4bc161c23ce7c5b891e586c6e8c95eee279b"
            },
            "downloads": -1,
            "filename": "uniswap-sdk-0.1.0b3.tar.gz",
            "has_sig": false,
            "md5_digest": "318ea440d94de75505daa0dd8005d448",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8",
            "size": 28430,
            "upload_time": "2024-10-26T15:11:49",
            "upload_time_iso_8601": "2024-10-26T15:11:49.078266Z",
            "url": "https://files.pythonhosted.org/packages/22/ec/9a6259abd13def2d4d8ee66da1b54dd650dc6b6f89507ad9106847024944/uniswap-sdk-0.1.0b3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-26 15:11:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ApeWorX",
    "github_project": "uniswap-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "uniswap-sdk"
}
        
Elapsed time: 0.37818s