Skip to content

Commit

Permalink
Merge pull request Superalgos#4950 from BastianMuc/ccxtfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Awhiteweb committed Jul 27, 2023
2 parents 45d3519 + ae9423e commit f8540a6
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@
*/
}


}

function finalize() {
Expand Down Expand Up @@ -239,8 +238,8 @@

// Uncomment for debug
// SA.logger.info('Merged Params from Market + Order Close Stage')
// SA.logger.info(params)

// SA.logger.info(JSON.stringify(params))
// exchange.verbose = true

switch (tradingSystemOrder.type) {
case 'Market Buy Order': {
Expand All @@ -265,6 +264,9 @@
}
}

// Hotfix to overcome issue with Binance Spot Market Orders as per https://github.com/ccxt/ccxt/issues/18663
if (exchangeId === 'binance' && type === 'market') { price = undefined }

/* Basic Logging */
logInfo("createOrder -> symbol = " + symbol);
logInfo("createOrder -> side = " + side);
Expand All @@ -283,7 +285,7 @@
return
}

try {
try {
// ccxt unified methods of exchanges might expect and will accept various params which affect their functionality
let order = await (exchange.createOrder(symbol, type, side, amount, price, params))

Expand Down

0 comments on commit f8540a6

Please sign in to comment.