Skip to content

k0t3n/changelly_api

Repository files navigation

Changelly API

Pypi Build Status codecov GitHub Pipenv locked Python version

Changelly API is a python wrapper library over Changelly RPC API.

Please, read the docs before usage.

Usage

from changelly_api import ChangellyAPI

api = ChangellyAPI('<your_api_key_here>', '<your_secret_here>')

# create float rate tx
float_tx = api.create_transaction('btc', 'eth', 1, '<your_addres_here>')

# create fixed rate tx
rate = api.get_fix_rate_for_amount([{'from': 'btc', 'to': 'eth', 'amountFrom': 0.5}])[0]
tx = api.create_fix_transaction(
    currency_from='btc', currency_to='eth',
    payout_address='<your_address_here>', refund_address='<your_address_here>',
    amount_from=rate['amountFrom'], amount_to=rate['amountTo'],
    rate_id=rate['id']
)

Supported methods:

  • getCurrencies
  • getCurrenciesFull
  • getMinAmount
  • getPairsParams
  • getExchangeAmount
  • createTransaction
  • createFixedTransaction
  • getFixRate
  • getFixRateBulk
  • getFixRateForAmount
  • validateAddress
  • getTransactions