https://pypi.org/project/liquidswap-sdk/
pip install liquidswap-sdk
from liquidswap_sdk.client import LiquidSwapClient
liquidswap_client = LiquidSwapClient(node_url, tokens_mapping, wallet_path)
liquidswap_client.calculate_rates("APTOS", "USDT", 1)
liquidswap_client.swap("APTOS", "USDT", 1, usdt_out)
liquidswap_client.get_token_balance("APTOS")
liquidswap_client.register("USDT")
-
create your config
-
add token addresses you want to trade to
tokens_mapping
-
make sure there is some APT in your wallet of
wallet_path
-
make yout own script! (check: example)
-
if you are ready to
mainnt
, change thenode_url
tohttps://fullnode.mainnet.aptoslabs.com/v1
- convert_to_decimals
- calculate_rates
- swap
- create pypl package