Skip to content

b1r3k/walutomatpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

walutomatpy

Python wrapper around Walutomat API version 2.0

Installation

    $ pip install walutomatpy

Usage

from walutomatpy import WalutomatClient
from walutomatpy import AccountBalances


def get_client(api_key, path_to_private_key):
    with open(path_to_private_key, 'r') as fd:
        private_key = fd.read()
    client = WalutomatClient(api_key, private_key, 'api.walutomat.pl')
    return client


def example(api_client):
    balances_raw = api_client.get_account_balances()
    balances = AccountBalances(balances_raw)
    logger.info('Account balances: %s', balances)
    orders = api_client.get_p2p_active_orders()
    if orders:
        logger.info('Active orders:')
        for order in orders:
            logger.info(order)
    else:
        logger.info('No active orders!')

client = get_client(api_key, private_key_path)
example(client)

About

Python wrapper around Walutomat API

Resources

License

Stars

Watchers

Forks

Packages

No packages published