Skip to content

WestWallet/westwallet-python-api

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

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

westwallet-python-api

PyPI

westwallet-python-api is a WestWallet Public API wrapper for Python programming language. Use it for building payment solutions.

Installing

Install from pypi:

pip install -U westwallet-api

Install from latest source code (may be unstable):

pip install git+git://github.com/WestWallet/westwallet-python-api

Create withdrawal example

# Send 0.1 ETH to 0x57689002367b407f031f1BB5Ef2923F103015A32
from westwallet_api import WestWalletAPI
from westwallet_api.exceptions import InsufficientFundsException, BadAddressException

client = WestWalletAPI("your_api_key", "your_api_secret")
try:
    sent_transaction = client.create_withdrawal(
        "ETH", "0.1", "0x57689002367b407f031f1BB5Ef2923F103015A32"
    )
except InsufficientFundsException:
    # handle this case
    pass
except BadAddressException:
    # handle also this case
    pass
else:
    print(sent_transaction.__dict__)

Generate address example

from westwallet_api import WestWalletAPI

client = WestWalletAPI("your_api_key", "your_api_secret")
address = client.generate_address("XRP")
print(address.address, address.dest_tag)

Documentation

Other languages