This branch of the Duino-Coin repository contains documentation for public API calls that can be useful for anyone trying to make their own Duino-related app.
- Communicating with the master server
- Over a TCP connection
- Over a WebSocket connecton
- List of server commands
- Communicating with a Mining Pool
- Duino-Coin REST API
- Duino-Coin Python API
- Duino-Coin JSON user data
- Icons, colors - branding
Before starting, make sure your app doesn't create more more than 50 connections in time shorter than 30 seconds, if you do that, the server may ban your IP address for creating too much traffic.
To communicate with the master server, create a simple tcp connection to one of the following addresses:
51.15.127.80:2811
51.15.127.80:2812
51.15.127.80:2813
51.15.127.80:2814
51.15.127.80:2815
Note: you can also use server.duinocoin.com
instead of 51.15.127.80
The current IP adress is always here too: https://raw.githubusercontent.com/revoxhere/duino-coin/gh-pages/serverip.txt
To communicate with the master server, create a secure websocket (wss) connection to one of the following addresses:
wss://server.duinocoin.com:14808
- Proxied to PulsePool - only mining commands acceptedwss://server.duinocoin.com:15808
Right after connecting, the server will send its version, e.g. 2.4
.
After connecting you can send LOGI,username,password
request to login or REGI,username,password,email
to request registration of a new account (see below).
You can also send JOB
request to receive job for mining.
To login, send LOGI,username,password
- replace username and password with credentials.
After sucessfull login server will send OK
.
If login fails, server will send NO,reason of failed login
.
To register, send REGI,username,password,email
- replace the placeholders with the respective data.
After sucessful registration, the server will send OK
.
If the registration fails, the server will send NO,reason of failed registration
.
These commands are only available after a successfull login:
After sending PING
the server will return Pong!
as fast as it can
After sending BALA
the server will return balance of the current logged-in user
After sending UEXI,username
the server will check if the user is registered.
If this wallet is taken, the reply will be NO,User is not registered
If not, the response will be OK,User is registered
.
After sending JOB,username
(or JOBXX,username
for XXHASH) the server will return job for mining using DUCO-S1.
You can ask for a specific start difficulty: JOB,username,diff
where diff is one of the below:
LOW
- used for mining on Web Miner, RPis, PCMEDIUM
- used for mining on PCNET
- used for mining on PC (network difficulty)EXTREME
- not used anywhere officially
When sending the mining result you can pass the hashrate count and the name of the miner along with rig name to display in the API.
Example: sending 6801,250000,My Cool Miner v4.20,House Miner
indicates that result 6801 was found, the hashrate was 250000H/s (250kH/s)
and the name of the software was "My Cool Miner v4.20" with a rig named "House Miner".
If hashrate is not received, server estimates it from time it took to receive share and sets "Is estimated": "True"
in the API
If software name is not received, server uses "Software": "Unknown"
in the API
If rig name is not received, server uses "Identifier": "None"
in the API
After sending JOBXX
the server will return job for mining using XXHASH algorithm.
The documentation is the same as with the DUCO-S1 job protocol but only XXHASH
difficulty is available.
After sending SEND,message,recipients_username,amount
the server will attempt to send funds to recipients_username
.
The server will return a message about the state of the transaction.
A successfull transaction will return OK,Successfully transferred funds,transaction_hash
where transaction_hash is the unique hash of each transaction that
can be checked in the explorer.
After sending GTXL,username,num
the server will return last num
of transactions involving username
(both deposits and withdrawals) in JSON format.
After sending CHGP,oldPassword,newPassword
the server will change password of current user.
After sending WRAP,amount,tronAddress
the server will wrap DUCO on the Tron network (transfer to wDUCO).
- Send a Tron transaction - e.g.
initiateWithdraw(duco_username, amount)
- Send
UNWRAP,amount,tron_address
to the server
To reduce server load, its better to mine on a Pool.
You can get the pool connection details here:
https://server.duinocoin.com/getPool
It works like the main server, but only mining commands are accepted. More docs here.
Documentation for the DUCO REST api is available here: duco-rest-api.
To access these functions, just add the query URL after the server address: https://server.duinocoin.com/<query>
.
BackrndSource's pyduinocoin
library can be found here: BackrndSource/pyduinocoin
You can use one of the following links to get some data from Duino-Coin Server:
-
General statistics & worker API refreshed every 5s
- HTTPS:
https://server.duinocoin.com/api.json
- HTTP:
http://51.15.127.80/api.json
- Small part of the response:
{ "_Duino-Coin Public master server JSON API": "https://github.com/revoxhere/duino-coin", "Server version": 2.2, "Active connections": 1039, "Open threads": 13, "Server CPU usage": 61.0, "Server RAM usage": 9.73, "Last update": "24/03/2021 12:45 (UTC)" }
- HTTPS:
-
User balances API refreshed every 10s
- HTTPS:
https://server.duinocoin.com/balances.json
- HTTP:
http://51.15.127.80/balances.json
- Small part of the response:
Note: only users who have account balance greater than 0 are listed in this API.
{ "magicsky": "3112.6 DUCO", "lulkas": "3047.01 DUCO", "revox": "2884.1194 DUCO", "ethux": "2812.2677 DUCO", "metal93": "2685.5714 DUCO" }
- HTTPS:
-
Transactions API refreshed every 10s
- HTTPS:
https://server.duinocoin.com/transactions.json
- HTTP:
http://51.15.127.80/transactions.json
- Small part of the response:
"8bba65e9c2b8371f2dfd686a4465a530d8985861": { "Date": "23/01/2021", "Time": "11:23:41", "Sender": "revox", "Recipient": "ATAR4XY", "Amount": 2.0 }
- HTTPS:
-
Found blocks API refreshed every 15s
- HTTPS:
https://server.duinocoin.com/foundBlocks.json
- HTTP:
http://51.15.127.80/foundBlocks.json
- Small part of the response:
"e39c8c290b3478d3d5c21a6caffd44d6799e0ae9": { "Date": "09/02/2021", "Time": "08:28:40", "Finder": "revox", "Amount generated": 7.00026306 }
- HTTPS:
We suggest using these colors in creating DUCO-Related apps:
- White accent:
#fafafa
- Orange accent:
#ff4112
- Sun yellow accent:
#ffb412
- Magenta accent:
#f31291
- Dark accent:
#121212
Gradient variations of the colors above are a welcome touch.
More resources available in the Resources folder