map

Description of the crypto gateway

Crypto gateway is a specialized software developed by BuyOwnEx. Its primary purpose is to provide our clients (owners of cryptoexchanges, exchange offices, online stores and other businesses) convenient and reliable access to crypto economic: the blockchain, the flows of crypto assets, payments, calculations.

By analogy, just as any payment system connects the real economy and digital currencies, so the crypto gateway connects the real economy and the cryptosphere.

A crypto gateway is essentially Your own processing that allows you to accept cryptocurrency (crypto assets, cryptotokens) as payment for goods or services. At the same time, you are the sole owner and sole "merchant" of this processing (crypto processing).

Not only businesses that work directly in the crypto industry and are constantly "connected" to the blockchain need their own crypto gateways (such as crypto exchanges, exchange offices, crypto wallets, gambling services, and other decentralized applications). Also, owning your own crypto gateway can be very useful for suppliers of goods and services from the traditional economy and e-Commerce, because the implementation of operations with cryptocurrencies and crypto assets through third-party processing can take a significant part of the earned funds due to high commissions.

So we have developed for You such a processing (crypto gateway), after the integration of which no intermediary will stand between You and Your client.

Features and benefits of the BuyOwnEx crypto gateway (processing):

Flexibility. The system is built in such a way that the "nodes" of cryptocurrencies can be located on the same server or distributed on different servers.

Scalability. The system is scalable and does not require much effort when, for example, adding a new cryptocurrency or upgrading existing ones.

Modularity. The software consists of two parts: the server part, which is deployed on servers where "nodes" are installed and interacts with them through so-called "RPC calls", and the client part, which interacts with the server part via a secure WebSocket connection. The client part is implemented on the popular Laravel framework, the technology stack also includes: VueJs, Vuex, Vuetify, and a highly productive relational database PostgreSQL.

This document describes the client side and gives an idea of the functionality that is available to the crypto gateway administrator. Access to the client part is provided via SSH tunneling on the selected port, which allows you to completely isolate access from the outside.

At the moment, 6 cryptocurrencies are available "out of the box": BTC, LTC, BCH ABC, ETH, WAVES and BIP (Minter). It also provides support for tokens issued on the ETH, WAVES, and BIP blockchain platforms. If you need to support other cryptocurrency platforms, you can order improvements by writing to the address [email protected] to clarify the conditions.

After deploying this software, on the main page you will see a list of available cryptocurrency platforms and general information on each of them:

  • status
  • balance
  • hot wallet address
  • the number of the validated block in the blockchain network (yellow) and the number of the last block (green)

A drop-down menu is available on the left to navigate to the management page of a separate cryptocurrency platform. Also, the main page contains functionality that allows you to select several cryptocurrencies at once and transfer them to a certain status.

BuyOwnEx Crypto Gateway

Home page of the BuyOwnEx cryptocurrency gateway

BuyOwnEx Crypto Gateway

Switching the status of selected cryptocurrencies

Basic possibilities

BTC, LTC, BCH

Bitcoin-like nodes have almost the same functionality and consist of the following sections: node management, address list, transaction list, system transaction list, and list of withdrawal requests.

Below is a general view of the administration page of BTC, LTC, and BCH nodes. This is the main working admin area. Data is updated automatically in real time. For the convenience of the administrator, each section is minimized to allow concentration on a specific section. The functionality of each section is discussed in more detail below.

BuyOwnEx Crypto Gateway

Node management

The node management section consists of the following information and functional components:

BuyOwnEx Crypto Gateway

Status - node status. It can take the following values:

  • Online - deposits and withdrawals work normally;
  • Only withdrawals - only withdrawals works;
  • Only deposits - only deposits works;
  • Suspended - deposits and withdrawals are suspended;
  • Synchronization - is in the process of syncing (deposits and withdrawals are not available in this status. As soon as the synchronization process is completed, the node will switch to the "Suspended" mode);
  • Maintenance - the node is in maintenance mode. This mode is set automatically by the system if the server part of the corresponding node is not running (for example, when installing updates)

Blocks information

This information is presented in the form of two integer values. These values are the result of an RPC call to getblockchaininfo. Yellow indicates the headers field (the current header number validated by the node), and green indicates the block field (the last validated block in the blockchain network).

Status management

In the "Choose new status" drop-down list, you can change the node status to the desired status. Possible statuses are limited to 4 values: Online, Only withdrawals, Only deposits and Suspended. When switching a node to a new status, the system asks the administrator to confirm its action to prevent accidental clicks. To cancel, press ESC or click in the darkened area of the workspace.

BuyOwnEx Crypto Gateway

Note: it should be noted that switching the node to the Suspended status does not stop the node: the system continues to process incoming transactions from the blockchain, but interaction with an external service is suspended.

In Suspended status, the system stops sending API requests to the external service (Receiving requests for withdrawals and Notification of received payments and confirmed withdrawals in the blockchain network)

In Only deposits status, the system stops sending API requests to an external service to receive withdrawal requests

In Only withdrawals status, the system stops sending API requests to an external service for notification of incoming payments

System address

The crypto gateway allocates a special system address from which funds are transferred to the cold wallet. Also, the replenishment of the hot wallet should occur at this address. See the process of transferring funds below. For convenience, when you click on the copy icon, this address can be saved to the clipboard.

The following information fields are also displayed in this section:

  • Current balance - current balance for all node addresses, including the system address
  • Unconfirmed balance - an unconfirmed balance, i.e. the transaction has entered to the mempool, but has not yet been confirmed. When the transaction is confirmed, this balance will go to the Current balance section
  • Transaction count - total number of transactions made by the system (both deposit and withdrawal transactions are taken into account)
  • Wallet version - version of wallet.dat
  • Key pool date - date the value was last written to the key pool
  • Key pool size - the current number of reserved addresses that will be issued for making payments in the future.

This form can be used to transfer funds to a cold wallet.

BuyOwnEx Crypto Gateway

To make a withdrawal to a cold wallet, you must fill in the fields «Recipient address» and «Amount» and press «Send» button.

BuyOwnEx Crypto Gateway

The system will then require you to enter a secret passphrase to unlock your wallet and confirm your intention to withdraw funds.

Note: when withdrawing funds, the entered address is validated, and if the address was entered incorrectly, the system will issue an error and the withdrawal will not be made.

In the following form, you can make a backup copy of your wallet (wallet.dat file) or perform a wallet dump (the dump is a decrypted version of wallet.dat with a list of all addresses and their corresponding private keys)

Important: data is saved on the node server. It is not recommended to leave the wallet dump on the server. When performing a dump, you must download it from the server, identify it in a secure location, and delete it from the server.

BuyOwnEx Crypto Gateway

To make it possible to dump the wallet, you must enter a secret passphrase to unlock the wallet. The result of the operation is displayed as a pop-up message.

BuyOwnEx Crypto Gateway

In the following forms, you can get the private key of a specific wallet address and later import to another wallet or, in fact, import the private key.

To get a private key, fill in the fields «Internal node address» and «Unlock phrase» and press «Dump private key» button. If the operation is successful, the address's private key will be displayed in a pop-up message.

To import a private key to your wallet, you must fill in the fields «Address private key» and «Address label» and press «Import private key» button and , if necessary, check the «Rescan» flag. If the «Rescan» flag is checked, the system will take time to scan all transactions that belong to the imported address. It should be noted that all transactions at this address will be taken into account by the system after the scanning procedure is completed and they will also be sent via the API to the external system.

BuyOwnEx Crypto Gateway

Address list

Every time a user requests an address to replenish funds (in the case of an exchange) or an order is formed (an exchanger, an online store), the external service sends a command to the crypto gateway to get the address.

Exchange: if the user is new, an address is allocated for him and assigned to him, or if the user has already requested an address once, then the previously allocated address is returned to him.

Online store: if this is a newly created order, an address is allocated for it and assigned to it, or if the user left the order in the shopping cart and decided to pay for it later, then the previously allocated address is returned to him.

This section displays the correspondence between the user or unique order number and the selected address.

BuyOwnEx Crypto Gateway

The address list consists of the following fields:

  • ID - the unique number in the local database of the crypto gateway;
  • Created - date the address was created for the user / order;
  • Updated - the date the record was changed (may differ from the creation date if forced RPC calls to setlabel were made);
  • Address - unique dedicated address for the user / order to which we expect funds to be received;
  • Account - unique user/order ID

You can sort and filter by the Address and Account fields. To reduce the load on the database, there is a pagination functionality for 5, 10, 15, 500 records

Transaction list

This list contains transactions for withdrawals and deposits associated with a specific user/order. This list includes only transactions confirmed by the blockchain network with the minimum number of confirmations specified in the system settings.

BuyOwnEx Crypto Gateway

The transaction list consists of the following fields:

  • ID - unique transaction number in the local database of the crypto gateway;
  • Created - the detection date of the transaction;
  • Category - transaction type with two possible values: send – withdrawal transaction and receive – deposit transaction;
  • Account - unique user/order ID, corresponding to this transaction;
  • Currency - cryptocurrency code;
  • Amount - deposit/withdrawal amount. Deposits are displayed with a positive sign, and withdrawals are displayed with a negative sign.
  • Address - in case of deposit, this field contains the appropriate address for the user / node order, and in case of withdrawal – the external address to which the withdrawal was requested;
  • Transaction - unique transaction ID in the blockchain network;
  • Fee - amount of fee, paid for making withdrawals. Specified only if "Category" = send
  • Status - the status of the transaction. It can take the following values:
    • new - the transaction just arrived and was added to the local database;
    • done - an external service was notified of this transaction

You can sort and filter by the Address, Category, Account and Transaction fields. To reduce the load on the database, there is a pagination functionality for 5, 10, 15, 500 records

System transaction list

This list contains only system transactions for withdrawals and deposits. System transactions are only transactions for withdrawing funds to a cold wallet and replenishing the system address from external sources. This list includes only transactions confirmed by the blockchain network with the minimum number of confirmations specified in the system settings.

BuyOwnEx Crypto Gateway

The list of system transactions consists of the following fields:

  • ID - unique transaction number in the local database of the crypto gateway;
  • Created - the detection date of the transaction;
  • Category - transaction type with two possible values: send – withdrawal transaction and receive – deposit transaction;
  • Currency - cryptocurrency code;
  • Amount - deposit/withdrawal amount. Deposits and withdrawals are displayed with a positive sign.
  • Address - in case of deposit, this field contains the system address of the node, and in case of withdrawal – the external address of the cold wallet to which the funds were withdrawn;
  • Transaction - unique transaction ID in the blockchain network;
  • Fee - amount of fee, paid for making withdrawals. Specified only if "Category" = send
  • Status - the status of the transaction. It can take the following values:
    • new - the transaction just arrived and was added to the local database;
    • done - an external service was notified of this transaction

You can sort and filter by the Address, Category and Transaction fields. To reduce the load on the database, there is a pagination functionality for 5, 10, 15, 500 records

Requests for withdrawal list

This list contains only requests for withdrawals that the system received from an external service by executing the corresponding API call. The system provides protection against the possibility of double payments (the crypto gateway system will not add a record with the same Ext. ID number twice).

BuyOwnEx Crypto Gateway

The list of withdrawal requests consists of the following fields:

  • ID - a unique number in the local database of the crypto gateway;
  • Date - date when the entry was added to the database;
  • Account - amount of requested withdrawal;
  • Amount - deposit/withdrawal amount. Deposits and withdrawals are displayed with a positive sign.
  • Address - the address to which the payment must be made;
  • Transaction - unique transaction ID in the blockchain network (this field will be filled in only when the blockchain network confirms a transaction with the minimum number of confirmations specified in the system settings);
  • Ext. ID - unique integer ID of the request from the external system;
  • Status - the withdrawal status. It can take the following values:
    • new - the withdrawal request was just received and added to the local database;
    • made - the withdrawal was made;
    • done - a notification of the external service was made for corresponding withdrawal

You can sort and filter by the Ext. ID, Address, Account and Transaction fields. To reduce the load on the database, there is a pagination functionality for 5, 10, 15, 500 records

ETH, WAVES, BIP + Tokens

These nodes consist of the following sections: node management, address list, token management, transaction list, system transaction list, internal transfer list, and withdrawal request list.

Below is a general view of the administration page on these platforms. This is the main working admin area. Data is updated automatically in real time. For the convenience of the administrator, each section is minimized to allow concentration on a specific section. The functionality of each section is discussed in more detail below. As well as all the distinctive features of each node.

BuyOwnEx Crypto Gateway

Node management

The node management section consists of the following information and functional components:

BuyOwnEx Crypto Gateway

Status - node status. It can take the following values:

  • Online - deposits and withdrawals work normally;
  • Only withdrawals - only withdrawals works;
  • Only deposits - only deposits works;
  • Suspended - deposits and withdrawals are suspended;
  • Synchronization - is in the process of syncing (deposits and withdrawals are not available in this status. As soon as the synchronization process is completed, the node will switch to the "Suspended" mode);
  • Maintenance - the node is in maintenance mode. This mode is set automatically by the system if the server part of the corresponding node is not running (for example, when installing updates)

Note: it should be noted that switching a node to any available status will also transfer all tokens on this platform to the corresponding status. To be able to suspend the deposits / withdrawals of a specific token or the coin itself, use the corresponding functionality in the section Token management.

Blocks information

This information is presented in the form of two integer values. Yellow indicates the number of the last processed block, and green indicates the number of the last block synchronized with the node.

Status management

In the «Choose new status» drop-down list, you can change the node status to the desired status. Possible statuses are limited to 4 values: Online, Only withdrawals, Only deposits and Suspended. When switching a node to a new status, the system asks the administrator to confirm its action to prevent accidental clicks. To cancel, press ESC or click in the darkened area of the workspace.

BuyOwnEx Crypto Gateway

Note: it should be noted that switching the node to the Suspended status does not stop the node: the system continues to process incoming transactions from the blockchain, but interaction with an external service is suspended.

In Suspended status, the system stops sending API requests to the external service (Receiving requests for withdrawals and Notification of received payments and confirmed withdrawals in the blockchain network)

In Only deposits status, the system stops sending API requests to an external service to receive withdrawal requests

In Only withdrawals status, the system stops sending API requests to an external service for notification of incoming payments

System address

The crypto gateway allocates a special system address from which funds are transferred to the cold wallet. Also, the replenishment of the hot wallet should occur at this address. See the process of transferring funds below. Also, this address is automatically collected from other addresses that previously received funds. For convenience, when you click on the copy icon, this address can be saved to the clipboard.

This form can be used to transfer funds to a cold wallet.

BuyOwnEx Crypto Gateway

To make a withdrawal to a cold wallet, you must fill in the fields «Recipient address», «Amount», select a currency from the drop-down list and click the button «Send».

BuyOwnEx Crypto Gateway

Then the system will require you to confirm your intention to withdraw funds.

Note: when withdrawing funds, the entered address is validated, and if the address was entered incorrectly, the system will issue an error and the withdrawal will not be made.

There is also a mechanism for transferring funds in manual mode from any internal node address to any other address (this mechanism is not used in normal mode and is provided only for emergency situations)

BuyOwnEx Crypto Gateway

Address list

Every time a user requests an address to replenish funds (in the case of an exchange) or an order is formed (an exchanger, an online store), the external service sends a command to the crypto gateway to get the address.

Exchange: if the user is new, an address is allocated for him and assigned to him, or if the user has already requested an address once, then the previously allocated address is returned to him.

Online store: if this is a newly created order, an address is allocated for it and assigned to it, or if the user left the order in the shopping cart and decided to pay for it later, then the previously allocated address is returned to him.

This section displays the correspondence between the user or unique order number and the selected address, also it is possible to request a balance for this address in any supported currency (the balance request mechanism is used in emergency situations, since in normal mode, these addresses must have zero balances)

BuyOwnEx Crypto Gateway

The address list consists of the following fields:

  • ID - the unique number in the local database of the crypto gateway;
  • Created - date the address was created for the user / order;
  • Updated - the date the record was changed (may differ from the creation date if Nonce is increased);
  • Nonce - an integer incremental identifier that indicates the number of transactions made for payments from this address;
  • Address - unique dedicated address for the user / order to which we expect funds to be received in future;
  • Account - unique user/order ID;
  • Asset - drop-down list of all supported currencies on this platform;
  • Balance - functionality for requesting a balance at a specific address for a specific currency

You can sort and filter by the Address and Account fields. To reduce the load on the database, there is a pagination functionality for 5, 10, 15, 500 records

Note: for WAVES platform Nonce field is absent

Token management

This list contains all supported tokens on the corresponding platform, as well as the ability to add new ones, edit the parameters of existing tokens, and delete unnecessary ones.

BuyOwnEx Crypto Gateway

This list consists of the following fields:

  • ID - the unique number in the local database of the crypto gateway;
  • Asset - asset code;
  • Token ID - unique identifier of the token (smart contract). For the currency of the platform itself, the ID is displayed as system;
  • Token Size - the number of decimal places specified in the smart contract;
  • Gas Limit - the maximum amount of gas that can be spent to confirm a transaction in the network, determined by the administrator;
  • Min. Deposit - the minimum amount allowed to deposit funds in the appropriate currency to be processed. All deposits below this value are not profitable for processing and will be excluded from the process;
  • State - the status of a specific currency for deposits/withdrawals. Possible values:
    • Online - deposits and withdrawals work normally;
    • Only withdrawals - only withdrawals works;
    • Only deposits - only deposits works;
    • Suspended - deposits and withdrawals are suspended;
  • Actions - Edit and Delete actions. For the platform currency only Edit action is available

Note: for WAVES and BIP platforms the field Gas Limit is absent

Note: for BIP platform the field Token ID is absent

BuyOwnEx Crypto Gateway

To add a token, fill in the following fields:

  • Asset code - Asset code;
  • Contract ID - unique identifier of the token (smart contract);
  • Contract decimal size - the number of decimal places specified in the smart contract;
  • Gas Limit - the maximum amount of gas that can be spent to confirm a transaction in the network, determined by the administrator;
  • Min. Deposit - the minimum amount allowed to deposit funds in the appropriate currency to be processed;
  • Status - the status of deposits/withdrawals

Note: for WAVES and BIP platforms the field Gas Limit is absent

Note: for BIP platform the field Contract ID is absent

BuyOwnEx Crypto Gateway

When editing token parameters, the following fields are allowed to change:

  • Gas Limit - the maximum amount of gas that can be spent to confirm a transaction in the network, determined by the administrator;
  • Min. Deposit - the minimum amount allowed to deposit funds in the appropriate currency to be processed;
  • Status - the status of deposits/withdrawals

Note: for WAVES and BIP platforms the field Gas Limit is absent

Transaction list

This list contains transactions for withdrawals and deposits associated with a specific user/order. This list includes only transactions confirmed by the blockchain network with the minimum number of confirmations specified in the system settings.

BuyOwnEx Crypto Gateway

The transaction list consists of the following fields:

  • ID - unique transaction number in the local database of the crypto gateway;
  • Date - the detection date of the transaction;
  • Category - a transaction type that accepts one of the following values:
    • send – withdrawal transaction
    • receive – deposit transaction
  • Currency - cryptocurrency code;
  • Amount - deposit/withdrawal amount;
  • Address - in case of deposit, this field contains the appropriate address for the user / order, and in case of withdrawal – the external address to which the withdrawal was requested;
  • Transaction - unique transaction ID in the blockchain network;
  • Fee - amount of fee, paid for making withdrawals;
  • Status - the status of the transaction. It can take the following values:
    • new - the transaction just arrived and was added to the local database;
    • fee_pending - an internal transaction (fee) was created for transferring funds from the system address to the sender's address;
    • fee - received confirmation of the transaction (fee) in the network;
    • ready_pending - an internal transaction (system) was created to transfer funds from the sender's address to the system address;
    • ready - received confirmation of the transaction (system) in the network;
    • done - an external service was notified of this transaction;
    • fail - an error occurred while trying to perform an action
  • State - the state of the operation that is being performed on the transaction. It can take the following values:
    • success - successful execution of the operation;
    • wait - the operation is in progress;
    • fail - an error occurred while performing the operation

The following data is available for viewing in the detail drop-down list:

  • Account - unique user/order ID, corresponding to this transaction;
  • Confirmations - current number of transaction confirmations;
  • System transfer ID - unique identifier of the internal transfer of funds to the system address (filled in only for deposit transactions);
  • System fee transfer ID - unique identifier of the internal transfer of funds (in the platform currency) from the system address to the specified one for the possibility to transfer funds to the system address in the future (applicable only for platform tokens and only for deposit transactions);
  • Gas - spent gas for the transaction;
  • Gas Price - the price for gas that was assigned by the system for the transaction

Note: for WAVES platform the fields Gas and Gas Price are absent

You can sort and filter by the Address, Category, Asset, Account and Transaction fields. To reduce the load on the database, there is a pagination functionality for 5, 10, 15, 500 records

System transaction list

This list contains only system transactions for withdrawals and deposits. System transactions are only transactions for withdrawing funds to a cold wallet and replenishing the system address from external sources. This list includes only transactions confirmed by the blockchain network with the minimum number of confirmations specified in the system settings.

BuyOwnEx Crypto Gateway

The list of system transactions consists of the following fields:

  • ID - unique number of the system transaction in the local crypto gateway database;
  • Date - the detection date of the transaction;
  • Category - a transaction type that accepts one of the following values:
    • send – withdrawal transaction
    • receive – deposit transaction
  • Currency - cryptocurrency code;
  • Amount - deposit/withdrawal amount;
  • Transaction - unique transaction ID in the blockchain network;
  • Fee - amount of fee, paid for making withdrawals;
  • Status - the status of the transaction. It can take the following values:
    • new - the transaction just arrived and was added to the local database;
    • done - an external service was notified of this transaction;
    • fail - an error occurred while trying to perform an action
  • State - the state of the operation that is being performed on the transaction. It can take the following values:
    • success - successful execution of the operation;
    • wait - the operation is in progress;
    • fail - an error occurred while performing the operation

The following data is available for viewing in the detail drop-down list:

  • Confirmations - current number of transaction confirmations;
  • Sender address - sender address;
  • Recipient address - recipient address;
  • Gas - spent gas for the transaction;
  • Gas Price - the price for gas that was assigned by the system for the transaction

Note: for WAVES platform the fields Gas and Gas Price are absent

You can sort and filter by the Address, Category, Asset and Transaction fields. To reduce the load on the database, there is a pagination functionality for 5, 10, 15, 500 records

Internal transfer list

This list contains transactions for forced internal transfers that occur as a result of the automatic collection of funds at the system address. If funds were deposited in the platform's currency, the system simply transfers the received funds minus the estimated fee. If the funds were replenished with tokens issued on this platform, the system first transfers the funds to the sender's address in the platform's currency in the amount necessary for further transfer of tokens to the system address, and then transfers the tokens to the system address.

BuyOwnEx Crypto Gateway

The list of internal transfers consists of the following fields:

  • ID - unique number of internal transfer in the local database of the crypto gateway;
  • Date - date of creation of the internal transfer;
  • Category - a transfer type that accepts one of the following values:
    • fee – transaction for transferring funds from the system address to the sender's address;
    • system – transaction for transferring funds from the sender's address to the system address
  • Currency - cryptocurrency code;
  • Amount - transfer amount;
  • Transaction - unique transaction ID in the blockchain network;
  • Fee - amount of fee paid for the transfer;
  • Status - status of funds transfer. It can take the following values:
    • pending - the transaction just arrived and was added to the local database;
    • success - the transaction was confirmed in blockchain;
    • reverted - the transaction was not confirmed in blockchain
  • State - the state of the operation that is being performed on the transfer. It can take the following values:
    • success - successful execution of the operation;
    • wait - the operation is in progress;
    • fail - an error occurred while performing the operation

The following data is available for viewing in the detail drop-down list:

  • Check attempts - number of attempts to verify a transaction for transferring funds for confirmation in the blockchain;
  • Sender address - sender address;
  • Recipient address - recipient address;
  • Gas - spent gas for the transaction;
  • Gas Price - the price for gas that was assigned by the system for the transaction

Note: for WAVES platform the fields Gas and Gas Price are absent

You can sort and filter by the Transfer ID, Category, Asset and Transaction fields. To reduce the load on the database, there is a pagination functionality for 5, 10, 15, 500 records

Requests for withdrawal list

This list contains only requests for withdrawals that the system received from an external service by executing the corresponding API call. The system provides protection against the possibility of double payments (the crypto gateway system will not add a record with the same Ext. ID number twice).

BuyOwnEx Crypto Gateway

The list of withdrawal requests consists of the following fields:

  • ID - a unique number in the local database of the crypto gateway;
  • Date - date when the entry was added to the database;
  • Currency - cryptocurrency code;
  • Amount - amount of requested withdrawal;
  • Address - the address to which the payment must be made;
  • Transaction - unique transaction ID in the blockchain network (this field will be filled in only when the blockchain network confirms a transaction with the minimum number of confirmations specified in the system settings);
  • Fee - the amount of fee assigned to the user of the external system for making withdrawal;
  • Status - the withdrawal status. It can take the following values:
    • new - the withdrawal request was just received and added to the local database;
    • made - the withdrawal was made;
    • checked - the withdrawal transaction was confirmed;
    • reverted - the withdrawal transaction was not confirmed;
    • done - a notification of the external service was made for corresponding withdrawal
  • State - state of the operation to be performed on the withdrawal. It can take the following values:
    • success - successful execution of the operation;
    • wait - the operation is in progress;
    • fail - an error occurred while performing the operation

You can sort and filter by the Ext. ID, Asset, Address, Account and Transaction fields. To reduce the load on the database, there is a pagination functionality for 5, 10, 15, 500 records

Interaction with an external service

In order to interact with an external service, it (the external service) must implement only 4 APIs for the crypto gateway. And in the crypto gateway itself, there are 3 methods available for calling from an external service: get the node state (to check whether deposits / withdrawals are possible), get the address (for depositing), validate the address (when requesting a withdrawal of funds).

List of required API requests for an external service

Receiving requests for withdrawals

This API request is sent every n seconds / minutes to the external service. The purpose of this call is to get a list of withdrawal requests in a certain currency generated in the external service. If at least one record is returned as a result, this record is immediately displayed in the "Requests for withdrawal list" section in the "new" status. When adding a record, the uniqueness of the requested withdrawal is checked by the "Ext. ID" field. In the future, the system makes a withdrawal to the address specified by the user and notifies the external service about the payment made.

Notification of received payments and confirmed withdrawals in the blockchain network

This API request is sent to an external service and contains a list of received confirmed transactions processed by the crypto gateway. This list contains both a list of confirmed deposits and withdrawals in blockchain. For deposits, depending on the type of activity, the external service can transfer the amount of funds received to the user's account or initiate a reverse exchange operation or switch the order status to "paid". For withdrawals, the external service will be able to take into account the real fee spent on making the payment and notify the user that the payment/exchange operation was successfully made.

Notification of a withdrawal

This API request is sent to the external service immediately after the withdrawal of funds. At this point, the external service can transfer the withdrawal request to a certain status and notify the user by email that withdrawal request has been accepted for execution.

Notification of a transaction for transferring funds to and from a cold wallet

This API request is sent to an external service in order to notify that funds from the system address were debited or credited. In this case, the external service will be able to recalculate the amount of reserved funds for withdrawals or make other necessary accounting of funds.

List of supported requests from an external service

Getting the node state

This command is sent by secure WebSocket connection to the crypto gateway to determine the current node state. If the state changes, for example, to "Only Deposits", the external service will be able to disable the withdrawal functionality in time.

Getting an address

This command is sent by secure WebSocket connection to the crypto gateway to request an address that will later be associated with this user or order. The only and mandatory parameter is: account. It is this user/order ID that will be used to determine the depositing in the future.

Address validation

This command is sent by secure WebSocket connection to the crypto gateway for validating the address entered by the user, to which funds must be withdrawn.