Type/to search

Binance annule tous les ordres non exécutés pour toutes les paires de trading (démonstration étendue IO)

Binance
3
Follow
1508
Followers

Binance annule toutes les commandes non exécutées pour les paires de trading, utilise l'interface IO, peut être considéré comme un exemple d'apprentissage de la connexion d'interface IO pour prendre en charge l'interface API.

Source
JavaScript
function cancellAll(){
    try{
        var openOrders = exchange.IO('api', 'GET', '/api/v3/openOrders');
        for (var i=0; i<openOrders.length; i++){
            var order = openOrders[i];
            var currency = '';
            if (order.symbol.endsWith('USDT')){
                currency = order.symbol.slice(0,order.symbol.length-4) + '_' + 'USDT';
            }
            else{
                currency = order.symbol.slice(0,order.symbol.length-3) + '_' + order.symbol.slice(order.symbol.length-3,order.symbol.length);
Related strategies
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)