Skip to content

WestWallet/westwallet-python-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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