Skip to main content

DXSP (DeX SwaP), A defi swap helper package. Easy peasy Swap.

Project description

dxsp

DXSP (DeX SwaP), A defi swap helper package. Easy peasy Swap.

Pypi Version

Install

pip install dxsp

How to use it

from dxsp import DexSwap
dex = DexSwap(w3,chain_id,wallet_address,private_key,protocol,dex_exchange,block_explorer_api)
tx = await dex.get_swap(10,'USDC','wBTC')
print(tx)

2 swap protocol mode are supported:

  • 1inch API v5 (#1 default)
  • Uniswap version 2 router DEX type (#2)

Limit SWAP via 1inch API v3 and Uniswap version to be done

.Env

Mandatory

  • None

Optional

  • TOKENLIST: URL of a standard token list following tokenlist.org format
  • TESTTOKENLIST: URL of a standard testnet token list following tokenlist.org format

Example

SHORT

Swap 10 USDC for BITCOIN on OPT chain:

	from dxsp import DexSwap
	dex = DexSwap(chain_id=10,wallet_address='0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',private_key='0x111111111117dc0aa78b770fa6a738034120c302',block_explorer_api='1X23Q4ACZ5T3KXG67WIAH7X8C510F1972TM')
	swap = await dex.get_swap('USDC','wBTC',10)

LONG

example

	DexSwap details

Real case

TalkyTrader, submit trading order to CEX & DEX with messaging platform (Telegram, Matrix and Discord)

Roadmap

V1

- 1inch API v5 (#1 default)
- Uniswap version 2 router DEX type (#2)
- Limit SWAP via 1inch API v3 (#3)

V2

- Uniswap V3 Support
- Ox or other API based swap or orderbook platfrom

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-0.0.40.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

dxsp-0.0.40-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file dxsp-0.0.40.tar.gz.

File metadata

  • Download URL: dxsp-0.0.40.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for dxsp-0.0.40.tar.gz
Algorithm Hash digest
SHA256 838a223ee9d035c1be24e935ce16e41ffd0be620ee0688b8a4f4027e561b5e12
MD5 562159625bc3a3373395eec040337951
BLAKE2b-256 d49523eafe9df0e8d0eea88aab1584177ffe47b5740395358f0f37846f17b6a7

See more details on using hashes here.

File details

Details for the file dxsp-0.0.40-py3-none-any.whl.

File metadata

  • Download URL: dxsp-0.0.40-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for dxsp-0.0.40-py3-none-any.whl
Algorithm Hash digest
SHA256 48cb3c687ef245da17f7a59cf5de69121f97f420f10963406bd2542889f0a632
MD5 4b4a8b18eeaa86a488c405840e1007a7
BLAKE2b-256 7ad9bd560b3e7ea02ab882265244c5759b4c7eaf643ec9386b182a14fe113e7c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page