3860
“Fact : The first Bitcoin purchase was for pizza...”

API Documentation

Files

Download our php libray for fast migration from Faucethub.io.
Download Library
Download our Faucet script including our library.
Download Faucet Script
Example To Send 500 Litoshis
                # Credits to FaucetHub for the original code example    
                require_once('/lib/walcrypt-lib.php');              # path to library (old faucethub.php)

                $api_key = "YOU_API_KEY_HERE" ;
                $currency = "LTC";                                  # or any other supported by WalCrypt
                $walcrypt = new WalCrypt($api_key, $currency) ;
                
                $result = $walcrypt->send("user_ltc_address", 500);
                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 Commands

Our API is designed to be compatible with faucets and websites previously using Faucethub.io, but there is few changes, so read again all commands and particulary check this ones : changed variable.

Using API is easy, send a HTTP POST request with a set of parameters, such API key and currency, and get response in JSON format.
If the request was successful, the JSON object will contain a status attribute equal to 200.
If the request failed, you will get a different code and message attribute, explaining the problem/error in detail.
(A full list of status codes and errors with explanations is available at the bottom of this page.)

In the parameters list for each method there are REQUIRED parameters and OPTIONAL ones.

Check your balance

Use this method to get your account balance in any supported currency.

Request URL(s)
  • https://walcrypt.com/api/v1/balance
  • https://walcrypt.com/api/v1/getbalance
Parameters
  • api_key Your API Key from your faucet dashboard page.
  • currency A valid currency acronym, default BTC.
Return Values
  • api_coins Balance of API Coins after request (include Bonus Coins).
  • currency The valid currency you made the request for.
  • balance Balance multiplied by 10^8 (100000000).
  • balance_decimal Your balance in decimal.
Request Example
https://walcrypt.com/api/v1/balance?api_key=YOUR_API_KEY&currency=ETH
Example Response
{
  "status": 200,
  "message": "OK", 
  "api_coins": 4956,
  "currency": "ETH",  
  "balance": 4589000,
  "balance_decimal": 0.04589000
}
                

List of supported currencies

Use this method to get a list of all the currencies we support on our platform and their status.

Request URL(s)
  • https://walcrypt.com/api/v1/currencies
Parameters
  • api_key Your API Key from your faucet dashboard page.
Return Values
  • currencies An array of currency acronyms (e.g. BTC)
  • currencies_names A full array including the acronym, name and status (enabled true or false).
Request Example
https://walcrypt.com/api/v1/currencies?api_key=YOUR_API_KEY
Example Response
{
  "status": 200,
  "message": "OK",  
  "currencies": [
    "BTC",
    "LTC",
    "DOGE"
  ],
  "currencies_names": [
    {
      "name": "Bitcoin",
      "acronym": "BTC",
      "enabled": true
    },
    {
      "name": "Litecoin",
      "acronym": "LTC",
      "enabled": true
    },
    {
      "name": "Dogecoin",
      "acronym": "DOGE",
      "enabled": true
    }
  ]
}
                

Check address belongs to an account

Use this method to check if address belongs to an account.

Request URL(s)
  • https://walcrypt.com/api/v1/checkaddress
Parameters
  • api_key Your API Key from your faucet dashboard page.
  • address The address you want check.
  • currency Currency of the address, defaults BTC.
Return Values
This method will return status as 200 for a valid address, and 456 for an address that does not belong to an account.
  • payout_user_hash A unique hash corresponding to the individual user on WalCrypt. Store this value and use it to check how much was paid to each user to prevent fraud on your faucet.
Request Example
https://walcrypt.com/api/v1/checkaddress?api_key=YOUR_API_KEY&address=0x4d56fd32gfd5641dfg65&currency=XRP
Example Response
{
  "status": 200,
  "message": "OK",
  "payout_user_hash": "SOME_HASH"  
}
                

Send to address

Use this method to send coins to an address.

Request URL(s)
  • https://walcrypt.com/api/v1/send
Parameters
  • api_key Your API Key from your faucet dashboard page.
  • amount The amount to send in satoshi (integer).
  • to The address you are sending to, which must be valid.
  • currency A valid currency acronym, defaults BTC.
  • referral Set to 'true' or '1' if payout is for a referral earning.
Return Values
  • currency The valid currency you made the request for.
  • balance Balance after payout multiplied by 10^8 (100000000).
  • balance_decimal Your balance in decimal after payout.
  • payout_id A unique value representing this transaction.
  • payout_user_hash A unique hash corresponding to the individual user on WalCrypt. Store this value and use it to check how much was paid to each user to prevent fraud on your faucet.
Request Example
https://walcrypt.com/api/v1/send?api_key=YOUR_API_KEY&currency=XMR&amount=500&to=0x5df32dfg5rg6t54h
Example Response
{
  "status": 200,
  "message": "OK",  
  "currency": "XMR",
  "balance": 176542894,
  "balance_decimal": 1.76542894,
  "payout_id": 1234,
  "payout_user_hash": "SOME_HASH"
}
                

Last payouts

Use this method to get the last payouts you did for a currency, up to 10.

Request URL(s)
  • https://walcrypt.com/api/v1/payouts
Parameters
  • api_key Your API Key from your faucet dashboard page
  • currency A valid currency acronym, defaults BTC
Return Values
  • payouts An array of payout data
Request Example
https://walcrypt.com/api/v1/payouts?api_key=YOUR_API_KEY&currency=BCH
Example Response
{
  "status": 200,
  "message": "OK",  
  "payouts": [
    {
      "to": "CURRENCY_ADDRESS_1",
      "currency": "BCH",
      "amount": 50,
      "date": "2019-12-16 10:38:48"
    },
    {
      "to": "CURRENCY_ADDRESS_2",
      "currency": "BCH",
      "amount": 210,
      "date": "2019-12-15 08:15:23"
    }
  ]
}
                

Faucets List

Use this method to get the list of websites register as 'faucet', actually 'active' and owners are 'verified'.

Request URL(s)
  • https://walcrypt.com/api/v1/faucetlist
Parameters
  • api_key Your API Key from your faucet dashboard page
Return Values
  • faucets An array with all faucet datas.
Request Example
https://walcrypt.com/api/v1/faucetlist?api_key=YOUR_API_KEY
Example Response
{
  "status": 200,
  "message": "OK",  
  "faucets": [
    {
      "date": "2019-12-25 10:38:48",
      "id" : "453",
      "name": "My Best Faucet",
      "url": "https://my-best-faucet.com",
      "currency": "LTC",
      "reward_in_satoshis": 500,
      "timer_in_minutes": 60,
      "24h_users": 53,
      "health": 85
    },
    {
      "date": "2019-12-14 08:24:12",
      "id" : "1261",
      "name": "ultimate Faucet",
      "url": "https://ultimate-faucet.com",
      "currency": "BTC",
      "reward_in_satoshis": 15,
      "timer_in_minutes": 30,
      "24h_users": 245,
      "health": 100
    }
  ]
}
                

Error Code List

You Received an error code and need to know what it means? Check the list below for all errors and what they mean with help and suggestions.

Insufficient Funds

{"status":402,"message":"This site has insufficient funds to send the payout."}

Your balance is not high enough to make the payout which was requested.


Invalid API Method

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

The API method you sent was not valid. Please check the API Methods section above, for a list of valid methods.


Invalid API Key

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

The API you provided for the request does not match up to any faucet in our system.


Invalid Currency

{"status":410,"message":"API Error: Provided currency is not valid."}

The currency you provided in the request is not on our list of supported currencies.


Invalid Coin Address

{"status":412,"message":"API Error: Address invalid."}

You will see this error only when sending a payout, if the provided address does not appear to be a valid one.


Missing Parameters

{"status":414,"message":"API Error: Parameters missing."}

You are missing one or more required parameters for the method you are using.


Too many requests

{"status":441,"message":"Too many API requests, please try again later."}

If you send too many API requests in a given time frame your account will be blocked from making further requests for a short time. Purchase premium membership to increase limits.

The following limits are in place for all users:
  • 15 requests per 1 mn
  • 125 requests per 10 mn
  • 500 requests per 1 hours

Send limit reached (soon)

{"status":450,"message":"The send limit set by the site owner has been reached, please try again later."}

You will get this message if you are trying to send a payout which will exceed the Rate Limits set in your faucet/website's settings.


API Disabled

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

If you set the API status for your faucet to stopped, you will get this message for every request which is made.


Access Denied

{"status":401,"message":"API Error: Access denied."}

If you have enabled the 'Server IP' security on your faucet, all unauthorised IP addresses will receive this error when they attempt to make a request.


Coin address no user

{"status":456,"message":"Address does not belong to good currency or an account on walcrypt.com."}

Explain users how to link addressed in their walcrypt.com account, before start claiming on your faucet/website.


Maintenance

{"status":501,"message":"Maintenance mode, please try again later."}

This errors means that our system is currently in maintenance mode. You will not be able to make any API requests.


Application error

{"status":999.xx,"message":"Application error, please try again later."}

This message means that something on our end caused the request to fail. If you keep getting this error, please contact support for further assistance.


Blocked from receiving payouts

{"status":187,"message":"The WalCrypt account you are sending payout, is banned."}

The account which you are sending to is not allowed to receive payouts.


Out of credits

{"status":600,"message":"API Error: Out of API Coins."}

All API requests use API Coins. When you run out of API Coins your account can no longer make API calls. You can purchase Bonus Coins or upgrade to premium membership.

Avoid excessive API requests

In order to keep the service running smooth, and for your users to have an enjoyable experience, we ask that you limit the number of API requests sent from your website/application. Below are a few tips and tricks for doing this.
Don't send again request for data you already checked
The best example of this is getbalance. There's no need to call it excessively, as the balance is returned in the send API result. The best way to use this is to store it in your database each time you made a payout to avoid sending another getbalance request.
The other example of this is checkaddress. If you already checked an address, don't check it again. Store the result in your database.
Don't send requests from public/home pages
This means, don't use code which calls the API from a page that the user has control.
Again getbalance and send come to mind here, as most faucet scripts tend to place a getbalance call on their home page causing a lot of API requests.
Use cron jobs/schedule tasks
The better way to make API calls is cron jobs (schedule tasks). These tasks can be set up to run once per minute (or less/more) and run a command or PHP script.

We highly recommend the use of them for the following tasks:
  • Storing the faucet balance in the database with a getbalance call.
  • Bulk processing a withdraw queue of user payouts instead of sending directly from the withdraw page. This is much more secure and prevents spam/race conditions/double pays.