DXSP (DeX SwaP), A defi swap helper package. Swap made easy.
Project description
DXSP (DeX SwaP)
A python defi swap helper package. Swap made easy | |
---|---|
|
Key blockchains (ETH, BSC, ARB, MATIC, OPT...) Key swap protocol (Uni and 0x) |
Key features:
- Any blockchains mainnet or testnet supported by web3py, uniswap type router (uniswap, pancakeswap) or 0x.
Other features:
- Translate token symbol to contract address via user defined tokenlist format or coingecko API
- Connect to web3 automatically or use your own w3
- Approve contract and sign transaction
- Quote a given token
- Use Base trading symbol like stablecoin for risk management approach
- Settings to use the module for your own setup
Install
pip install dxsp
How to use it
from dxsp import DexSwap
dex = DexSwap()
#BUY 10 USDC to SWAP with BITCOIN
demo_tx = await dex.get_swap('USDT','wBTC',10)
print("demo_tx ", demo_tx)
Example
Real use case
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dxsp-3.1.1.tar.gz
(11.2 kB
view details)
Built Distribution
dxsp-3.1.1-py3-none-any.whl
(11.8 kB
view details)
File details
Details for the file dxsp-3.1.1.tar.gz
.
File metadata
- Download URL: dxsp-3.1.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.3 tqdm/4.65.0 importlib-metadata/6.7.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f3040ca7ec15a0569aba0296734572eb8473b7aa0092a5b62f42504cb144389 |
|
MD5 | e4465fd8a5b58c5db4614d58655f5531 |
|
BLAKE2b-256 | f0fc66c2fb36ab4db3ea3f918bb23e9c64d539d393c5578efe5f5f2de6e6c246 |
File details
Details for the file dxsp-3.1.1-py3-none-any.whl
.
File metadata
- Download URL: dxsp-3.1.1-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.3 tqdm/4.65.0 importlib-metadata/6.7.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82cc1322f8dc038cfc8eda2835fa93bcc909b8066a726f84c6d0a21e23f9718f |
|
MD5 | 0e1c8a0c58567c69f6709716637b8090 |
|
BLAKE2b-256 | 34e36655d06666dc1d211e6b3909df1df9742d02dc6196c2d45cf6a789d29bea |