Skip to content

wepobid/python-localcoinswap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://static.localcoinswap.com/exchange/assets/images/logo_primary_white_bg_192.png

Python module for LocalCoinSwap

Welcome to the documentation for the localcoinswap Python module.

This module provides a set of tools for interacting with LocalCoinSwap APIs in Python.

Project homepage: https://github.com/LocalCoinSwap/python-localcoinswap

Quick Start

  1. Register an account with LocalCoinSwap
  2. Generate API token (Settings -> APIs)
  3. Clone and install python-localcoinswap from GitHub:
git clone https://github.com/LocalCoinSwap/python-localcoinswap.git
cd python-localcoinswap
# create and enable virtualenv (optional)
virtualenv -p python3 venv
source venv/bin/activate
# install requirements
pip install -r requirements.txt
python setup.py install
  1. Start using this library:
from localcoinswap.client import Client
from localcoinswap.formatters import print_deposit_address, print_ads
from localcoinswap.utils import get_currency_id

# Setup api client
client = Client("my_api_token")

# Get all wallets
wallet = client.get_wallet()

# Get and print deposit information for Bitcoin
print_deposit_address(client.get_deposit_address('BTC'))

# Get top 10 ads (buy or sell) for Ethereum sorted by popularity
#  prepare filters:
filters = {
    'limit': 10,
    'coin_currency': get_currency_id(client.trade_params, 'Ethereum'),
    'ordering': '-popularity'
}
#  get parsed ad data
ads = client.get_ads(filters)
#  print ads (optional)
print_ads(ads)

About

Python module for LocalCoinSwap APIs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages