Skip to main content

liquidswap-sdk-python

Install

https://pypi.org/project/liquidswap-sdk/ pip install liquidswap-sdk

Functions

import from liquidswap_sdk.client import LiquidSwapClient

new a client liquidswap_client = LiquidSwapClient(node_url, tokens_mapping, wallet_path)

get the output amount from given input amount liquidswap_client.calculate_rates("APTOS", "USDT", 1)

swap token liquidswap_client.swap("APTOS", "USDT", 1, usdt_out)

get token balance liquidswap_client.get_token_balance("APTOS")

register token liquidswap_client.register("USDT")

How to use

  1. create your config

  2. add token addresses you want to trade to tokens_mapping

  3. make sure there is some APT in your wallet of wallet_path

  4. make yout own script! (check: example)

  5. if you are ready to mainnt, change the node_url to https://fullnode.mainnet.aptoslabs.com/v1

WIP:

  • convert_to_decimals
  • calculate_rates
  • swap
  • create pypl package

Release files for liquidswap-sdk 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for liquidswap-sdk 0.0.2
File Size Uploaded
liquidswap_sdk-0.0.2.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for liquidswap-sdk 0.0.2
File Interpreter ABI Platform
liquidswap_sdk-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / liquidswap_sdk-0.0.2.tar.gz

Download URL liquidswap_sdk-0.0.2.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2800dbd5232ac0f77331a71131629fe0c98455afdfccb2dd9d24d762594bb049
BLAKE2b-256 checksum
How to use checksums
746acd69f0c5cfccfbd79004602d00695c8052061a73ab7ea0ae3827687935c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.9

Release files / liquidswap_sdk-0.0.2-py3-none-any.whl

Download URL liquidswap_sdk-0.0.2-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61eb5aabb9a14898d8f313a062a0d193d84c41e35262420a8f3d865b5dcc77d9
BLAKE2b-256 checksum
How to use checksums
a42ac12b972c0193336cde248d2a8c17446d3bdbc878f5a92ce6ebd977fe0865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.9

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page