Usage of our API is really simple - just create a GET request to the desired endpoint. For example, to get the Magi network stats, just open the
Python example:
Available endpoints
GET
/statistics
- info/stats related to the Magi network
Example output:
{
"result": {
"blocks": 3252534,
"blocktx": 0,
"difficulty": {
"pos": 0.00389869,
"pow": 0.51841158
},
"hashrate": 8657484,
"hours_to_stake": "unknown",
"price": {
"btcpop": 0.00243984,
"ducoexchange": 0.00032753,
"max": 0.00243984,
"moondex": 0
},
"reward": 19.93486563,
"stake_interest": 0.03930132,
"total_balance": 50257.69530399,
"users": 810
},
"success": true
}
GET
/all_balances
- return all users and their balances (above 0.0) registered on magi.duinocoin.com
Example output:
{
"result": {
"revox": {
"address": "95JLhkyWVDce5D17LyApULc5YC4vrVzaio",
"balance": 34631.39634922,
"currency": "XMG",
"username": "revox"
},
"revox2": {
"address": "9Nnp5tCuDQ6gFCPx1t8vzg3L31yDnhBNzQ",
"balance": 0.0049,
"currency": "XMG",
"username": "revox2"
}
},
"success": true
}
GET
/transactions/TXID
- info about a transaction by its TXID
Example output:
{
"result": {
"amount": 2.995,
"block": "01dc6a675f999cc3b55fdae4f874ecc251d929f644535445b742c14cfcf09f37",
"confirmations": 43,
"currency": "XMG",
"datetime": "2021-10-29 10:14:02",
"fee": 0.0002,
"hash": "38712cabb97235257cfbf42b0e20b8533722d86d3f95809ac164c6a11de6a9f2",
"memo": "none",
"recipient": "revox (9GuFv2TgZn7gHWD3fR3YUN9J9fRVhHKpxx)",
"sender": "unknown"
},
"success": true
}
GET
/user_transactions/USERNAME
- return last transactions of USERNAME
Example output:
{
"result": [
{
"amount": 2.995,
"confirmations": 16216,
"currency": "XMG",
"datetime": "2021-10-15 21:12:04",
"fee": 0.0001,
"hash": "df48b95a8c03f747e691efa35103a681dcd94382fddd8fceb232861ca1a647cd",
"memo": "None",
"recipient": "9RTb3ikRrWExsF6fis85g7vKqU1tQYVFuR",
"sender": "revox2"
},
{
"amount": 0.995,
"confirmations": 16138,
"currency": "XMG",
"datetime": "2021-10-15 22:44:56",
"fee": 0.0001,
"hash": "502d912e6b3720dd13a92906ed59bf9d0c57482a42119c3333f7c1c157e8ad23",
"memo": "hmmm",
"recipient": "revox3",
"sender": "revox2"
},
],
"success": true
}
GET
/users/USERNAME
- return balance, magi price and last transactions of USERNAME
Example output:
{
"result": {
"balance": {
"address": "95JLhkyWVDce5D17LyApULc5YC4vrVzaio",
"balance": 34631.39634922,
"currency": "XMG",
"username": "revox"
},
"price": {
"btcpop": 0.00244636,
"ducoexchange": 0.00032753,
"max": 0.00244636,
"moondex": 0
},
"transactions": [
{
"amount": 251.78871502,
"confirmations": 1044,
"currency": "XMG",
"datetime": "2021-10-28 14:05:38",
"fee": 0,
"hash": "5558f12bc6b6d9743e994e42f5107db32491219d5e907b586fc7a4e3b713ba7a",
"memo": "none",
"recipient": "revox",
"sender": null
},
{
"amount": 81.995,
"confirmations": 1025,
"currency": "XMG",
"datetime": "2021-10-28 14:41:08",
"fee": 0.0001,
"hash": "405c68a5c1c68c3b262a06a277f8da1ab5a3698fcceb8dfe133f48d74ece65eb",
"memo": "DUCO Exchange payment",
"recipient": "Raidz",
"sender": "revox"
}
]
},
"success": true
}
GET
/balances/USERNAME
- return balance of USERNAME
Example output:
{
"result": {
"address": "9Nnp5tCuDQ6gFCPx1t8vzg3L31yDnhBNzQ",
"balance": 0.0049,
"currency": "XMG",
"username": "revox2"
},
"success": true
}
GET
/transaction/TX_DATA
- create a transaction with TX_DATA
TX_DATA is a set of URL arguments containing:
username
- senders username
password
- senders password
recipient
- recipients username/address
amount
- amount to be transferred
memo
- (optional) transaction comment
Example output:
{
"result": "OK,Successfully transferred funds,df48b95a8c03f747e691efa35103a681dcd94382fddd8fceb232861ca1a647cd",
"success": true
}