To build your own Duino-Coin apps we've created Duino-Coin API for Python 3.
Created by Connorhess, maintained by Alicia426
from ducoapi import api_actions
Initialize the connection to the server
api_connection = api_actions() #creates the api connection instance
The next step is to Login/Register Note: login and register do not require you to init but they close the connection after use
api_connection.login(username="username", password="password")
api_connection.register(username="username", password="password", email="[email protected]")
api_connection.balance() # takes no args
api_connection.transfer(recipient_username='test_user1', amount=1)
api_connection.reset_pass(old_password='123', new_password='abc')
api_connection.getTransactions(7) # 7 is the number of transactions to get
# returns JSON
>>> ducoapi.get_duco_price()
0.01249
>>> ducoapi.start_duco_price_timer(interval = 5) # start the timer that updates the price every 5 seconds
>>> ducoapi.duco_price # you can get the updated price from a global variable <duco_price>
0.01249
import ducoapi
api_connection = api_actions()
api_connection.login(username='YourUsername', password='YourPassword')
current_balance = api_connection.balance()
print(current_balance)
api_connection.close()