Python wrappers for permaswap
Project description
permaswap.py
python sdk for permaswap
install
pip install permaswap
usage
- perpare everpay account
import everpay
api_server = 'https://api-dev.everpay.io'
# eth account
pk = ''
signer = everpay.ETHSigner(pk)
# or ar account
#signer = everpay.ARSigner('arweave-keyfile-xxx.json')
account = everpay.Account(api_server, signer)
- init permaswap
router_host = 'wss://router0-dev.permaswap.network/'
swap = permaswap.Swap(router_host, account)
- query order
import permaswap
# get_order('token_in', 'token_out', 'amount_in')
# sell 1 tar for tusdc
order = swap.get_order('tAR', 'tUSDC', 10**12)
print(order)
- place order
result = swap.place_order(order)
print(result)
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
permaswap-0.1.3.tar.gz
(3.5 kB
view details)
File details
Details for the file permaswap-0.1.3.tar.gz
.
File metadata
- Download URL: permaswap-0.1.3.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b5c18aa12bc39cf3bc8dfe13817f669febcee28acebbccc0601153de397b5ee |
|
MD5 | c1200b69c5789764a2d87a7a8880cdc6 |
|
BLAKE2b-256 | e96017f9b2852864bb20a694616263e32b284934fcbe610a5a9100c72a900ce1 |