Skip to main content

Python wrappers for permaswap

Project description

permaswap.py

python sdk for permaswap

install

pip install permaswap

usage

  1. perpare everpay account
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)
  1. init permaswap
router_host = 'wss://router0-dev.permaswap.network/'
swap = permaswap.Permaswap(router_host, account)
  1. query order
# get_order('token_in', 'token_out', 'amount_in')
# sell 1 tar for tusdc
order = swap.get_order('tAR', 'tUSDC', 10**12)
print(order)
  1. place order
result = swap.place_order(order)
print(result)

Project details


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

Uploaded Source

File details

Details for the file permaswap-0.1.1.tar.gz.

File metadata

  • Download URL: permaswap-0.1.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for permaswap-0.1.1.tar.gz
Algorithm Hash digest
SHA256 399e52cf8312fe4132585d7c494dedcb63a99f7bba3f9fb170e223f230de2dff
MD5 6fbc3e7be1343a0cd9dcfe242cbd2216
BLAKE2b-256 a81c203e568e785826f3b09a889e9e9728cdbe66f2239818ff314f28b48d080f

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