A brief description of your project.
Before you begin, ensure that you have the following prerequisites installed on your machine:
- Nodejs
- nodemon
- Xamp
- Postman
- Clone the repository to your local machine using
- Start your local xamp server
- Create a new database "cumbi-crypto-api.sql"
- Import the database file in /config/cumbi-crypto-api.sql
- Run nodemon start
This API provides endpoints to interact with the Cumbi Crypto API. It allows users to create new deposit objects and retrieve existing deposit information on ETH AND TRON network
To authenticate API requests, include the Authorization header with the Bearer token.
Create a new deposit object by sending a POST request to the ${baseurl}/deposit/create endpoint.
- Method: POST
- URL:
${baseurl}/deposit/create - Headers:
- Content-Type: application/json
- Authorization: Bearer <token>
{
"deposit_id": "test1",
"amount" : 10,
"network": "ethereum",
"coin": "usdt"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| deposit_id | string | yes | deposit unique id to attached to this deposit |
| amount | number(double) | yes | deposit amount in USD |
| network | string | yes | the crypto network you wont to interact with supported: ethereum || tron |
| coin | string | yes | the crypto coin you want to interact with on the selected network supported: USDT || USDC |
{
"status": "success",
"depositObj": {
"address": "...address", //the deposit address
"coin_price": "1.00",
"deposit_id": "test1",
"balance": 0, //address balance on chain
"amount_usd": 8,
"status": "pending",
"amount": 8,
"coin": "USDT",
"network": "ETHEREUM"
}
}
Check a deposit status by sending a POST request to the ${baseurl}/deposit/status endpoint.
- Method: POST
- URL:
${baseurl}/deposit/status - Headers:
- Content-Type: application/json
- Authorization: Bearer <token>
{
"deposit_id": "test1"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| deposit_id | string | yes | unique id attached to the deposit |
{
"status": "success",
"depositObj": {
"address": "...address", //the deposit address
"deposit_id": "test1",
"balance": 8,
"amount_usd": 8,
"status": "success", //pending || success : when address balance >= amount
"amount": 8,
"coin": "USDT",
"network": "ETHEREUM"
}
}