The CryptoCore Faucet API will provide access to our services and information to our sellers.
API calls are implemented as standard HTTP POST (application/x-www-form-urlencoded) calls to
https://gateway.ccore.online/
with JSON parameter
php: https://github.com/cryptocore-jim/gateway-php-api/tree/master/src/sample-faucet
The only setup needed is to go to the Account settings page and receive Secret key and User ID.
Every API call has a SHA hash generated with your Secret key.
Our server generates it's own SHA hash and compares it with the API caller's.
If they don't match the API call is discarded.
The SHA hash is sent as a HTTP parameter called 'usersignature'.
The SHA hash is created from the POST data of your request.
/request/faucet/get_faucet
{
"user_id": 3,
"faucet_key": "faucet_key",
"usersignature": "usersignature"
}
| Field | Description |
|---|---|
| user_id | your gateway User ID, Taken from Account settings page |
| faucet_key | Faucet key to retrieve faucet |
| usersignature | Your user signature |
String to generate SHA:
faucet_key + user_id + YOUR_SECRET_KEY
Cenerate hash of your signature:
PHP:
sha1('string')
Node JS:
const crypto = require('crypto');
let digest = crypto.createHash('string');
{
"faucet_key": "faucet_key",
"amount": 0.0009,
"amount_claimed": 0,
"currency_code": "BTC_TST",
"faucet_name": "BTC_TEST_FAUCET_SAMPLE",
"min_ask_amount": 0.001539
}
| Field | Description |
|---|---|
| faucet_key | Faucet key |
| amount | Total amount of coins in faucet |
| amount_claimed | Amount claimed from faucet |
| currency_code | Currency code of faucet |
| faucet_name | Name of faucet |
| min_ask_amount | Minimal ask amount to proceed faucet request |
In case of some error occured status 500 will be sent to user.
/request/faucet/new
{
"amount": 0.0001,
"faucet_key": "faucet_key",
"user_id": 9,
"address": "2MsdBzVvKQ7HgNtpV9dQnBeT3xTMxaCg7h5",
"currency_code": "BTC_TST",
"faucet_additional_data": "{any_json_data:1}",
"usersignature": "usersignature"
}
| Field | Description |
|---|---|
| amount | Amount to claim from faucet |
| faucet_key | Faucet key |
| user_id | User Id |
| address | Address to transfer amount from faucet |
| currency_code | Currency code of faucet |
| faucet_additional_data | Json additional data (any valid json string) Example: {any_json_data:1} |
| usersignature | Your user signature |
String to generate SHA:
address + amount + currency_code + faucet_key + user_id + YOUR_SECRET_KEY
Cenerate hash of your signature:
PHP:
sha1('string')
Node JS:
const crypto = require('crypto');
let digest = crypto.createHash('string');
{
"faucet_request_id": "L3FwjaXPTF6aVdFHj5CNy1iE4jL8HTcfgYJoYtwg5PzANh6bMLKM"
}
| Field | Description |
|---|---|
| faucet_request_id | Faucet request id |
In case of some error occured status 500 will be sent to user.
Validate address api to validate correct address provided by users (currently only support legacy adresses)
/common/validator/address
{
"address": "2MsdBzVvKQ7HgNtpV9dQnBeT3xTMxaCg7h5",
"currency_code": "BTC_TST",
"user_id": 321,
"usersignature": "usersignature"
}
| Field | Description |
|---|---|
| address | Address to validate |
| currency_code | Currency to validate address |
| user_id | User Id |
| usersignature | Your user signature |
String to generate SHA:
address + currency_code + user_id + YOUR_SECRET_KEY
Cenerate hash of your signature:
PHP:
sha1('string')
Node JS:
const crypto = require('crypto');
let digest = crypto.createHash('string');
{
"is_valid": true
}
| Field | Description |
|---|---|
| is_valid | Valid or not valid address |
In case of some error occured status 500 will be sent to user.