Bitcoin Forum
April 26, 2024, 09:16:10 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Crawling down Binance's announcement of delisting currencies  (Read 129 times)
henrythebest (OP)
Jr. Member
*
Offline Offline

Activity: 109
Merit: 7

Perseverance pays... a lot!


View Profile
February 20, 2019, 03:38:08 AM
 #1

article originally from FMZ.COM

Strategy purpose:

On February 15, Binance announced the taking off announcement of the CLOAK, MOD, SALT, SUB, WINGS. After the announcement, the currency involved immediately began to fall, generally down 15% in an hour, with more and more users knew the news, the decline continued and there was no rebound, and it has fallen by half so far. If you can sell the coins held in the first time after the announcement, you can recover a lot of losses.

This strategy runs on the FMZ quantitative trading platform (formerly BotVS).

Idea:

Crawling down the Binance security announcement pages and observe the information of the nearest two times of announcement. The specific format is “Binance will delist CLOAK, MOD, SALT, SUB, WINGS”, “Binance will delist BCN, CHAT, ICN, TRIG”.

The strategy will use the "will delist" as a keyword to crawl the new release announcement, of course, does not rule out the Binance change notification format, you can refer to this strategy to improve. Since the crawler task is too simple, it will be written in simple JavaScript. After crawling down the delist currency, the account information will be checked. If there is a delist currency, it will be sold at a lower price. If there is an uncompleted order, it will be revoked first. Until the sale of the remaining coins is completely sold.

Crawling code:

Code:
var html = HttpQuery('https://support.binance.com/hc/zh-cn/sections/115000202591-%E6%9C%80%E6%96%B0%E5%85%AC%E5%91%8A')//Announcement page
html = html.slice(html.indexOf('article-list'),html.indexOf('pagination')) // Article list section
if(html.indexOf('will delist')>0){
    if(html.slice(html.indexOf('will delist')+3,html.indexOf('</a>')) != title){ //crawl only the first delist information
        var title = html.slice(html.indexOf('delist')+3,html.indexOf('</a>'))
        var downList = title.split('、')
        Log('New announcement is detected, the currency will be delist:', title, '@')//WeChat push release announcement
    }
}

Revoking order code:

Code:
function cancellOrder(){
    var openOrders = exchange.IO('api', 'GET', '/api/v3/openOrders')//Get all unexecuted orders
    for (var i=0; i<openOrders.length; i++){
        var order = openOrders[i];
        for (var j=0;j<downList.length;j++){
            if(order.symbol.startsWith(downList[j])){
                var currency = downList[j] + '_' + order.symbol.slice(downList[j].length);
                Log('There is a delist currency order exist, revoked', currency)
                exchange.IO("currency", currency)//To revoke a order, you need the trading pair information, so you must first switch to the trading pair.
                exchange.CancelOrder(order.orderId)
            }
        }
    }
}

Check account code:

Code:
function checkAccount(){
    var done = false
    while(!done){
        account = _C(exchange.GetAccount)
        done = true
        for (var i=0; i<account.Info.balances.length; i++){
            if(downList.indexOf(account.Info.balances[i].asset)>-1 &amp;&amp; parseFloat(account.Info.balances[i].free)>pairInfo[account.Info.balances[i].asset+'BTC'].minQty){
                Log('delist currency will be emptied', account.Info.balances[i].asset)
                sellAll(account.Info.balances[i].asset, parseFloat(account.Info.balances[i].free))
                done = false
            }
        }
        Sleep(1000)
    }
    Log('Sale completed')
}

Placing order code:

Code:
var exchangeInfo = JSON.parse(HttpQuery('https://api.binance.com/api/v1/exchangeInfo'))
var pairInfo = {}  //Trading pair information, storing transaction progress, minimum trading volume and other related information, placing order will needed
if(exchangeInfo){
    for (var i=0; i<exchangeInfo.symbols.length; i++){
        var info = exchangeInfo.symbols[i];
        pairInfo[info.symbol] = {minQty:parseFloat(info.filters[2].minQty),tickerSize:parseFloat(info.filters[0].tickSize),
            stepSize:parseFloat(info.filters[2].stepSize), minNotional:parseFloat(info.filters[3].minNotional)}
    }
}else{
    Log('Failed to get transaction information')
}
function sellAll(coin, free){
    var symbol = coin + 'BTC'
    exchange.IO("currency", coin+'_BTC') //switching trading pair
    var ticker = _C(exchange.GetTicker)
    var sellPrice = _N(ticker.Buy*0.7, parseInt((Math.log10(1.1/pairInfo[symbol].tickerSize))))
    var sellAmount = _N(free, parseInt((Math.log10(1.1/pairInfo[symbol].stepSize))))
    if (sellAmount > pairInfo[symbol].minQty &amp;&amp; sellPrice*sellAmount > pairInfo[symbol].minNotional){
        exchange.Sell(sellPrice, sellAmount, symbol)
    }
}

To sum up:

The above code is only for demonstration, the complete code can be found at FMZ.COM. The announcement page can be crawled once in a minute, which will have enough time to sell before the ordinary user.

But there may be some problems, such as crawling being blocked, announcement format changes, and so on. If the currency is not on the Binance, you can also refer to this strategy to other exchanges. After all, the delist currency will affect all platforms.

article originally from FMZ.COM

In Bitcoin We Trust
1714122970
Hero Member
*
Offline Offline

Posts: 1714122970

View Profile Personal Message (Offline)

Ignore
1714122970
Reply with quote  #2

1714122970
Report to moderator
1714122970
Hero Member
*
Offline Offline

Posts: 1714122970

View Profile Personal Message (Offline)

Ignore
1714122970
Reply with quote  #2

1714122970
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714122970
Hero Member
*
Offline Offline

Posts: 1714122970

View Profile Personal Message (Offline)

Ignore
1714122970
Reply with quote  #2

1714122970
Report to moderator
1714122970
Hero Member
*
Offline Offline

Posts: 1714122970

View Profile Personal Message (Offline)

Ignore
1714122970
Reply with quote  #2

1714122970
Report to moderator
1714122970
Hero Member
*
Offline Offline

Posts: 1714122970

View Profile Personal Message (Offline)

Ignore
1714122970
Reply with quote  #2

1714122970
Report to moderator
butka
Full Member
***
Offline Offline

Activity: 434
Merit: 246


View Profile
February 20, 2019, 10:50:04 AM
 #2

Yes, it makes sense to run such a crawler, especially if you happen to hold significant amounts of some of the "to-be-delisted" coins. And you never know in advance, as these messages usually come out of the blue. I wonder if there is something you can do to actually use this strategy to your advantage (to make money) as opposed to just cutting loses?

I guess there is not much you can do after all. Delisting on Binance is like a death sentence, the coin is doomed to go down continuously. 
1Referee
Legendary
*
Offline Offline

Activity: 2170
Merit: 1427


View Profile
February 20, 2019, 12:22:07 PM
 #3

I wonder if there is something you can do to actually use this strategy to your advantage (to make money) as opposed to just cutting loses?
Imposible right now since you can't short utter garbage coins. If you could, there was an opportunity for quick profits, but the platforms who do offer altcoin shorts pick the altcoins they consider to be strong enough to remain listed on any exchange and likely won't be getting attacked through POW or other ways.

I guess there is not much you can do after all. Delisting on Binance is like a death sentence, the coin is doomed to go down continuously. 
The best thing people can do is to not invest in shitcoins below a certain market cap or volume threshold.
romero121
Legendary
*
Offline Offline

Activity: 3164
Merit: 1213


View Profile
February 20, 2019, 01:19:03 PM
 #4

Often this is been done with most of the exchanges. Binance gives a notification and de lists from the trading. To be eligible to get listed to the Binance exchange the respective asset needs to have some terms and conditions to be fulfilled. Main thing among that is the trading volume. When this decreases, automatically Binance de lists it.
BitcoinTurk
Hero Member
*****
Offline Offline

Activity: 1624
Merit: 624


View Profile
February 20, 2019, 01:30:30 PM
 #5

It has become a situation that we are not very surprised at now. Especially due to delist transactions made by Binance, the market can be mixed in a short time. Although this mess is experienced on token or coins that are reported to be deluded, it can cause serious investors to lose money. It is a fact that we need to avoid low-volume options and not to invest in long-term coins. On the other hand, it is important to know that when Binance makes this announcement, he will undoubtedly lose serious value within a few hours. For this reason, we have to keep our investments and purchase / sales orders continuously updated.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!