Module: "Trading Actions"

The module description and pricing information are available via this link.

The purpose of the trading module is to fully automate the process of executing orders and recording current exchange rates, whether cryptocurrencies are present in your portfolio or not.

There are two main types of trading actions:

  1. Selling cryptocurrency via an order.

  2. Buying cryptocurrency via an order.

Each of these actions can be divided into two scenarios:

  1. Selling cryptocurrency via an order when it is available in your portfolio.

  2. Buying cryptocurrency via an order when the currency used for the purchase is available in your portfolio.

and

  1. Selling cryptocurrency via an order when it is not available in your portfolio.

  2. Buying cryptocurrency via an order when the currency used for the purchase is not available in your portfolio.

This categorization allows for a more detailed description of various trading scenarios.


Selling Cryptocurrency

When selling or buying cryptocurrency via an order, and the required currency is available in your portfolio, the process is simpler and more efficient. In this case, the automated trading system operates as follows:

  1. The client creates an order and receives a payment address from the merchant.

  2. The client makes the payment (you can also configure rate recalculation at the time of payment, which is crucial for locking in the rate and ensuring a stable profit margin for the order). The system then automatically sells the cryptocurrency on the exchange from your portfolio.

  3. After the cryptocurrency is sold, the client receives the corresponding amount, and the system records the current rate at the time of payment.

  4. The system then transfers the funds to the exchange and continues the process.

In practice, this works as follows:

Suppose you have 1 BTC in your portfolio on an exchange account. For receiving cryptocurrency, you use, for example, a block.io wallet (any merchant wallet can be used for receiving cryptocurrency).

A client creates an order to purchase 0.1 BTC and makes the payment. At the time of payment, the system instantly sells 0.1 BTC on the exchange, for example, for USDT.

As a result, you have 0.1 BTC in your block.io account, 0.9 BTC in your exchange account, and USDT from the sale of 0.1 BTC.

Once the entire BTC amount is transferred to your block.io account, you can move all the BTC to your exchange account in one transaction, reducing transfer fees.

This method minimizes risks and ensures a more stable profit margin for the order, as the rate is locked in at the time of payment. Additionally, optimizing fund transfers between the exchange and wallets reduces fees and increases trading efficiency.

But what if you don’t have Bitcoin in your portfolio and only have USDT? In this case, a margin account on the exchange comes to the rescue. The steps described above remain the same. However, since you don’t have BTC in your portfolio, the system will borrow the required amount of BTC from the exchange and sell it, using your USDT account as collateral for the loan (note: any currency can be used as collateral).

For those familiar with stock, commodity, or forex trading, this type of sale is known as a "short sale" or "shorting." It involves selling an asset you don’t own.

Let’s break it down step by step using the example above:

  1. The client creates an order and receives a payment address from the merchant.

  2. The client pays for 0.1 BTC (you can also configure rate recalculation at the time of payment, which is crucial for locking in the rate and ensuring a stable profit margin for the order).

  3. Once the client pays, the system automatically borrows and sells 0.1 BTC on the exchange, using your USDT account as collateral.

  4. The cryptocurrency is received, for example, in a block.io wallet (any merchant wallet can be used for receiving cryptocurrency).

  5. As a result, you have 0.1 BTC in your block.io account, a debt of 0.1 BTC to the exchange, and USDT from the sale of 0.1 BTC.

If you have multiple orders and your debt to the exchange is 1 BTC, while your block.io account holds 1 BTC, you can transfer 1 BTC from block.io to the exchange account to repay the debt. This allows you to lock in the rate without risking price changes, even if you don’t have cryptocurrency in your portfolio.


Buying Cryptocurrency

The process of buying cryptocurrency when it is available in your portfolio works as follows. For example, let’s consider an exchange of rubles from Sberbank for 0.1 BTC:

  1. The client creates an order, and you provide them with a payment card.

  2. The client pays the required amount.

  3. You manually set the order status to "Paid" (you can also configure rate recalculation at the time of payment, which is crucial for locking in the rate and ensuring a stable profit margin for the order).

For example, you have 1 BTC in your block.io wallet. When you set the order status to "Paid," the exchange instantly buys 0.1 BTC. Then, you click the "Transfer" button, and 0.1 BTC is sent from your block.io wallet. As a result, you have 0.9 BTC in your block.io wallet and 0.1 BTC in your exchange account.

When multiple orders accumulate, and the entire amount of Bitcoin from your block.io wallet is transferred to the exchange account, you can transfer the total Bitcoin amount back to block.io.

If you don’t have Bitcoin in your portfolio but only USDT, and you want to automatically fulfill orders, the margin account comes to the rescue again. To prepare for this:

  1. Transfer the required amount of USDT to your exchange account, enough to buy 1 BTC, for example.

  2. Take out a loan of 1 BTC on the exchange.

  3. Transfer 1 BTC from the exchange to your block.io wallet. As a result, you’ll have 1 BTC in your block.io wallet and a debt of 1 BTC on the exchange.

Now, clients can create exchange orders, and you can fulfill them by sending Bitcoin from your block.io wallet. For example, let’s consider an exchange of rubles from Sberbank for 0.1 BTC:

  1. The client submits a request, and you provide them with a payment card.

  2. The client pays the required amount.

  3. You manually set the request status to "Paid" (you can also configure recalculation based on the exchange rate at the time of payment, which is crucial for locking in the rate and ensuring a stable profit margin for the transaction).

When you set the request status to "Paid," an amount of 0.1 BTC is instantly purchased on the exchange, and the debt of 0.1 BTC is settled. Then, you click the "Transfer" button, and 0.1 BTC is sent from your block.io wallet. As a result, you are left with 0.9 BTC in your block.io wallet, and the debt to the exchange is now 0.9 BTC.

When you accumulate multiple requests and fully settle the debt to the exchange, you receive the USDT sold for Sberbank rubles and have no remaining debt to the exchange. The sale is conducted at the rate you set, regardless of Bitcoin price fluctuations on the exchange.

It’s also worth noting that all the actions described above—buying and selling—can be combined depending on your needs. You can carry out cryptocurrency-to-cryptocurrency exchanges even if you don’t actually have the cryptocurrency in your possession. For example, you can exchange XMR for BTC.

Additionally, you can create more complex trading operations involving cryptocurrency-to-cryptocurrency exchanges, including trading pairs that don’t exist on the exchange, such as XMR to XRP and vice versa.

The examples provided use a merchant and auto-payouts via the block.io wallet. It’s important to note that you can use any merchant and/or configure automatic payouts as you see fit. Trading actions are tied exclusively to the request statuses, so it doesn’t matter which merchant or auto-payout system you choose to use.

Last updated