Search documentation

Find pages, endpoints, parameters, and guides.

CryptAPI's Python Library

View as Markdown

Requirements

  • Python >= 3.0
  • Requests >= 2.20

Installation

shell
pip install python-cryptapi

API and utils

Importing in your project file

Python
from cryptapi import CryptAPIHelper

Getting coin information

Python
from cryptapi import CryptAPIHelper

# Get specific coin information
coin_info = CryptAPIHelper.get_info('btc')

Where:

  • The parameter is a specific coin you want information about (e.g. 'btc', 'eth', 'erc20_usdt', ...)

Generating a new Address

Python
from cryptapi import CryptAPIHelper

ca = CryptAPIHelper(coin, own_address, callback_url, parameters, ca_params)

address = ca.get_address()['address_in']

Where:

  • coin is the coin you wish to use, from CryptAPI's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...).
  • own_address is your own crypto address, where your funds will be sent to.
  • callback_url is the URL that will be called upon payment.
  • params is any parameter you wish to send to identify the payment, such as {orderId: 1234}.
  • ca_params parameters that will be passed to CryptAPI.
  • address is the newly generated address, that you will show your users in order to receive payments.