bitcoin automated trading

[Bitcoin Automated Trading] Developing automatic trading using order book information (1)

tradingbot 2023. 3. 30. 23:58

------------------------------------------------------------------------------------------------------------------

https://accounts.binance.com/register?ref=21391362 <- Get Discount on Binance Futures Fees With Referral Code

Referral Code : 21391362

------------------------------------------------------------------------------------------------------------------

 

You can check buying and selling information through the order book. Looking at the order book, you can see the current buying, selling, and market trends. It is not 100% reliable because the forces deceive the ants with imaginary quantities, but it is possible to trade by using it as an auxiliary indicator. Since programming is not difficult, we will develop an automatic trading algorithm using the numbers in the order book.

You can get order book information by calling the get_order_book method. Enter the coin you want in symbol and the maximum quantity to bring in limit. The reference says a maximum of 1000, but you can bring up to a maximum of 5000 for each buy/sell. Bids is a buying window, and asks is a selling window.

Coins with high trading volume change frequently, so it is difficult to capture, so we will bring the POLYX coin order book with low trading volume.

You can confirm that the execution result and the Binance order window are the same.

You can group price ranges in the order book, which allows you to confirm that orders are gathered in a specific price range, and is a number that can help you understand the current selling price. However, it should not be forgotten that factions can put up buy/sell walls on imaginary quantities, and use the Iceberg feature to hide order quantities.

Iceberg orders are now available on Binance.

Grouping is simple. Divide by the number to group, then multiply by the number to group. For example, if you divide 28430 to 28439 by 10, only 2843 remains.

Clean up the above code to convert to numpy, and import data with 5000 max. Group the prices by 100 using the partial function.

 

This is the grouping result. But what we want is to get the total sum when grouping.

If duplicates are removed by calling the unique method, only representative values are displayed.

Run a loop through the representative values, get the quantities of the corresponding values from buy_orderbook_array, and add them all together.

It is sorted in descending order by Bitcoin volume. It can be seen that the current price range with the highest buying volume is $28,100. In other words, it serves as a support line.

 

------------------------------------------------------------------------------------------------------------------

https://accounts.binance.com/register?ref=21391362 <- Get Discount on Binance Futures Fees With Referral Code

Referral Code : 21391362

------------------------------------------------------------------------------------------------------------------