Last active
April 23, 2021 13:06
-
-
Save GuntharDeNiro/c942fc5d466351806537b1ec92c2684f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const closePosition = function(amount,exchange,pair) { | |
let price = memory.ledger[exchange][pair].Bid; | |
return memory.exchanges[exchange] | |
.cancelOrderSTOP(0, pair, 'Close', amount, price, price, price, (data) => { | |
console.log(data) | |
}) .catch((e) => { | |
if (e.message == 'Exchange_Timeout') { | |
console.log(exchange, 'timeout'); | |
} else { | |
console.log('\r\n', e); | |
} | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment