Requirements
Python >= 3.0Requests >= 2.20
Installation
shell
pip install python-cryptapiFull Source Code Available: You can find the complete source code, examples, and contribute to this library on our official GitHub repository: github.com/cryptapi/python-cryptapi
API and utils
Importing in your project file
Python
from cryptapi import CryptAPIHelperGetting 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', ...)
Response contains detailed information about the specified coin.
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:
coinis the coin you wish to use, from CryptAPI's supported currencies (e.g 'btc', 'eth', 'erc20_usdt', ...).own_addressis your own crypto address, where your funds will be sent to.callback_urlis the URL that will be called upon payment.paramsis any parameter you wish to send to identify the payment, such as{orderId: 1234}.ca_paramsparameters that will be passed to CryptAPI.addressis the newly generated address, that you will show your users in order to receive payments.
All the params you can provide to ca_params can be found in our