Skip to content

SwingbyProtocol/python-sdk

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Swingby SDK for Python

An implementation of the Swingby standard development kit for Python3.

Features:

  • Official implementation
  • Http Client
  • Tustless swaps between ECDSA chains

Instillation

git clone https://github.com/SwingbyProtocol/python-sdk.git"
pip install ./python-sdk

Quickstart

Initiate a HTTP connection to one of our testnet nodes:

from swingby import NodeHttpClient
node = NodeHttpClient("https://testnet-node.swingby.network")

Create a trustless swap deposit

node = NodeHttpClient("https://testnet-node.swingby.network")
addr_to = "tbnb1dedxffvl324ggfdpxl0gw5hwylc848ztuy7g7c"
sr = node.swap(address_to=addr_to, amount="1.1", currency_from="BTC", currency_to="BTC.B")

Query last 5 completed swaps

node = NodeHttpClient("https://testnet-node.swingby.network")
swaps = node.query_swaps(page_size=5, status="COMPLETED")

for more examples on how to retrieve data from a node and interact with the Swingby network, please head to the examples examples/ folder.

Docs

For documentation on our node API, please visit testnet-node.swingby.network/docs.

Useful links

About

πŸ”Œ Python 3.0 SDK for Skybridge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages