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
1.2.0
1.1.0
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.31
1.0.30
1.0.3
1.0.29
1.0.28
1.0.27
1.0.26
1.0.25
1.0.24
1.0.23
1.0.22
1.0.21
1.0.20
1.0.2
1.0.19
1.0.18
1.0.17
1.0.16
1.0.15
1.0.14
1.0.13
1.0.12
1.0.11
1.0.10
0.0.9
0.0.8
0.0.7
0.0.50
0.0.5
0.0.49
0.0.48
0.0.47
0.0.46
0.0.45
0.0.43
0.0.42
0.0.41
0.0.40
0.0.4
0.0.39
0.0.38
0.0.37
0.0.36
0.0.35
0.0.34
0.0.33
0.0.32
0.0.31
0.0.30
0.0.3
0.0.29
0.0.28
0.0.27
0.0.26
0.0.25
0.0.24
0.0.23
0.0.22
0.0.21
0.0.20
0.0.2
0.0.18
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.1
توضیحات
DXSP (DeX SwaP), A defi swap helper package. Swap made easy.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | dxsp-1.9.9 |
| نام | dxsp |
| نسخه کتابخانه | 1.9.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | mraniki |
| ایمیل نویسنده | 8766259+mraniki@users.noreply.github.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/dxsp/ |
| مجوز | MIT |
# DXSP (DeX SwaP)
|<img width="200" alt="Logo" src="https://user-images.githubusercontent.com/8766259/231213427-63ea2752-13d5-4993-aee2-90671b57fc6e.png"> | A python defi swap helper package. Swap made easy. |
| ------------- | ------------- |
|[](https://pypi.org/project/dxsp/) <br>  [](https://hub.docker.com/r/mraniki/dxsp)<br>[](https://github.com/mraniki/dxsp/actions/workflows/%E2%9C%A8Flow.yml) [](https://codecov.io/gh/mraniki/dxsp) <br><br>[](https://github.com/ethereum/web3.py) [](https://github.com/coingecko)|24 blockchains (ETH, BSC, ARB, MATIC, OPT...)<br>2 swap protocol (1inch API, UniV2 router)
Key features:
- 24 blockchains mainnet and testnet supported with default block explorer, RPC, Router (uniswap and pancakeswap) and protocol url (1inch and 0x). Other blockchains can be supported via function attributes
- 2 swap protocol type supported:
- 1inch API v5
- Uniswap version 2 router protocol type
Other features:
- Translate token symbol to contract address via user defined tokenlist format or coingecko api
- Connect to web3 if no web3 object or no rpc provided
- Able to approve contract and sign transaction
- Quote for a given token
- Use Base symbol like stablecoin
# Install
`pip install dxsp`
# How to use it
```
from dxsp import DexSwap
#SWAP HELPER
dex = DexSwap(chain_id=chain_id,wallet_address=wallet_address,private_key=private_key,block_explorer_api=block_explorer_api)
print("dex ", dex)
#BUY 10 USDC to SWAP with BITCOIN
demo_tx = await dex.get_swap('USDT','wBTC',10)
print("demo_tx ", demo_tx)
#SWAP with your OWN defined exchange like Sushiswap on ARBITRUM
sushi_router = '0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F'
dex_sushi = DexSwap(chain_id=42161,wallet_address=wallet_address,private_key=private_key,block_explorer_api=block_explorer_api,dex_exchange=sushi_router,base_trading_symbol='USDT')
print("dex_sushi ", dex_sushi)
#Execute ORDER to buy 1% of your USDT balance on SUSHISWAP ARBITRUM and get BTC token
demo_order = await dex_sushi.execute_order(direction = 'BUY',symbol = 'wBTC')
print("demo_order ", demo_order)
```
## Example
[example](https://github.com/mraniki/dxsp/blob/main/examples/example.py)
## Real use case
[TalkyTrader, submit trading order to CEX & DEX with messaging platform (Telegram, Matrix and Discord)](https://github.com/mraniki/tt)
# Documentation
https://github.com/mraniki/dxsp/wiki
## 🚧 Roadmap
[🚧 Roadmap](https://github.com/mraniki/dxsp/milestones)
## Questions? Want to help?
[](https://discord.gg/vegJQGrRRa)
[](https://t.me/TTTalkyTraderChat/1)
نیازمندی
| مقدار | نام |
|---|---|
| - | asyncio |
| - | dynaconf |
| - | ping3 |
| - | pycoingecko |
| >=6.0.0 | web3 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10,<3.11 | Python |
نحوه نصب
نصب پکیج whl dxsp-1.9.9:
pip install dxsp-1.9.9.whl
نصب پکیج tar.gz dxsp-1.9.9:
pip install dxsp-1.9.9.tar.gz