Microwallet API Documentation

WmZona Microwallet API compatible with FaucetBox API. You need only replace


                           $api_base = "https://faucetbox.com/api/v1/";
                           with
                           $api_base = "https://wmzona.com/zarabotok/api/v1/";
                       

  • FaucetBOX PHP Library - simple library from faucetbox.com; best choice if you already have a working faucet download documentation
  • Faucet in a BOX - ready to use faucet script; best choice if you don't have a faucet yet

PHP Library usage

$api_key = "YOUR_API_KEY";
        $currency = "BTC"; #
        $faucetbox = new FaucetBOX($api_key, $currency);

        # To send 100 satoshi to address
        $result = $faucetbox->send("btcaddress", 100);

        if($result["success"] === true) { # you can check if it was successful
        echo $result["html"]; # there's example html ready for you
        } else { # something went wrong :(
        log_error($result["response"]); # you can log whole response from server
        echo $result["html"]; # and display error message to user
        }

API methods and usage


All API requests are HTTPS POST requests. 1 satoshi = 10^-8 BTC. All responses are JSON with status attribute. status 200 means no error.

Sending payment

https://wmzona.com/zarabotok/api/v1/send

Parameters

  • api_key - our API key from Dashboard
  • to - address to send coins to. It MUST be a valid address for selected currency.
  • amount - amount in satoshi to transfer.
  • referral - Set it to true if you're sending referral earnings. It's shown to users on address check page.
  • currency - API name of selected currency ("BTC", "ETH"). You can check API names of available currencies on Dashboard. It defaults to "BTC" if not present.

Response fields

  • balance - Your balance for this currency in satoshi.
  • balance_bitcoin - Your balance for this currency in coins (the same as balance divided by 10^8)

Example request

amount=10&to=DSfPc8GkRGF3Xrp99RTGdFJ7hcFJCqkwYH&api_key=4VdBEIAQKPERrdCOhQLUMn7mMNVql&currency=BTC

Example response

{
        "status":200,
        "balance":12349999889,
        "balance_bitcoin":"123.49999889"
        }

Checking balance

https://wmzona.com/zarabotok/api/v1/balance

Parameters

  • api_key - our API key from Dashboard
  • currency - (optional) API name of selected currency. It defaults to "BTC" if not present.

Response fields

  • balance - Your balance for this currency in satoshi.
  • balance_bitcoin - Your balance for this currency in coins (the same as balance divided by 10^8)

Example request

api_key=4VdBEIAQKPpZ4SWOhQLUMn7mMNVql&currency=BTC

Example response

{
        "status":200,
        "balance":77519999889,
        "balance_bitcoin":"775.19999889"
        }

Fetching most recent payouts

https://wmzona.com/zarabotok/api/v1/payouts

Parameters

  • api_key - our API key from Dashboard
  • count - How many payouts should be returned. Must be greater than 0 and less or equal to 10. No payouts older than 30 days will be returned.
  • currency - (optional) API name of selected currency (ex. "BTC", "ETH").

Response fields

  • rewards - Array of rewards with following fields:
    • to - destination address
    • amount - how much was sent (in satoshi)
    • date - date and time of payout

Example request

count=5&api_key=4VdBEIAQKPpZ4SWOhQLUMn7mMNVql&currency=BTC

Example response

{
        "status": 200,
        "rewards": [
        {
        "to":"gHQFFJ7hcFJCqkwYHDSfPc8GkRkjljERYV",
        "amount":"100",
        "date":"2014-10-10 17:44:22"
        },
        {
        "to":"gHQFFJ7hcFJCqkwYHDSfPc8GkRkjljERYV",
        "amount":"200",
        "date":"2014-10-10 17:44:21"
        },
        {
        "to":"gHQFFJ7hcFJCqkwYHDSfPc8GkRkjljERYV",
        "amount":"300",
        "date":"2014-10-10 17:42:54"
        },
        ]
        }
    

Fetching list of supported currencies

https://wmzona.com/zarabotok/api/v1/currencies

Parameters

  • api_key - API key from Dashboard

Response fields

  • currencies - Array of supported currencies.

Example request

api_key=4VdBEWWWQKPpZ4SWOhQLUMn7mMNVql

Example response

{
        "status":200,
        "currencies":["BTC","ETH"]
        }
    

Errors


Insufficient funds

{"status": 402, "message": "Insufficient funds."}

Invalid API key

{"status": 403, "message": "Invalid API key."}

Invalid API method

{"status": 404, "message": "Invalid API method."}

Currency not activated

{"status": 405, "message": "Currency not activated."}

Invalid currency

{"status": 410, "message": "Invalid currency."}

Unsupported method

{"status": 411, "message": "Unsupported method."}

Invalid 'to' address

{"status": 412, "message": "Invalid 'to' address."}

Missing parameters

{"status": 414, "message": "Missing parameters."}

This faucet made too many requests, try again later!

{"status": 441, "message": "This faucet made too many requests, try again later!"}

Owner of this faucet set a send limit, which was exceeded. Try again in 30 minutes.

{"status": 450, "message": "Owner of this faucet set a send limit, which was exceeded. Try again in 30 minutes."}

API access disabled

{"status": 452, "message": "API access disabled."}

Microwallet service is in maintenance mode, try again in five minutes

{"status": 501, "message": "WmZona Microwallet Service is in maintenance mode, try again in five minutes."}