Deposit

This section give's control over the deposits (Internal or external) of Crypto currencies.
Deposit request can be created by any user with a an approved wallet registered in the system.
To create a deposit, a valid deposit address must be saved in the DB.
Admin logged in - can see and control deposits of all the system's users.
User logged in - can see and control it's own deposits.
Deposits are for Crypto only, this section will show all deposits customers done,
as it is crypto deposits we are define deposit as crypto transfer from customer personal wallet (white listed) to the system defined wallets.
you must first call "api/deposits/:currency/address" in order to get deposit address

get-deposits

Returnes a list of deposits in the system available deposit status
- pending (waiting for the blockchain update)
- completed (the transfer happen on the blockchain)

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/deposits
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

post-deposit

Create new deposit request. must exist in users deposit address
* If you get "The field not found" it means the address doesn't exist for this user *

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
Request Body schema: application/json
required
action
string
amount
number
currency
string
from_address
string
to_address
string
Responses
200

Success

401

Unauthorized

422

Unprocessable Content

post/deposits
Request samples
application/json
{
  • "action": "DEPOSIT",
  • "amount": 1,
  • "currency": "TBTC",
  • "from_address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  • "to_address": "2Mwc6wXzvoJze7y92Edm66E4fMV1fH6FPKQ"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": null
}

get-deposit-address

Returns an active wallet address for the currency provided in the route url.
If a user has aleady requested an address, it will return the address from the system db,
otherwise a new address will be created per user per symbol and per wallet provider

SecurityAuthorization
Request
path Parameters
currency
required
string

currency path parameter

Example: <currency>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

500

Internal Server Error

get/deposits/{currency}/address
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

get-deposit-address-guest

Returns deposit address registered in the system which will be monitoring in the blockchain.
Requires to provide external_transaction_id which is sent in POST deposits/{currency}/address/guest and token which is the response of the POST request.
The internal system will store an address which was sent to a client related to the external_transaction_id and monitor it in the blockchain for any incoming transactions.
On any treansaction's status update the nodemonitor will send webhook to a client with updated payload.

Here the explanation of the webhook URL and payload :
Webhook URL: Is a client's endpoint where deposit's confirmations will be sent to.
Payload: body of the webhook request sending to a client.
Payload example:
payload: {
tx_hash: 0x28522ec98fad366a3ceacde9f76a8d41a18a951c25be6f44a72a93ec3ad49b78,
amount: "0.5678",
from_address: "0x30bfa10caae4052d468b7a7428efbcfcf37f42ba",
to_address: "0x106e3a70216396672d54e0b5fb153e420d0877e9",
currency: "ETH",
confirmed: true;
confirmations: 861,
}
tx_hash: is a transaction_hash/id of the transaction
confirmed: true/false value depending on the statuss of the tx on the moment of the webhook
confirmations: number of the confirmations/confirmed blocks in the blockhain on the moment of the webhook.
The system will observe sent deposit addresses for a tx’s status changes i.e: when system will catch a transaction and if it is not confirmed yet in the blockchain - the confirmed payload property will be “false” and once it confirmed the service will send the webhook again with updated status.

SecurityAuthorization
Request
path Parameters
token
required
string

token that a client gets in POST deposits/{currency}/address/guest response

Example: <string>
external_transaction_id
required
string

external tx_id which is sent by a client in POST deposits/{currency}/address/guest

Example: <string>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

500

Internal Server Error

get/deposits/{currency}/address/guest
Response samples
application-json
{
  • "api_message": "DEPOSIT_GET_ADDRESS_SUCCESS",
  • "api_data": {
    }
}

post-deposit-address-guest

Returns token needed for next requesting deposit address for a client.

SecurityAuthorization
Request
path Parameters
user_id
required
string

user_id that deposit address will be related to

Example: <string>
external_transaction_id
required
string

external tx_id to register a transaction in the system

Example: <string>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

400

Bad Request

401

Unauthorized

500

Internal Server Error

post/deposits/{currency}/address/guest
Response samples
application-json
{
  • "api_message": "DEPOSIT_POST_SUCCESS",
  • "api_data": {
    }
}

get-deposit-status-guest

Returns the status of the requested deposit address

SecurityAuthorization
Request
path Parameters
token
required
string

token that a client gets in POST deposits/{currency}/address/guest response

Example: <string>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

400

Bad Request

401

Unauthorized

500

Internal Server Error

get/deposits/status/guest
Response samples
application-json
{
  • "api_message": "DEPOSIT_GET_STATUS_SUCCESS",
  • "api_data": {
    }
}

get-pending-external-sell-list

Returns a list of pending external withdrawals.

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

get/deposits/list/PendingExternalSell
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

get-deposit-by-depositId

Returns full details on the provided deposit request.

SecurityAuthorization
Request
path Parameters
deposit_id
required
string

deposit_id pat parameter

Example: <deposit_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/deposits/{deposit_id}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

post-fiat-deposit

Create new fiat deposit.
The payload's object explanation:
{
UUID
: Crymbo's internal user id
CID: External user id
currency: USD/EUR
amount:: new balance
balance: previous balance
}

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required
UUID
string
CID
string
currency
string
amount
string
balance
string
Responses
200

Success

401

Unauthorized

403

Forbidden

422

Unprocessable Content

post/deposits/fiat
Request samples
application/json
{
  • "UUID": "Y0ZuTVFCNnl6S3dxNDBnaTdqc1VpUT09",
  • "CID": "SOME-CID",
  • "currency": "USD",
  • "amount": "",
  • "balance": ""
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

update-deposit

Update the provided deposit request.

SecurityAuthorization
Request
path Parameters
deposit_id
required
string

depoist_id path parameter

Example: <deposit_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

500

Internal Server Error

put/deposits/{deposit_id}/declineSell
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": ""
}