Buy Masternode

CryptoCore Faucet API


CryptoCore faucet API


Introduction

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

API Sample

php: https://github.com/cryptocore-jim/gateway-php-api/tree/master/src/sample-faucet

API Setup

The only setup needed is to go to the Account settings page and receive Secret key and User ID.

Authentication

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.

Get Faucet


Api Endpoint

/request/faucet/get_faucet

Json Sample

{ "user_id": 3, "faucet_key": "faucet_key", "usersignature": "usersignature" }

Json Fields

Field Description
user_id your gateway User ID, Taken from Account settings page
faucet_key Faucet key to retrieve faucet
usersignature Your user signature


Create 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');

Reposne

{ "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 }

Response fields

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

Error Reposne

In case of some error occured status 500 will be sent to user.

Request payment from faucet


Api Endpoint

/request/faucet/new

Json Sample

{ "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" }

Json Fields

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

Create 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');

Reposne

{ "faucet_request_id": "L3FwjaXPTF6aVdFHj5CNy1iE4jL8HTcfgYJoYtwg5PzANh6bMLKM" }

Response fields

Field Description
faucet_request_id Faucet request id

Error Reposne

In case of some error occured status 500 will be sent to user.


Validate address


Api Endpoint

Validate address api to validate correct address provided by users (currently only support legacy adresses)

/common/validator/address

Json Sample

{ "address": "2MsdBzVvKQ7HgNtpV9dQnBeT3xTMxaCg7h5", "currency_code": "BTC_TST", "user_id": 321, "usersignature": "usersignature" }

Json Fields

Field Description
address Address to validate
currency_code Currency to validate address
user_id User Id
usersignature Your user signature

Create 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');

Reposne

{ "is_valid": true }

Response fields

Field Description
is_valid Valid or not valid address

Error Reposne

In case of some error occured status 500 will be sent to user.